     must_autoaccept BOOLEAN, 
     PRIMARY KEY (id), 
     UNIQUE (name), 
-    FOREIGN KEY(current_bot_id) REFERENCES bots (id), 
-    CHECK (is_disabled IN (0, 1)), 
-    CHECK (must_autoaccept IN (0, 1))
+    CHECK (is_disabled IN (TRUE, FALSE)), 
+    CHECK (must_autoaccept IN (TRUE, FALSE))
+);
+CREATE TABLE users (
+    id SERIAL NOT NULL, 
+    kerberos VARCHAR(128), 
+    team_id INTEGER NOT NULL, 
+    PRIMARY KEY (id), 
+    FOREIGN KEY(team_id) REFERENCES teams (id)
+);
+CREATE TABLE game_requests (
+    id SERIAL NOT NULL, 
+    challenger_id INTEGER NOT NULL, 
+    opponent_id INTEGER NOT NULL, 
+    status VARCHAR(10) NOT NULL, 
+    create_time timestamp, 
+    PRIMARY KEY (id), 
+    FOREIGN KEY(challenger_id) REFERENCES teams (id), 
+    FOREIGN KEY(opponent_id) REFERENCES teams (id), 
+    CONSTRAINT gamerequeststatus CHECK (status IN ('accepted', 'challenged', 'rejected'))
+);
+CREATE TABLE settings (
+    id SERIAL NOT NULL, 
+    "key" VARCHAR(128), 
+    value VARCHAR(128), 
+    PRIMARY KEY (id)
+);
+CREATE TABLE bots (
+    id SERIAL NOT NULL, 
+    team_id INTEGER NOT NULL, 
+    name VARCHAR(128) NOT NULL, 
+    s3_key VARCHAR(256) NOT NULL, 
+    wins INTEGER, 
+    losses INTEGER, 
+    create_time timestamp, 
+    PRIMARY KEY (id), 
+    FOREIGN KEY(team_id) REFERENCES teams (id)
 );
 CREATE TABLE games (
-    id INTEGER NOT NULL, 
+    id SERIAL NOT NULL, 
     game_request_id INTEGER NOT NULL, 
     initiator_id INTEGER NOT NULL, 
     challenger_id INTEGER NOT NULL, 
     opponent_id INTEGER NOT NULL, 
     challenger_elo FLOAT, 
     opponent_elo FLOAT, 
-    create_time DATETIME, 
-    completed_time DATETIME, 
+    create_time timestamp, 
+    completed_time timestamp, 
     status VARCHAR(14) NOT NULL, 
     challenger_bot_id INTEGER NOT NULL, 
     opponent_bot_id INTEGER NOT NULL, 

    FOREIGN KEY(winner_id) REFERENCES teams (id), 
    FOREIGN KEY(loser_id) REFERENCES teams (id)
);
CREATE TABLE bots (
    id INTEGER NOT NULL, 
    team_id INTEGER NOT NULL, 
    name VARCHAR(128) NOT NULL, 
    s3_key VARCHAR(256) NOT NULL, 
    wins INTEGER, 
    losses INTEGER, 
    create_time DATETIME, 
    PRIMARY KEY (id), 
    FOREIGN KEY(team_id) REFERENCES teams (id)
);
CREATE UNIQUE INDEX ix_users_kerberos ON users (kerberos);
CREATE UNIQUE INDEX ix_settings_value ON settings (value);
CREATE UNIQUE INDEX ix_settings_key ON settings ("key");
COMMIT;

CREATE TABLE teams (
    id SERIAL NOT NULL, 
    name VARCHAR(128), 
    elo FLOAT, 
    wins INTEGER, 
