-- +goose Up
CREATE TABLE
    IF NOT EXISTS links (
        id SERIAL PRIMARY KEY,
        team_id INTEGER,
        game_id INTEGER,
        created_at TIMESTAMP NOT NULL DEFAULT NOW (),
        
        CONSTRAINT fk_links_team FOREIGN KEY (team_id) REFERENCES teams (id) ON DELETE RESTRICT,
        CONSTRAINT fk_links_game FOREIGN KEY (game_id) REFERENCES games (id) ON DELETE RESTRICT
    );

-- +goose Down
DROP TABLE IF EXISTS links;
