install/schemas/postgresql_stage2.sql
changeset 401 6ae6e387a0e3
parent 377 bb3e6c3bd4f4
child 406 7468a663315f
--- a/install/schemas/postgresql_stage2.sql	Mon Feb 04 05:52:12 2008 -0500
+++ b/install/schemas/postgresql_stage2.sql	Wed Feb 06 18:41:47 2008 -0500
@@ -104,6 +104,7 @@
   user_has_avatar smallint NOT NULL,
   avatar_type varchar(3) NOT NULL,
   user_registration_ip varchar(39),
+  user_rank int NOT NULL DEFAULT 1,
   CHECK (avatar_type IN ('jpg', 'png', 'gif')),
   PRIMARY KEY  (user_id)
 );
@@ -277,6 +278,25 @@
   string_content text NOT NULL
 );
 
+-- Added in 1.1.1
+
+CREATE TABLE {{TABLE_PREFIX}}ranks(
+  rank_id SERIAL,
+  rank_title varchar(63) NOT NULL DEFAULT '',
+  rank_style varchar(255) NOT NULL DEFAULT ''
+);
+
+-- Added in 1.1.1
+
+CREATE TABLE {{TABLE_PREFIX}}captcha(
+  code_id SERIAL,
+  session_id varchar(40) NOT NULL DEFAULT '',
+  code varchar(64) NOT NULL DEFAULT '',
+  session_data text,
+  source_ip varchar(39),
+  user_id int
+);
+
 INSERT INTO {{TABLE_PREFIX}}config(config_name, config_value) VALUES
   ('site_name', '{{SITE_NAME}}'),
   ('main_page', 'Main_Page'),
@@ -324,6 +344,11 @@
   
 INSERT INTO {{TABLE_PREFIX}}users_extra(user_id) VALUES
   (2);
+  
+INSERT INTO {{TABLE_PREFIX}}ranks(rank_id, rank_title, rank_style) VALUES
+  (1, 'user_rank_member', ''),
+  (2, 'user_rank_mod', 'font-weight: bold; color: #00AA00;'),
+  (3, 'user_rank_admin', 'font-weight: bold; color: #AA0000;');
 
 INSERT INTO {{TABLE_PREFIX}}groups(group_id,group_name,group_type,system_group) VALUES(1, 'Everyone', 3, 1),
   (2,'Administrators',3,1),