Tabellen fuer DomainOptions
This commit is contained in:
parent
dc7c71fc36
commit
0b6bed905b
23
hsarback/database/database_update.sql
Normal file
23
hsarback/database/database_update.sql
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
CREATE SEQUENCE domain_option_id_seq
|
||||||
|
INCREMENT BY 1
|
||||||
|
NO MAXVALUE
|
||||||
|
NO MINVALUE
|
||||||
|
CACHE 1;
|
||||||
|
|
||||||
|
CREATE TABLE domain_option (
|
||||||
|
domain_option_id integer DEFAULT nextval(('"domain_option_id_seq"'::text)::regclass) NOT NULL,
|
||||||
|
domain_option_name character varying(50) NOT NULL
|
||||||
|
);
|
||||||
|
|
||||||
|
CREATE TABLE domain__domain_option (
|
||||||
|
domain_option_id integer NOT NULL;
|
||||||
|
domain_id integer NOT NULL;
|
||||||
|
);
|
||||||
|
|
||||||
|
ALTER TABLE ONLY domain__domain_option
|
||||||
|
ADD CONSTRAINT domain_option_id_fkey FOREIGN KEY (domain_option_id)
|
||||||
|
REFERENCES domain_option(domain_option_id) DEFERRABLE;
|
||||||
|
|
||||||
|
ALTER TABLE ONLY domain__domain_option
|
||||||
|
ADD CONSTRAINT domain_id_fkey FOREIGN KEY (domain_id)
|
||||||
|
REFERENCES domain(domain_id) DEFERRABLE;
|
Loading…
Reference in New Issue
Block a user