]>
Dogcows Code - chaz/chatty/blob - db/schema.sql
2 PRAGMA foreign_keys
= ON;
5 id INTEGER PRIMARY KEY,
7 created
TIMESTAMP DEFAULT NOW
10 CREATE TABLE account (
11 id INTEGER PRIMARY KEY,
14 password TEXT NOT NULL,
15 status
TEXT DEFAULT 'active',
16 current_room
INTEGER REFERENCES room(id)
19 CREATE TABLE message (
20 id INTEGER PRIMARY KEY,
21 posted
TIMESTAMP DEFAULT NOW
,
22 author
INTEGER REFERENCES account(id),
23 room
INTEGER REFERENCES room(id),
27 INSERT INTO account (username
, password) VALUES ('chaz', 'mypass');
28 INSERT INTO account (username
, password) VALUES ('jdoe', 'foobar');
This page took 0.029849 seconds and 4 git commands to generate.