From: idfx Date: Tue, 30 Sep 2003 19:32:42 +0000 (+0000) Subject: to_parent aatribute without NOT NULL and DEFAULT value. Needed for parent-child-relation X-Git-Tag: BEFORE_MERGE_1_1~46 X-Git-Url: http://erislabs.net/gitweb/?a=commitdiff_plain;h=ff7600b046d773a20bf843995806d5dccc86af46;p=mir.git to_parent aatribute without NOT NULL and DEFAULT value. Needed for parent-child-relation --- diff --git a/dbscripts/create_pg.sql b/dbscripts/create_pg.sql index d9ce6ab8..5dcdbc72 100755 --- a/dbscripts/create_pg.sql +++ b/dbscripts/create_pg.sql @@ -105,7 +105,7 @@ CREATE SEQUENCE "topic_id_seq" start 1 increment 1 maxvalue 2147483647 minvalue CREATE TABLE "topic" ( "id" integer DEFAULT nextval('topic_id_seq'::text) NOT NULL, - "parent_id" integer DEFAULT '0' NOT NULL, + "parent_id" integer, "title" character varying(80) NOT NULL, "description" text, "filename" character varying(20) NOT NULL, diff --git a/dbscripts/updates/update20030920.sql b/dbscripts/updates/update20030920.sql new file mode 100755 index 00000000..503687d8 --- /dev/null +++ b/dbscripts/updates/update20030920.sql @@ -0,0 +1,5 @@ +-- parent_id should not NOT NULL and should not have a DEFAULT + +ALTER TABLE topic ALTER parent_id DROP NOT NULL; +ALTER TABLE topic ALTER parent_id DROP DEFAULT; +