Files
cheesy-arena-lite/db/migrations/20140524180123_CreateMatches.sql

33 lines
650 B
MySQL
Raw Normal View History

2014-05-24 18:52:10 -07:00
-- +goose Up
CREATE TABLE matches (
id INTEGER PRIMARY KEY,
type VARCHAR(16),
displayname VARCHAR(16),
time DATETIME,
elimround int,
2015-05-30 23:58:42 -07:00
elimgroup int,
eliminstance int,
elimredalliance int,
elimbluealliance int,
2014-05-24 18:52:10 -07:00
red1 int,
red1issurrogate bool,
red2 int,
red2issurrogate bool,
red3 int,
red3issurrogate bool,
blue1 int,
blue1issurrogate bool,
blue2 int,
blue2issurrogate bool,
blue3 int,
blue3issurrogate bool,
status VARCHAR(16),
2015-05-30 23:58:42 -07:00
startedat DATETIME,
scorecommittedat DATETIME,
winner VARCHAR(16)
2014-05-24 18:52:10 -07:00
);
CREATE UNIQUE INDEX type_displayname ON matches(type, displayname);
2014-05-24 18:52:10 -07:00
-- +goose Down
2014-05-26 20:16:36 -07:00
DROP TABLE matches;