21 lines
476 B
MySQL
21 lines
476 B
MySQL
|
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)
|
||
|
);
|