-- +goose Up
CREATE TABLE
    IF NOT EXISTS actions (
        id SERIAL PRIMARY KEY,
        code TEXT,
        team_id INTEGER,
        created_at TIMESTAMP NOT NULL DEFAULT NOW (),

        CONSTRAINT fk_actions_team FOREIGN KEY (team_id) REFERENCES teams (id) ON DELETE CASCADE
    );

-- +goose Down
DROP TABLE IF EXISTS actions;
