[vhffs-dev] [1174] Let's give more meaning to fields.

[ Thread Index | Date Index | More vhffs.org/vhffs-dev Archives ]


Revision: 1174
Author:   beuss
Date:     2008-03-17 22:41:06 +0100 (Mon, 17 Mar 2008)

Log Message:
-----------
Let's give more meaning to fields.

Modified Paths:
--------------
    trunk/vhffs-backend/src/pgsql/initdb.sql.in


Modified: trunk/vhffs-backend/src/pgsql/initdb.sql.in
===================================================================
--- trunk/vhffs-backend/src/pgsql/initdb.sql.in	2008-03-14 06:51:19 UTC (rev 1173)
+++ trunk/vhffs-backend/src/pgsql/initdb.sql.in	2008-03-17 21:41:06 UTC (rev 1174)
@@ -412,9 +412,9 @@
 -- Label for the tag in platform's default language
     label VARCHAR(30) NOT NULL,
     description TEXT NOT NULL,
-    created int8 NOT NULL,
+    updated int8 NOT NULL,
 -- This tag's creator id, null if user has been deleted
-    creator_id int4,
+    updater_id int4,
     category_id int4 NOT NULL,
     CONSTRAINT vhffs_tag_pkey PRIMARY KEY( tag_id )
 ) WITH OIDS;
@@ -427,8 +427,8 @@
     description TEXT NOT NULL,
 -- Access level of the category
     visibility int4 NOT NULL DEFAULT 0,
-    created int8 NOT NULL,
-    creator_id int4,
+    updated int8 NOT NULL,
+    updater_id int4,
     CONSTRAINT vhffs_tag_category_pkey PRIMARY KEY( tag_category_id )
 ) WITH OIDS;
 
@@ -438,8 +438,8 @@
     lang VARCHAR(16) NOT NULL,
     label VARCHAR(30) NOT NULL,
     description TEXT NOT NULL,
-    created int8 NOT NULL,
-    creator_id int4,
+    updated int8 NOT NULL,
+    updater_id int4,
     CONSTRAINT vhffs_tag_category_translation_pkey PRIMARY KEY( tag_category_id, lang )
 ) WITH OIDS;
 
@@ -466,8 +466,8 @@
     lang VARCHAR(16) NOT NULL,
     label VARCHAR(30) NOT NULL,
     description TEXT NOT NULL,
-    created int8 NOT NULL,
-    creator_id int4,
+    updated int8 NOT NULL,
+    updater_id int4,
     CONSTRAINT vhffs_tag_translation_pkey PRIMARY KEY( tag_id, lang )
 ) WITH OIDS;
 
@@ -599,13 +599,13 @@
 ALTER TABLE vhffs_user_group ADD CONSTRAINT fk_vhffs_user_group_vhffs_users FOREIGN KEY (uid) REFERENCES vhffs_users (uid) ON DELETE CASCADE;
 ALTER TABLE vhffs_user_group ADD CONSTRAINT fk_vhffs_user_group_vhffs_groups FOREIGN KEY (gid) REFERENCES vhffs_groups (gid) ON DELETE CASCADE;
 
-ALTER TABLE vhffs_tag ADD CONSTRAINT fk_vhffs_tag_vhffs_users FOREIGN KEY (creator_id) REFERENCES vhffs_users(uid) ON DELETE SET NULL;
-ALTER TABLE vhffs_tag_category ADD CONSTRAINT fk_vhffs_tag_category_vhffs_users FOREIGN KEY (creator_id) REFERENCES vhffs_users(uid) ON DELETE SET NULL;
+ALTER TABLE vhffs_tag ADD CONSTRAINT fk_vhffs_tag_vhffs_users FOREIGN KEY (updater_id) REFERENCES vhffs_users(uid) ON DELETE SET NULL;
+ALTER TABLE vhffs_tag_category ADD CONSTRAINT fk_vhffs_tag_category_vhffs_users FOREIGN KEY (updater_id) REFERENCES vhffs_users(uid) ON DELETE SET NULL;
 ALTER TABLE vhffs_tag ADD CONSTRAINT fk_vhffs_tag_vhffs_tag_category FOREIGN KEY (category_id) REFERENCES vhffs_tag_category(tag_category_id) ON DELETE CASCADE;
 ALTER TABLE vhffs_tag_category_translation ADD CONSTRAINT fk_vhffs_tag_category_translation_vhffs_tag_category FOREIGN KEY ( tag_category_id ) REFERENCES vhffs_tag_category(tag_category_id) ON DELETE CASCADE;
-ALTER TABLE vhffs_tag_category_translation ADD CONSTRAINT fk_vhffs_tag_category_translation_vhffs_users FOREIGN KEY ( creator_id ) REFERENCES vhffs_users(uid) ON DELETE SET NULL;
+ALTER TABLE vhffs_tag_category_translation ADD CONSTRAINT fk_vhffs_tag_category_translation_vhffs_users FOREIGN KEY ( updater_id ) REFERENCES vhffs_users(uid) ON DELETE SET NULL;
 ALTER TABLE vhffs_tag_translation ADD CONSTRAINT fk_vhffs_tag_translation_vhffs_tag FOREIGN KEY( tag_id ) REFERENCES vhffs_tag( tag_id ) ON DELETE CASCADE;
-ALTER TABLE vhffs_tag_translation ADD CONSTRAINT fk_vhffs_tag_translation_vhffs_users FOREIGN KEY( creator_id ) REFERENCES vhffs_users( uid ) ON DELETE SET NULL;
+ALTER TABLE vhffs_tag_translation ADD CONSTRAINT fk_vhffs_tag_translation_vhffs_users FOREIGN KEY( updater_id ) REFERENCES vhffs_users( uid ) ON DELETE SET NULL;
 ALTER TABLE vhffs_object_tag ADD CONSTRAINT fk_vhffs_object_tag_vhffs_object FOREIGN KEY ( object_id ) REFERENCES vhffs_object( object_id ) ON DELETE CASCADE;
 ALTER TABLE vhffs_object_tag ADD CONSTRAINT fk_vhffs_object_tag_vhffs_tag FOREIGN KEY ( tag_id ) REFERENCES vhffs_tag( tag_id ) ON DELETE CASCADE;
 ALTER TABLE vhffs_tag_request ADD CONSTRAINT fk_vhffs_tag_request_vhffs_user FOREIGN KEY ( requester_id ) REFERENCES vhffs_users( uid ) ON DELETE SET NULL;


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/