Revision: 2953
          https://sourceforge.net/p/mrbs/code/2953/
Author:   cimorrison
Date:     2015-01-18 11:55:43 +0000 (Sun, 18 Jan 2015)
Log Message:
-----------
Added support for PostgreSQL

Added Paths:
-----------
    mrbs/branches/repeat_id_fk/web/upgrade/41/pgsql.sql
    mrbs/branches/repeat_id_fk/web/upgrade/42/pgsql.sql

Added: mrbs/branches/repeat_id_fk/web/upgrade/41/pgsql.sql
===================================================================
--- mrbs/branches/repeat_id_fk/web/upgrade/41/pgsql.sql                         
(rev 0)
+++ mrbs/branches/repeat_id_fk/web/upgrade/41/pgsql.sql 2015-01-18 11:55:43 UTC 
(rev 2953)
@@ -0,0 +1,21 @@
+-- $Id$
+
+-- Make mrbs_entry.repeat_id a foreign key
+-- Previously repeat_id was set to zero if there was no repeat.
+-- However this breaks our foreign key constraint so we have to modify
+-- the repeat_id column before we can create the foreign key.
+
+ALTER TABLE %DB_TBL_PREFIX%entry
+  ALTER COLUMN repeat_id DROP DEFAULT,
+  ALTER COLUMN repeat_id DROP NOT NULL,
+  ALTER COLUMN repeat_id SET DEFAULT NULL;
+  
+UPDATE %DB_TBL_PREFIX%entry
+  SET repeat_id=NULL WHERE repeat_id=0;
+
+ALTER TABLE %DB_TBL_PREFIX%entry
+  ADD FOREIGN KEY (repeat_id) 
+    REFERENCES %DB_TBL_PREFIX%repeat(id)
+    ON UPDATE CASCADE
+    ON DELETE CASCADE;
+    
\ No newline at end of file


Property changes on: mrbs/branches/repeat_id_fk/web/upgrade/41/pgsql.sql
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: mrbs/branches/repeat_id_fk/web/upgrade/42/pgsql.sql
===================================================================
--- mrbs/branches/repeat_id_fk/web/upgrade/42/pgsql.sql                         
(rev 0)
+++ mrbs/branches/repeat_id_fk/web/upgrade/42/pgsql.sql 2015-01-18 11:55:43 UTC 
(rev 2953)
@@ -0,0 +1,10 @@
+-- $Id$
+
+-- Make ical_recur_id nullable, so that we can give it a null value
+-- when there is no recurrence
+
+ALTER TABLE %DB_TBL_PREFIX%entry
+  ALTER COLUMN ical_recur_id DROP DEFAULT,
+  ALTER COLUMN ical_recur_id DROP NOT NULL,
+  ALTER COLUMN ical_recur_id SET DEFAULT NULL;
+  
\ No newline at end of file


Property changes on: mrbs/branches/repeat_id_fk/web/upgrade/42/pgsql.sql
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
------------------------------------------------------------------------------
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet
_______________________________________________
Mrbs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mrbs-commits

Reply via email to