-- +goose Up
CREATE TABLE
    IF NOT EXISTS applications (
        id SERIAL PRIMARY KEY,
        name TEXT,
        image TEXT,
        team_id INTEGER,
        status VARCHAR(50) DEFAULT 'need',
        created_at TIMESTAMP NOT NULL DEFAULT NOW (),

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

-- +goose Down
DROP TABLE IF EXISTS applications;
