open-bounty/resources/migrations/20160820210822-init.up.sql

39 lines
820 B
MySQL
Raw Normal View History

2016-08-28 20:16:45 +00:00
CREATE TABLE users
(
id INTEGER PRIMARY KEY NOT NULL,
login VARCHAR(64) NOT NULL,
name VARCHAR(128),
email VARCHAR(128),
token VARCHAR(40),
address VARCHAR(42),
created TIME
2016-08-20 21:36:30 +00:00
);
2016-08-24 22:46:29 +00:00
CREATE TABLE repositories
(
2016-08-28 20:16:45 +00:00
repo_id INTEGER PRIMARY KEY NOT NULL,
user_id INTEGER,
login VARCHAR(64) NOT NULL,
repo VARCHAR(64) NOT NULL,
updated TIME,
enabled BOOLEAN DEFAULT TRUE,
hook_id INTEGER
2016-08-20 21:36:30 +00:00
);
CREATE TABLE issues
(
2016-08-28 20:16:45 +00:00
issue_id INTEGER PRIMARY KEY NOT NULL,
repo_id INTEGER NOT NULL,
address VARCHAR(256),
issue_number INTEGER,
commit_id VARCHAR(40)
);
CREATE TABLE pull_requests
(
pr_id INTEGER PRIMARY KEY NOT NULL,
repo_id INTEGER,
user_id INTEGER,
parents VARCHAR(4099) -- 100 commit SHAs + 99 commas
);