Add person table.

Import mail associated with -user specified on commandline.
This commit is contained in:
2014-03-20 22:27:50 -07:00
parent bb8f546fd0
commit 1b8afaa73f
2 changed files with 89 additions and 27 deletions

View File

@@ -1,7 +1,24 @@
DROP TABLE files;
DROP TABLE original;
DROP TABLE person;
CREATE TABLE files (
hash CHAR(40),
path TEXT
);
CREATE TABLE person (
uid SERIAL UNIQUE,
username TEXT,
name TEXT
);
INSERT INTO person (username, name) VALUES ('wathiede', 'Bill Thiede');
CREATE TABLE original (
hash char(40) PRIMARY KEY,
header_size integer,
total_size integer,
blob bytea
)
uid INTEGER REFERENCES person (uid),
hash CHAR(40) PRIMARY KEY,
header_size INTEGER,
total_size INTEGER,
blob BYTEA
);