emacs-collab/init_sql_db.sql

23 lines
548 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,
path VARCHAR (255) NOT NULL,
posixname VARCHAR (32) NOT NULL,
owner VARCHAR (1024),
2017-06-04 17:07:21 +00:00
users VARCHAR (8192),
PRIMARY KEY (uid),
FOREIGN KEY (owner) REFERENCES Users(name)
);