CREATE TABLE IF NOT EXISTS external_team
(
    id                 SERIAL PRIMARY KEY,
    external_team_id   character varying,
    external_team_name character varying(100) NOT NULL,
    metadata           jsonb,
    provider_name      character varying(50)  NOT NULL,
    team_id            INTEGER                NOT NULL REFERENCES team (id),
    is_active          BOOLEAN                     DEFAULT true,
    created_at         timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
    updated_at         timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
    created_by         character varying(100),
    updated_by         character varying(100)
);
