From 594a5779dccd121f185470e20c0e931f7579950f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20B=C3=B6hmer?= Date: Sat, 29 Mar 2025 20:57:58 +0100 Subject: [PATCH] Specify that we mean a column in drop statement. This is more correct This should help with more strict sql servers like in issue #900 --- migrations/Version20250220215048.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/migrations/Version20250220215048.php b/migrations/Version20250220215048.php index debab1b8..90a73eb1 100644 --- a/migrations/Version20250220215048.php +++ b/migrations/Version20250220215048.php @@ -22,7 +22,7 @@ final class Version20250220215048 extends AbstractMigration //Copy the data from path to external_path and remove the path column $this->addSql('UPDATE attachments SET external_path=path'); - $this->addSql('ALTER TABLE attachments DROP path'); + $this->addSql('ALTER TABLE attachments DROP COLUMN path'); $this->addSql('UPDATE attachments SET internal_path=external_path WHERE external_path LIKE \'#%MEDIA#%%\' ESCAPE \'#\''); @@ -36,7 +36,7 @@ final class Version20250220215048 extends AbstractMigration public function down(Schema $schema): void { $this->addSql('UPDATE attachments SET external_path=internal_path WHERE internal_path IS NOT NULL'); - $this->addSql('ALTER TABLE attachments DROP internal_path'); + $this->addSql('ALTER TABLE attachments DROP COLUMN internal_path'); $this->addSql('ALTER TABLE attachments RENAME COLUMN external_path TO path'); } }