schema: rename datalist_value to datalist_entry

This commit is contained in:
Thomas Gelf 2015-06-30 15:41:59 +02:00
parent d3f4625d7c
commit 3f9a19ac91
4 changed files with 42 additions and 10 deletions

View File

@ -0,0 +1,15 @@
DROP TABLE director_datalist_value;
CREATE TABLE director_datalist_entry (
list_id INT(10) UNSIGNED NOT NULL,
entry_name VARCHAR(255) DEFAULT NULL,
entry_value TEXT DEFAULT NULL,
format enum ('string', 'expression', 'json'),
PRIMARY KEY (list_id, entry_name),
CONSTRAINT director_datalist_value_datalist
FOREIGN KEY datalist (list_id)
REFERENCES director_datalist (id)
ON DELETE CASCADE
ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

View File

@ -100,12 +100,12 @@ CREATE TABLE director_datalist (
UNIQUE KEY list_name (list_name)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE director_datalist_value (
CREATE TABLE director_datalist_entry (
list_id INT(10) UNSIGNED NOT NULL,
value_name VARCHAR(255) DEFAULT NULL,
value_expression TEXT DEFAULT NULL,
entry_name VARCHAR(255) DEFAULT NULL,
entry_value TEXT DEFAULT NULL,
format enum ('string', 'expression', 'json'),
PRIMARY KEY (list_id, value_name),
PRIMARY KEY (list_id, entry_name),
CONSTRAINT director_datalist_value_datalist
FOREIGN KEY datalist (list_id)
REFERENCES director_datalist (id)

View File

@ -0,0 +1,17 @@
DROP TABLE director_datalist_value;
CREATE TABLE director_datalist_entry (
list_id integer NOT NULL,
entry_name character varying(255) DEFAULT NULL,
entry_value text DEFAULT NULL,
format enum_property_format,
PRIMARY KEY (list_id, entry_name),
CONSTRAINT director_datalist_entry_datalist
FOREIGN KEY (list_id)
REFERENCES director_datalist (id)
ON DELETE CASCADE
ON UPDATE CASCADE
);
CREATE INDEX datalist_entry_datalist ON director_datalist_entry (list_id);

View File

@ -134,20 +134,20 @@ CREATE TABLE director_datalist (
CREATE UNIQUE INDEX datalist_list_name ON director_datalist (list_name);
CREATE TABLE director_datalist_value (
CREATE TABLE director_datalist_entry (
list_id integer NOT NULL,
value_name character varying(255) DEFAULT NULL,
value_expression text DEFAULT NULL,
entry_name character varying(255) DEFAULT NULL,
entry_value text DEFAULT NULL,
format enum_property_format,
PRIMARY KEY (list_id, value_name),
CONSTRAINT director_datalist_value_datalist
PRIMARY KEY (list_id, entry_name),
CONSTRAINT director_datalist_entry_datalist
FOREIGN KEY (list_id)
REFERENCES director_datalist (id)
ON DELETE CASCADE
ON UPDATE CASCADE
);
CREATE INDEX datalist_value_datalist ON director_datalist_value (list_id);
CREATE INDEX datalist_entry_datalist ON director_datalist_entry (list_id);
CREATE TABLE director_datatype (