-- Add Zentropi signal type and config table
ALTER TYPE public.enum_signals_type ADD VALUE IF NOT EXISTS 'ZENTROPI_LABELER';

CREATE TABLE IF NOT EXISTS signal_auth_service.zentropi_configs (
    org_id character varying(255) NOT NULL,
    created_at timestamp with time zone DEFAULT now() NOT NULL,
    updated_at timestamp with time zone DEFAULT now() NOT NULL,
    api_key character varying(255) NOT NULL,
    labeler_versions JSONB DEFAULT '[]'
);

ALTER TABLE signal_auth_service.zentropi_configs OWNER TO CURRENT_USER;

ALTER TABLE ONLY signal_auth_service.zentropi_configs
    ADD CONSTRAINT zentropi_configs_pkey PRIMARY KEY (org_id);
