     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;
+
+alter table teams add FOREIGN KEY(current_bot_id) REFERENCES bots (id);

    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))
);
CREATE TABLE games (
    id INTEGER 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, 
    status VARCHAR(14) NOT NULL, 
    challenger_bot_id INTEGER NOT NULL, 
    opponent_bot_id INTEGER NOT NULL, 

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