diff options
| author | tim b <timb@camcompu.home> | 2010-07-03 17:20:54 -0700 |
|---|---|---|
| committer | tim b <timb@camcompu.home> | 2010-07-03 17:20:54 -0700 |
| commit | ef58e04d1dbf1084cbae5a803dce683f555beddb (patch) | |
| tree | c465f0f1ba3ae67a9111795c9159f1a3ff0e4705 /db | |
| parent | 8db58a14273076b4b728ce130c8854289c32064e (diff) | |
add last_login time and last_ip to users table
Diffstat (limited to 'db')
| -rw-r--r-- | db/0-create.psql | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/db/0-create.psql b/db/0-create.psql index 4725c08..5016aa2 100644 --- a/db/0-create.psql +++ b/db/0-create.psql @@ -6,6 +6,9 @@ CREATE TABLE users ( hash text NOT NULL, email text NOT NULL, created_on timestamp NOT NULL DEFAULT now(), + last_login timestamp, + created_ip cidr DEFAULT '0', + last_ip cidr DEFAULT '0', is_admin boolean NOT NULL DEFAULT false, avatar text NOT NULL DEFAULT '', contact text NOT NULL DEFAULT '', @@ -15,6 +18,15 @@ CREATE TABLE users ( ); CREATE INDEX users_nick_lowercase_idx ON users (lower(nick)); +-- ALTER TABLE users +-- ADD COLUMN last_login timestamp; +-- ALTER TABLE users +-- ADD COLUMN created_ip cidr DEFAULT '0'; +-- ALTER TABLE users +-- ADD COLUMN last_ip cidr DEFAULT '0'; + + + CREATE TABLE rooms ( room_id SERIAL PRIMARY KEY, key text UNIQUE NOT NULL, @@ -105,3 +117,21 @@ CREATE TABLE invalid_feed_images ( ); CREATE INDEX invalid_feed_images_idx ON invalid_feed_images (image_url); + +CREATE TABLE avatars ( + avatar_id SERIAL PRIMARY KEY, + user_id NOT NULL REFERENCES users, + created_on timestamp NOT NULL DEFAULT now(), + type text, + url text, + w integer, + h integer, + thumb text, + tw integer, + th integer +); + +CREATE TABLE images ( + image_id SERIAL PRIMARY KEY, + +);
\ No newline at end of file |
