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