1 PRAGMA foreign_keys=ON;
    2 
    3 CREATE TABLE company (
    4 	name TEXT NOT NULL,
    5 	id INTEGER PRIMARY KEY,
    6 	somenum INTEGER
    7 );
    8 
    9 ALTER TABLE user ADD COLUMN cid INTEGER NOT NULL REFERENCES company(id) ON DELETE CASCADE;
   10 ALTER TABLE user ADD COLUMN sex INTEGER NOT NULL;
   11 ALTER TABLE user ADD COLUMN hash TEXT NOT NULL;
   12 ALTER TABLE user ADD COLUMN email TEXT UNIQUE NOT NULL;
   13 ALTER TABLE user ADD COLUMN image BLOB;
   14 ALTER TABLE user ADD COLUMN name TEXT NOT NULL;
   15 
   16 ALTER TABLE session ADD COLUMN userid INTEGER NOT NULL REFERENCES user(uid);
   17 ALTER TABLE session ADD COLUMN token INTEGER NOT NULL;
   18 ALTER TABLE session ADD COLUMN mtime INTEGER NOT NULL;
   19