[vhffs-dev] [489] Oops! vhffs_forum depends on vhffs_object(state).

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


Revision: 489
Author:   beuss
Date:     2007-02-20 09:24:10 +0000 (Tue, 20 Feb 2007)

Log Message:
-----------
Oops! vhffs_forum depends on vhffs_object(state).

Modified Paths:
--------------
    branches/vhffs_4.1/vhffs-compat/4.0.sql


Modified: branches/vhffs_4.1/vhffs-compat/4.0.sql
===================================================================
--- branches/vhffs_4.1/vhffs-compat/4.0.sql	2007-02-20 09:10:27 UTC (rev 488)
+++ branches/vhffs_4.1/vhffs-compat/4.0.sql	2007-02-20 09:24:10 UTC (rev 489)
@@ -170,7 +170,7 @@
 BEGIN;
 ALTER TABLE vhffs_object ADD COLUMN state_new int4;
 UPDATE vhffs_object SET state_new = state::text::integer;
-ALTER TABLE vhffs_object DROP COLUMN state;
+ALTER TABLE vhffs_object DROP COLUMN state CASCADE;
 ALTER TABLE vhffs_object RENAME COLUMN state_new TO state;
 ALTER TABLE vhffs_object ALTER COLUMN state SET NOT NULL;
 COMMIT;
@@ -180,8 +180,7 @@
 SELECT dns.dns_id AS id, dns.domain || '.' AS origin , dns.ns, dns.mbox, dns.serial, dns.refresh, dns.retry, dns.expire, dns.minimum, dns.ttl, (o.state = 6) AS active
 FROM vhffs_dns dns, vhffs_object o WHERE o.object_id=dns.object_id;
 
--- update vhffs_forum view
-DROP VIEW vhffs_forum;
+-- update vhffs_forum view, it has been dropped by drop column state in vhffs_object
 CREATE VIEW vhffs_forum AS
 SELECT users.username, users.passwd, users.firstname, users.lastname, users.mail, users.date_creation, object.state
 FROM vhffs_users users, vhffs_object object


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