equal
deleted
inserted
replaced
5 plugin_filename varchar(63), |
5 plugin_filename varchar(63), |
6 plugin_flags int, |
6 plugin_flags int, |
7 plugin_version varchar(16), |
7 plugin_version varchar(16), |
8 PRIMARY KEY ( plugin_id ) |
8 PRIMARY KEY ( plugin_id ) |
9 ); |
9 ); |
|
10 |
|
11 -- User title |
|
12 ALTER TABLE {{TABLE_PREFIX}}users ADD COLUMN user_title varchar(64) DEFAULT NULL; |
|
13 |
|
14 -- Modifications to user_rank column |
|
15 -- http://pgsqld.active-venture.com/ddl-alter.html#AEN1984 |
|
16 ALTER TABLE {{TABLE_PREFIX}}users ALTER COLUMN user_rank DROP NOT NULL, |
|
17 ALTER COLUMN user_rank DROP DEFAULT; |
|
18 ALTER TABLE {{TABLE_PREFIX}}users ADD COLUMN user_group int NOT NULL DEFAULT 1; |
|
19 UPDATE {{TABLE_PREFIX}}users SET user_rank = NULL; |
|
20 |
|
21 -- Aggregate function array_accum |
|
22 -- http://www.postgresql.org/docs/current/static/xaggr.html |
|
23 |
|
24 CREATE AGGREGATE {{TABLE_PREFIX}}array_accum (anyelement) |
|
25 ( |
|
26 sfunc = array_append, |
|
27 stype = anyarray, |
|
28 initcond = '{}' |
|
29 ); |
|
30 |
|
31 -- The "guest" rank |
|
32 -- No frontend to this yet so ranks should not have been created. |
|
33 DELETE FROM {{TABLE_PREFIX}}ranks WHERE rank_id = 4; |
|
34 INSERT INTO {{TABLE_PREFIX}}ranks(rank_id, rank_title, rank_style) VALUES |
|
35 (4, 'user_rank_guest', ''); |
|
36 |