From 07a4b2bd2b523ac1b49fb0ea0b02eecf1afa9554 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Mon, 23 May 2016 12:19:46 +0100 Subject: [PATCH] Bug 16565: Drop additional_fields and additional_field_values before creating them These 2 tables should be dropped before trying to create them Test plan: From the SQL CLI, source the kohastructure.sql file source it again => Without this patch you get 2 warnings ERROR 1050 (42S01) at line 3580 in file: 'installer/data/mysql/kohastructure.sql': Table 'additional_fields' already exi sts ERROR 1050 (42S01) at line 3596 in file: 'installer/data/mysql/kohastructure.sql': Table 'additional_field_values' alrea dy exists => With this patch, you won't get them --- installer/data/mysql/kohastructure.sql | 2 ++ 1 file changed, 2 insertions(+) diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index 42bff46..c5a3f4a 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -3577,6 +3577,7 @@ CREATE TABLE discharges ( -- This table add the ability to add new fields for a record -- +DROP TABLE IF EXISTS additional_fields; CREATE TABLE `additional_fields` ( `id` int(11) NOT NULL AUTO_INCREMENT, -- primary key identifier `tablename` varchar(255) NOT NULL DEFAULT '', -- tablename of the new field @@ -3593,6 +3594,7 @@ CREATE TABLE `additional_fields` ( -- This table store values for additional fields -- +DROP TABLE IF EXISTS additional_field_values; CREATE TABLE `additional_field_values` ( `id` int(11) NOT NULL AUTO_INCREMENT, -- primary key identifier `field_id` int(11) NOT NULL, -- foreign key references additional_fields(id) -- 2.8.1