Fixed ranks table under PostgreSQL. FIXME, only affects new installations and upgrades, if this bug is encountered in the wild we might want to look at auto-integrating a fix.
authorDan
Sun, 06 Dec 2009 21:56:46 -0500
changeset 1151 8f0cbce6d5f3
parent 1150 eb4a10b9b7aa
child 1152 e3fb74e3e74e
Fixed ranks table under PostgreSQL. FIXME, only affects new installations and upgrades, if this bug is encountered in the wild we might want to look at auto-integrating a fix.
install/schemas/postgresql_stage2.sql
install/schemas/upgrade/1.1.1-1.1.2-postgresql.sql
install/schemas/upgrade/1.1.3-1.1.4-postgresql.sql
--- a/install/schemas/postgresql_stage2.sql	Sun Dec 06 21:54:55 2009 -0500
+++ b/install/schemas/postgresql_stage2.sql	Sun Dec 06 21:56:46 2009 -0500
@@ -384,6 +384,9 @@
   (2, 'user_rank_mod', 'font-weight: bold; color: #00AA00;'),
   (3, 'user_rank_admin', 'font-weight: bold; color: #AA0000;'),
   (4, 'user_rank_guest', '');
+  
+-- For some reason this is required, it came up in my QA testing on a2hosting
+SELECT NEXTVAL('{{TABLE_PREFIX}}ranks_rank_id_seq'::regclass);
 
 INSERT INTO {{TABLE_PREFIX}}groups(group_id,group_name,group_type,system_group) VALUES(1, 'Everyone', 3, 1),
   (2,'Administrators',3,1),
--- a/install/schemas/upgrade/1.1.1-1.1.2-postgresql.sql	Sun Dec 06 21:54:55 2009 -0500
+++ b/install/schemas/upgrade/1.1.1-1.1.2-postgresql.sql	Sun Dec 06 21:56:46 2009 -0500
@@ -35,3 +35,6 @@
   (2, 'user_rank_mod', 'font-weight: bold; color: #00AA00;'),
   (3, 'user_rank_admin', 'font-weight: bold; color: #AA0000;');
 
+-- For some reason this is required, it came up in my QA testing on a2hosting
+SELECT NEXTVAL('{{TABLE_PREFIX}}ranks_rank_id_seq'::regclass);
+
--- a/install/schemas/upgrade/1.1.3-1.1.4-postgresql.sql	Sun Dec 06 21:54:55 2009 -0500
+++ b/install/schemas/upgrade/1.1.3-1.1.4-postgresql.sql	Sun Dec 06 21:56:46 2009 -0500
@@ -33,6 +33,9 @@
 DELETE FROM {{TABLE_PREFIX}}ranks WHERE rank_id = 4;
 INSERT INTO {{TABLE_PREFIX}}ranks(rank_id, rank_title, rank_style) VALUES
   (4, 'user_rank_guest', '');
+  
+-- For some reason this is required, it came up in my QA testing on a2hosting
+SELECT NEXTVAL('{{TABLE_PREFIX}}ranks_rank_id_seq'::regclass);
 
 -- Other rank-related columns
 ALTER TABLE {{TABLE_PREFIX}}groups ADD COLUMN group_rank int DEFAULT NULL;