[vhffs-dev] [1167] Fixed length of pgsql databases. |
[ Thread Index |
Date Index
| More vhffs.org/vhffs-dev Archives
]
Revision: 1167
Author: gradator
Date: 2008-02-29 18:33:55 +0000 (Fri, 29 Feb 2008)
Log Message:
-----------
Fixed length of pgsql databases.
Modified Paths:
--------------
trunk/vhffs-compat/4.1.sql
Modified: trunk/vhffs-compat/4.1.sql
===================================================================
--- trunk/vhffs-compat/4.1.sql 2008-02-27 00:41:33 UTC (rev 1166)
+++ trunk/vhffs-compat/4.1.sql 2008-02-29 18:33:55 UTC (rev 1167)
@@ -1 +1,10 @@
ALTER TABLE vhffs_pgsql ADD COLUMN dbencoding VARCHAR(20) NOT NULL DEFAULT 'LATIN1';
+
+-- 16 bytes is not enough
+BEGIN;
+ALTER TABLE vhffs_pgsql ADD COLUMN dbuser_new varchar(200);
+UPDATE vhffs_pgsql SET dbuser_new = dbuser;
+ALTER TABLE vhffs_pgsql DROP COLUMN dbuser;
+ALTER TABLE vhffs_pgsql RENAME COLUMN dbuser_new TO dbuser;
+ALTER TABLE vhffs_pgsql ALTER COLUMN dbuser SET NOT NULL;
+COMMIT;