use the serial psuedotype when creating the table from scratch
authorMichael J. Rubinsky <mrubinsk@horde.org>
Mon, 24 May 2010 19:28:49 +0000 (15:28 -0400)
committerMichael J. Rubinsky <mrubinsk@horde.org>
Mon, 24 May 2010 19:36:05 +0000 (15:36 -0400)
horde/scripts/sql/create.pgsql.sql
horde/scripts/sql/horde_perms.pgsql.sql

index 0ba52ee..7a7af57 100644 (file)
@@ -46,7 +46,7 @@ CREATE INDEX user_uid_idx ON horde_groups_members (user_uid);
 
 CREATE SEQUENCE horde_perms_id_seq;
 CREATE TABLE horde_perms (
-    perm_id INTEGER NOT NULL DEFAULT NEXTVAL('horde_perms_id_seq'),
+    perm_id SERIAL UNIQUE,
     perm_name VARCHAR(255) NOT NULL UNIQUE,
     perm_parents VARCHAR(255) NOT NULL,
     perm_data TEXT,
index bd83391..bf2bee5 100644 (file)
@@ -1,6 +1,5 @@
-CREATE SEQUENCE horde_perms_id_seq;
 CREATE TABLE horde_perms (
-    perm_id INTEGER NOT NULL DEFAULT NEXTVAL('horde_perms_id_seq'),
+    perm_id SERIAL UNIQUE,
     perm_name VARCHAR(255) NOT NULL UNIQUE,
     perm_parents VARCHAR(255) NOT NULL,
     perm_data TEXT,