storj/pkg/satellite/satellitedb/dbx/satellitedb.dbx.sqlite3.sql
Yehor Butko 75213fa633
V3-663 Extend database with Project entity (#622)
* V3-663 Extend database with Project entity

* fixing linter
2018-11-13 10:27:42 +02:00

34 lines
840 B
SQL

-- AUTOGENERATED BY gopkg.in/spacemonkeygo/dbx.v1
-- DO NOT EDIT
CREATE TABLE users (
id BLOB NOT NULL,
first_name TEXT NOT NULL,
last_name TEXT NOT NULL,
email TEXT NOT NULL,
password_hash BLOB NOT NULL,
created_at TIMESTAMP NOT NULL,
PRIMARY KEY ( id ),
UNIQUE ( email )
);
CREATE TABLE companies (
id BLOB NOT NULL,
user_id BLOB NOT NULL REFERENCES users( id ) ON DELETE CASCADE,
name TEXT NOT NULL,
address TEXT NOT NULL,
country TEXT NOT NULL,
city TEXT NOT NULL,
state TEXT NOT NULL,
postal_code TEXT NOT NULL,
created_at TIMESTAMP NOT NULL,
PRIMARY KEY ( id )
);
CREATE TABLE projects (
id BLOB NOT NULL,
user_id BLOB NOT NULL REFERENCES users( id ) ON DELETE CASCADE,
name TEXT NOT NULL,
description TEXT NOT NULL,
is_agreed_with_terms INTEGER NOT NULL,
created_at TIMESTAMP NOT NULL,
PRIMARY KEY ( id )
);