schema: rename datalist_value to datalist_entry
This commit is contained in:
parent
d3f4625d7c
commit
3f9a19ac91
|
@ -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;
|
||||||
|
|
|
@ -100,12 +100,12 @@ CREATE TABLE director_datalist (
|
||||||
UNIQUE KEY list_name (list_name)
|
UNIQUE KEY list_name (list_name)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
CREATE TABLE director_datalist_value (
|
CREATE TABLE director_datalist_entry (
|
||||||
list_id INT(10) UNSIGNED NOT NULL,
|
list_id INT(10) UNSIGNED NOT NULL,
|
||||||
value_name VARCHAR(255) DEFAULT NULL,
|
entry_name VARCHAR(255) DEFAULT NULL,
|
||||||
value_expression TEXT DEFAULT NULL,
|
entry_value TEXT DEFAULT NULL,
|
||||||
format enum ('string', 'expression', 'json'),
|
format enum ('string', 'expression', 'json'),
|
||||||
PRIMARY KEY (list_id, value_name),
|
PRIMARY KEY (list_id, entry_name),
|
||||||
CONSTRAINT director_datalist_value_datalist
|
CONSTRAINT director_datalist_value_datalist
|
||||||
FOREIGN KEY datalist (list_id)
|
FOREIGN KEY datalist (list_id)
|
||||||
REFERENCES director_datalist (id)
|
REFERENCES director_datalist (id)
|
||||||
|
|
|
@ -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);
|
||||||
|
|
|
@ -134,20 +134,20 @@ CREATE TABLE director_datalist (
|
||||||
CREATE UNIQUE INDEX datalist_list_name ON director_datalist (list_name);
|
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,
|
list_id integer NOT NULL,
|
||||||
value_name character varying(255) DEFAULT NULL,
|
entry_name character varying(255) DEFAULT NULL,
|
||||||
value_expression text DEFAULT NULL,
|
entry_value text DEFAULT NULL,
|
||||||
format enum_property_format,
|
format enum_property_format,
|
||||||
PRIMARY KEY (list_id, value_name),
|
PRIMARY KEY (list_id, entry_name),
|
||||||
CONSTRAINT director_datalist_value_datalist
|
CONSTRAINT director_datalist_entry_datalist
|
||||||
FOREIGN KEY (list_id)
|
FOREIGN KEY (list_id)
|
||||||
REFERENCES director_datalist (id)
|
REFERENCES director_datalist (id)
|
||||||
ON DELETE CASCADE
|
ON DELETE CASCADE
|
||||||
ON UPDATE 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 (
|
CREATE TABLE director_datatype (
|
||||||
|
|
Loading…
Reference in New Issue