From: Ralf Baechle Date: Mon, 29 Jul 2013 14:46:33 +0000 (+0200) Subject: lib/sql/migration: Fix column names for MySQL/MariaDB X-Git-Url: https://git.ozlabs.org/?a=commitdiff_plain;h=4d7fcc9062659aa74377b39dd87de35c07973ec2;p=patchwork lib/sql/migration: Fix column names for MySQL/MariaDB The first issue is that patchwork was no longer accepting new patches via the apps/patchwork/bin/parsemail.sh script. When I was trying to invoke it manually, it only printed "no project found". I was able to figure out that this was caused by changes to the database scheme which are taken care of by the two SQL scripts: lib/sql/migration/012-project-add-columns.sql lib/sql/migration/013-bundle-names.sql The catch - these first script don't run with MySQL - or rather MariaDB that Fedora has switched to. MariaDB doesn't like the quotes around the table and column names. Patch below. Signed-off-by: Jeremy Kerr --- diff --git a/lib/sql/migration/012-project-add-columns.sql b/lib/sql/migration/012-project-add-columns.sql index d984ad2..ecade28 100644 --- a/lib/sql/migration/012-project-add-columns.sql +++ b/lib/sql/migration/012-project-add-columns.sql @@ -1,5 +1,5 @@ BEGIN; -ALTER TABLE "patchwork_project" ADD COLUMN "web_url" varchar(2000); -ALTER TABLE "patchwork_project" ADD COLUMN "scm_url" varchar(2000); -ALTER TABLE "patchwork_project" ADD COLUMN "webscm_url" varchar(2000); +ALTER TABLE patchwork_project ADD COLUMN web_url varchar(2000); +ALTER TABLE patchwork_project ADD COLUMN scm_url varchar(2000); +ALTER TABLE patchwork_project ADD COLUMN webscm_url varchar(2000); COMMIT;