7fd9824cf3e213289c8d5858dcc24ca041ae5e73
[chaz/chatty] / db / schema.sql
1
2 PRAGMA foreign_keys = ON;
3
4 CREATE TABLE account (
5 id INTEGER PRIMARY KEY,
6 email TEXT,
7 username TEXT UNIQUE,
8 password TEXT NOT NULL,
9 status TEXT DEFAULT 'active'
10 );
11
12 CREATE TABLE message (
13 id INTEGER PRIMARY KEY,
14 posted TIMESTAMP,
15 author INTEGER REFERENCES account(id),
16 content TEXT
17 );
18
19 INSERT INTO account (username, password) VALUES ('chaz', 'mypass');
20 INSERT INTO account (username, password) VALUES ('jdoe', 'foobar');
21
This page took 0.037203 seconds and 3 git commands to generate.