Index: trunk/extensions/SocialProfile/SystemGifts/systemgifts.pg.sql |
— | — | @@ -1,25 +1,24 @@ |
2 | | - |
3 | 2 | -- Postgres version |
4 | 3 | |
5 | 4 | CREATE TABLE user_system_gift ( |
6 | | - sg_id SERIAL NOT NULL PRIMARY KEY, |
7 | | - sg_gift_id INTEGER NOT NULL DEFAULT 0, |
8 | | - sg_user_id INTEGER NOT NULL DEFAULT 0, |
9 | | - sg_user_name TEXT NOT NULL DEFAULT '', |
10 | | - sg_status INTEGER DEFAULT 1, |
11 | | - sg_date DATE NOT NULL DEFAULT now() |
| 5 | + sg_id SERIAL PRIMARY KEY, |
| 6 | + sg_gift_id INTEGER NOT NULL DEFAULT 0, |
| 7 | + sg_user_id INTEGER NOT NULL DEFAULT 0, |
| 8 | + sg_user_name TEXT NOT NULL DEFAULT '', |
| 9 | + sg_status INTEGER DEFAULT 1, |
| 10 | + sg_date TIMESTAMPTZ NOT NULL DEFAULT now() |
12 | 11 | ); |
13 | 12 | CREATE INDEX sg_gift_id ON user_system_gift(sg_gift_id); |
14 | 13 | CREATE INDEX sg_user_id ON user_system_gift(sg_user_id); |
15 | 14 | |
16 | 15 | CREATE TABLE system_gift ( |
17 | | - gift_id SERIAL NOT NULL PRIMARY KEY, |
18 | | - gift_name TEXT NOT NULL DEFAULT '', |
| 16 | + gift_id SERIAL PRIMARY KEY, |
| 17 | + gift_name TEXT NOT NULL DEFAULT '', |
19 | 18 | gift_description TEXT, |
20 | | - gift_given_count INTEGER DEFAULT 0, |
21 | | - gift_category INTEGER DEFAULT 0, |
22 | | - gift_threshold INTEGER DEFAULT 0, |
23 | | - gift_createdate DATE NOT NULL DEFAULT now() |
| 19 | + gift_given_count INTEGER DEFAULT 0, |
| 20 | + gift_category INTEGER DEFAULT 0, |
| 21 | + gift_threshold INTEGER DEFAULT 0, |
| 22 | + gift_createdate TIMESTAMPTZ NOT NULL DEFAULT now() |
24 | 23 | ); |
25 | 24 | CREATE INDEX system_gift_category ON system_gift(gift_category); |
26 | 25 | CREATE INDEX system_gift_threshold ON system_gift(gift_threshold); |