[vhffs-dev] [1485] Add columns definition for extended history

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


Revision: 1485
Author:   beuss
Date:     2009-07-30 07:49:27 +0200 (Thu, 30 Jul 2009)

Log Message:
-----------
Add columns definition for extended history

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

Added Paths:
-----------
    trunk/vhffs-compat/4.3.sql


Modified: trunk/vhffs-backend/src/pgsql/initdb.sql.in
===================================================================
--- trunk/vhffs-backend/src/pgsql/initdb.sql.in	2009-07-30 05:41:20 UTC (rev 1484)
+++ trunk/vhffs-backend/src/pgsql/initdb.sql.in	2009-07-30 05:49:27 UTC (rev 1485)
@@ -348,6 +348,7 @@
 	date int8 NOT NULL,
 -- History message
 	message varchar(200),
+	source_uid int4 DEFAULT NULL,
 	CONSTRAINT vhffs_history_pkey PRIMARY KEY ( history_id )
 ) WITH OIDS;
 
@@ -606,6 +607,8 @@
 
 ALTER TABLE vhffs_history ADD CONSTRAINT fk_vhffs_history_vhffs_object FOREIGN KEY (object_id) REFERENCES vhffs_object(object_id) ON DELETE CASCADE;
 
+ALTER TABLE vhffs_history ADD CONSTRAINT fk_vhffs_history_vhffs_users FOREIGN KEY (source_uid) REFERENCES vhffs_users(uid);
+
 ALTER TABLE vhffs_httpd ADD CONSTRAINT fk_vhffs_httpd_vhffs_object FOREIGN KEY (object_id) REFERENCES vhffs_object(object_id) ON DELETE CASCADE;
 
 ALTER TABLE vhffs_ml ADD CONSTRAINT fk_vhffs_ml_vhffs_object FOREIGN KEY (object_id) REFERENCES vhffs_object(object_id) ON DELETE CASCADE;

Added: trunk/vhffs-compat/4.3.sql
===================================================================
--- trunk/vhffs-compat/4.3.sql	                        (rev 0)
+++ trunk/vhffs-compat/4.3.sql	2009-07-30 05:49:27 UTC (rev 1485)
@@ -0,0 +1,2 @@
+ALTER TABLE vhffs_history ADD COLUMN source_uid INTEGER DEFAULT NULL;
+ALTER TABLE vhffs_history ADD CONSTRAINT fk_vhffs_history_vhffs_users FOREIGN KEY (source_uid) REFERENCES vhffs_users(uid);


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