sql repariert
This commit is contained in:
parent
0b6bed905b
commit
85a879fef5
@ -9,11 +9,16 @@ CREATE TABLE domain_option (
|
|||||||
domain_option_name character varying(50) NOT NULL
|
domain_option_name character varying(50) NOT NULL
|
||||||
);
|
);
|
||||||
|
|
||||||
|
ALTER TABLE ONLY domain_option
|
||||||
|
ADD CONSTRAINT domain_option_uniq UNIQUE (domain_option_id);
|
||||||
|
|
||||||
CREATE TABLE domain__domain_option (
|
CREATE TABLE domain__domain_option (
|
||||||
domain_option_id integer NOT NULL;
|
domain_option_id integer NOT NULL,
|
||||||
domain_id integer NOT NULL;
|
domain_id integer NOT NULL
|
||||||
);
|
);
|
||||||
|
|
||||||
|
CREATE UNIQUE INDEX unique_domain__domain_option ON domain__domain_option USING btree (domain_option_id, domain_id);
|
||||||
|
|
||||||
ALTER TABLE ONLY domain__domain_option
|
ALTER TABLE ONLY domain__domain_option
|
||||||
ADD CONSTRAINT domain_option_id_fkey FOREIGN KEY (domain_option_id)
|
ADD CONSTRAINT domain_option_id_fkey FOREIGN KEY (domain_option_id)
|
||||||
REFERENCES domain_option(domain_option_id) DEFERRABLE;
|
REFERENCES domain_option(domain_option_id) DEFERRABLE;
|
||||||
|
Loading…
Reference in New Issue
Block a user