emacs-collab/init_sql_db.sql

21 lines
476 B
MySQL
Raw Normal View History

2017-06-04 17:07:21 +00:00
CREATE TABLE Users (
name VARCHAR (24) NOT NULL,
passwd VARCHAR (64),
salt VARCHAR (64),
keys VARCHAR (8192),
created DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL,
last_seen DATETIME,
PRIMARY KEY (name)
);
CREATE TABLE Projects (
uid INT NOT NULL,
name VARCHAR (24) NOT NULL,
owner VARCHAR (24) NOT NULL,
users VARCHAR (8192),
PRIMARY KEY (uid),
FOREIGN KEY (owner) REFERENCES Users(name)
);