Eli Mesika has posted comments on this change. Change subject: DB: Vm Init - new Feature ......................................................................
Patch Set 18: (2 comments) http://gerrit.ovirt.org/#/c/23022/18/packaging/dbscripts/upgrade/03_04_0490_add_vm_init_table.sql File packaging/dbscripts/upgrade/03_04_0490_add_vm_init_table.sql: Line 36: -- Name: vm_static_vm_init; Type: FK CONSTRAINT; Schema: public; Owner: engine Line 37: -- Line 38: ALTER TABLE ONLY vm_init Line 39: ADD CONSTRAINT vm_static_vm_init FOREIGN KEY (vm_id) REFERENCES vm_static(vm_guid) ON DELETE CASCADE; Line 40: ALTER TABLE ONLY vm_init TWS Line 41: ADD CONSTRAINT pk_vm_init PRIMARY KEY (vm_id); Line 37: -- Line 38: ALTER TABLE ONLY vm_init Line 39: ADD CONSTRAINT vm_static_vm_init FOREIGN KEY (vm_id) REFERENCES vm_static(vm_guid) ON DELETE CASCADE; Line 40: ALTER TABLE ONLY vm_init Line 41: ADD CONSTRAINT pk_vm_init PRIMARY KEY (vm_id); Better approach of the 2 ALTER statements above is to add them to the CREATE TABLE AS: CREATE TABLE vm_init ( vm_id UUID NOT NULL, host_name TEXT DEFAULT NULL, domain TEXT DEFAULT NULL, authorized_keys TEXT DEFAULT NULL, regenerate_keys BOOLEAN DEFAULT FALSE, time_zone VARCHAR(40) DEFAULT NULL, dns_servers TEXT DEFAULT NULL, dns_search_domains TEXT DEFAULT NULL, networks TEXT DEFAULT NULL, password TEXT DEFAULT NULL, winkey VARCHAR(30) DEFAULT NULL, custom_script TEXT DEFAULT NULL, CONSTRAINT pk_vm_init PRIMARY KEY (vm_id), CONSTRAINT vm_static_vm_init FOREIGN KEY (vm_id) REFERENCES vm_static(vm_guid) ON DELETE CASCADE ) WITH OIDS; -- To view, visit http://gerrit.ovirt.org/23022 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If6230e0543712cc8a8efd48ba45406ea43d0f778 Gerrit-PatchSet: 18 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Shahar Havivi <shav...@redhat.com> Gerrit-Reviewer: Arik Hadas <aha...@redhat.com> Gerrit-Reviewer: Eli Mesika <elimes...@gmail.com> Gerrit-Reviewer: Eli Mesika <emes...@redhat.com> Gerrit-Reviewer: Gilad Chaplik <gchap...@redhat.com> Gerrit-Reviewer: Michal Skrivanek <michal.skriva...@redhat.com> Gerrit-Reviewer: Omer Frenkel <ofren...@redhat.com> Gerrit-Reviewer: Roy Golan <rgo...@redhat.com> Gerrit-Reviewer: Shahar Havivi <shav...@redhat.com> Gerrit-Reviewer: Tomas Jelinek <tjeli...@redhat.com> Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches