Index: trunk/extensions/SocialProfile/SystemGifts/systemgifts.pg.sql |
— | — | @@ -0,0 +1,25 @@ |
| 2 | + |
| 3 | +-- Postgres version |
| 4 | + |
| 5 | +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() |
| 12 | +); |
| 13 | +CREATE INDEX sg_gift_id ON user_system_gift(sg_gift_id); |
| 14 | +CREATE INDEX sg_user_id ON user_system_gift(sg_user_id); |
| 15 | + |
| 16 | +CREATE TABLE system_gift ( |
| 17 | + gift_id SERIAL NOT NULL PRIMARY KEY, |
| 18 | + gift_name TEXT NOT NULL DEFAULT '', |
| 19 | + 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() |
| 24 | +); |
| 25 | +CREATE INDEX system_gift_category ON system_gift(gift_category); |
| 26 | +CREATE INDEX system_gift_threshold ON system_gift(gift_threshold); |