Skip to content

PES-2788: uninstall may not delete tables#333

Open
FJiskra wants to merge 1 commit intov3.1from
PES-2788-v31_uninstall-update
Open

PES-2788: uninstall may not delete tables#333
FJiskra wants to merge 1 commit intov3.1from
PES-2788-v31_uninstall-update

Conversation

@FJiskra
Copy link
Contributor

@FJiskra FJiskra commented May 20, 2025

No description provided.

@FJiskra FJiskra force-pushed the PES-2788-v31_uninstall-update branch from 49e2860 to af08d4f Compare May 21, 2025 07:48
@FJiskra FJiskra force-pushed the PES-2788-v31_uninstall-update branch from af08d4f to d2af880 Compare May 21, 2025 08:31
{
$sql = [];
// DB migrations do not work with PACKETERY_REMOVE_ALL_DATA set to false
$dropTables = !defined('PACKETERY_REMOVE_ALL_DATA') || PACKETERY_REMOVE_ALL_DATA;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Neodpovídá zadání - pokud není konstanta definována, nemají se tabulky odstraňovat. I když v tomto případě by se to tak mohlo řešit.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Měnit dosavadní výchozí chování je blbost. Připravte se na to, že to fungovat nebude.

private function installDatabase()
{
$sql = [];
// DB migrations do not work with PACKETERY_REMOVE_ALL_DATA set to false
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Co ten komentář znamená? Pokud je nastavena konstanta, tak to přece neovlivní spuštění skriptů ze složky upgrade, ne?
Pokud jde o situaci, že si eshopista odinstaluje starší verzi a nainstaluje novější, tak tu musí sám vyřešit. Mazání tabulek by neodpovídalo nastavení konstanty.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Upgrade soubory se nepoužijí při čerstvé instalaci. Původní řešení to řešilo dropováním tabulek.

*/
private function uninstallDatabase()
{
if (defined('PACKETERY_REMOVE_ALL_DATA') && !PACKETERY_REMOVE_ALL_DATA) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Neodpovídá zadání - pokud není konstanta definována, nemají se tabulky odstraňovat.

*/
private function deleteConfiguration()
{
if (defined('PACKETERY_REMOVE_ALL_DATA') && !PACKETERY_REMOVE_ALL_DATA) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Neodpovídá zadání - pokud není konstanta definována, nemá se nastavení odstraňovat.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants