CREATE EXTENSION IF NOT EXISTS citext WITH SCHEMA public;


--
-- Name: EXTENSION citext; Type: COMMENT; Schema: -; Owner: 
--

COMMENT ON EXTENSION citext IS 'data type for case-insensitive character strings';


--
-- Name: address_type_enum; Type: TYPE; Schema: public; Owner: infini_automation_deploy
--

CREATE TYPE public.address_type_enum AS ENUM (
    'billing_address',
    'invoice_address',
    'user_address',
    'venue_address'
);


ALTER TYPE public.address_type_enum OWNER TO infini_automation_deploy;

--
-- Name: approval_status_enum; Type: TYPE; Schema: public; Owner: infini_automation_deploy
--

CREATE TYPE public.approval_status_enum AS ENUM (
    'pending',
    'approved',
    'rejected',
    'under_review',
    'on_hold',
    'cancelled'
);


ALTER TYPE public.approval_status_enum OWNER TO infini_automation_deploy;

--
-- Name: basic_details_status_enum; Type: TYPE; Schema: public; Owner: infini_automation_deploy
--

CREATE TYPE public.basic_details_status_enum AS ENUM (
    'draft',
    'pending',
    'waitlisted',
    'completed',
    'rejected',
    'save_as_draft'
);


ALTER TYPE public.basic_details_status_enum OWNER TO infini_automation_deploy;

--
-- Name: communication_category_enum; Type: TYPE; Schema: public; Owner: infini_automation_deploy
--

CREATE TYPE public.communication_category_enum AS ENUM (
    'hdb_blessed',
    'hdb_seeker_pending',
    'hdb_hold',
    'hdb_reject'
);


ALTER TYPE public.communication_category_enum OWNER TO infini_automation_deploy;

--
-- Name: communication_status_enum; Type: TYPE; Schema: public; Owner: infini_automation_deploy
--

CREATE TYPE public.communication_status_enum AS ENUM (
    'initiated',
    'success',
    'failed'
);


ALTER TYPE public.communication_status_enum OWNER TO infini_automation_deploy;

--
-- Name: communication_type_enum; Type: TYPE; Schema: public; Owner: infini_automation_deploy
--

CREATE TYPE public.communication_type_enum AS ENUM (
    'whatsapp',
    'email'
);


ALTER TYPE public.communication_type_enum OWNER TO infini_automation_deploy;

--
-- Name: frequency_enum; Type: TYPE; Schema: public; Owner: infini_automation_deploy
--

CREATE TYPE public.frequency_enum AS ENUM (
    'weekly',
    'monthly',
    'yearly',
    'one_time'
);


ALTER TYPE public.frequency_enum OWNER TO infini_automation_deploy;

--
-- Name: gateway_payment_status_enum; Type: TYPE; Schema: public; Owner: infini_automation_deploy
--

CREATE TYPE public.gateway_payment_status_enum AS ENUM (
    'failed',
    'captured',
    'authorized'
);


ALTER TYPE public.gateway_payment_status_enum OWNER TO infini_automation_deploy;

--
-- Name: gender_enum; Type: TYPE; Schema: public; Owner: infini_automation_deploy
--

CREATE TYPE public.gender_enum AS ENUM (
    'Male',
    'Female',
    'Other',
    'Prefer Not To Say'
);


ALTER TYPE public.gender_enum OWNER TO infini_automation_deploy;

--
-- Name: hdb_common_status_enum; Type: TYPE; Schema: public; Owner: infini_automation_deploy
--

CREATE TYPE public.hdb_common_status_enum AS ENUM (
    'draft',
    'active',
    'inactive',
    'published',
    'archived'
);


ALTER TYPE public.hdb_common_status_enum OWNER TO infini_automation_deploy;

--
-- Name: hdb_option_type_enum; Type: TYPE; Schema: public; Owner: infini_automation_deploy
--

CREATE TYPE public.hdb_option_type_enum AS ENUM (
    'string',
    'number',
    'boolean',
    'date',
    'timestamp',
    'image',
    'file',
    'object',
    'enum',
    'color',
    'primarybutton',
    'secondarybutton'
);


ALTER TYPE public.hdb_option_type_enum OWNER TO infini_automation_deploy;

--
-- Name: id_type_enum; Type: TYPE; Schema: public; Owner: infini_automation_deploy
--

CREATE TYPE public.id_type_enum AS ENUM (
    'passport',
    'aadhar',
    'driving_license',
    'voter_id',
    'pan_card',
    'Passport',
    'Aadhar',
    'Voter id',
    'Driving license',
    'Pan card'
);


ALTER TYPE public.id_type_enum OWNER TO infini_automation_deploy;

--
-- Name: invoice_status_enum; Type: TYPE; Schema: public; Owner: infini_automation_deploy
--

CREATE TYPE public.invoice_status_enum AS ENUM (
    'draft',
    'invoice_pending',
    'invoice_completed',
    'save_as_draft'
);


ALTER TYPE public.invoice_status_enum OWNER TO infini_automation_deploy;

--
-- Name: invoice_type_enum; Type: TYPE; Schema: public; Owner: infini_automation_deploy
--

CREATE TYPE public.invoice_type_enum AS ENUM (
    'online',
    'offline'
);


ALTER TYPE public.invoice_type_enum OWNER TO infini_automation_deploy;

--
-- Name: mode_of_operation_enum; Type: TYPE; Schema: public; Owner: infini_automation_deploy
--

CREATE TYPE public.mode_of_operation_enum AS ENUM (
    'online',
    'offline',
    'hybrid'
);


ALTER TYPE public.mode_of_operation_enum OWNER TO infini_automation_deploy;

--
-- Name: online_type_enum; Type: TYPE; Schema: public; Owner: infini_automation_deploy
--

CREATE TYPE public.online_type_enum AS ENUM (
    'meeting',
    'webinar',
    'live_stream',
    'NA'
);


ALTER TYPE public.online_type_enum OWNER TO infini_automation_deploy;

--
-- Name: origin_type_enum; Type: TYPE; Schema: public; Owner: infini_automation_deploy
--

CREATE TYPE public.origin_type_enum AS ENUM (
    'migrated',
    'code_inserted'
);


ALTER TYPE public.origin_type_enum OWNER TO infini_automation_deploy;

--
-- Name: parental_form_status_enum; Type: TYPE; Schema: public; Owner: infini_automation_deploy
--

CREATE TYPE public.parental_form_status_enum AS ENUM (
    'pending',
    'completed',
    'not_applicable'
);


ALTER TYPE public.parental_form_status_enum OWNER TO infini_automation_deploy;

--
-- Name: payment_mode_enum; Type: TYPE; Schema: public; Owner: infini_automation_deploy
--

CREATE TYPE public.payment_mode_enum AS ENUM (
    'online',
    'offline',
    'Cheque',
    'Direct bank transfer (NEFT/RTGS)',
    'Card swipe',
    'Cash',
    'Online (Through Razorpay)'
);


ALTER TYPE public.payment_mode_enum OWNER TO infini_automation_deploy;

--
-- Name: payment_status_enum; Type: TYPE; Schema: public; Owner: infini_automation_deploy
--

CREATE TYPE public.payment_status_enum AS ENUM (
    'draft',
    'online_pending',
    'online_completed',
    'offline_pending',
    'offline_completed',
    'save_as_draft',
    'failed'
);


ALTER TYPE public.payment_status_enum OWNER TO infini_automation_deploy;

--
-- Name: person_type_enum; Type: TYPE; Schema: public; Owner: infini_automation_deploy
--

CREATE TYPE public.person_type_enum AS ENUM (
    'child',
    'adult',
    'elder'
);


ALTER TYPE public.person_type_enum OWNER TO infini_automation_deploy;

--
-- Name: program_status_enum; Type: TYPE; Schema: public; Owner: infini_automation_deploy
--

CREATE TYPE public.program_status_enum AS ENUM (
    'draft',
    'active',
    'registration_open',
    'registration_closed',
    'completed',
    'cancelled',
    'published',
    'internal'
);


ALTER TYPE public.program_status_enum OWNER TO infini_automation_deploy;

--
-- Name: recommendation_level; Type: TYPE; Schema: public; Owner: infini_automation_deploy
--

CREATE TYPE public.recommendation_level AS ENUM (
    'Wholeheartedly',
    'Affirmatively',
    'Supportively'
);


ALTER TYPE public.recommendation_level OWNER TO infini_automation_deploy;

--
-- Name: registration_level_enum; Type: TYPE; Schema: public; Owner: infini_automation_deploy
--

CREATE TYPE public.registration_level_enum AS ENUM (
    'program',
    'session',
    'both'
);


ALTER TYPE public.registration_level_enum OWNER TO infini_automation_deploy;

--
-- Name: registration_status_enum; Type: TYPE; Schema: public; Owner: infini_automation_deploy
--

CREATE TYPE public.registration_status_enum AS ENUM (
    'draft',
    'pending_approval',
    'waitlisted',
    'completed',
    'cancelled',
    'pending',
    'rejected',
    'offline_pending',
    'on_hold',
    'save_as_draft',
    'attempted'
);


ALTER TYPE public.registration_status_enum OWNER TO infini_automation_deploy;

--
-- Name: request_status_enum; Type: TYPE; Schema: public; Owner: infini_automation_deploy
--

CREATE TYPE public.request_status_enum AS ENUM (
    'requested',
    'closed',
    'completed'
);


ALTER TYPE public.request_status_enum OWNER TO infini_automation_deploy;

--
-- Name: room_category_enum; Type: TYPE; Schema: public; Owner: infini_automation_deploy
--

CREATE TYPE public.room_category_enum AS ENUM (
    'general',
    'physically_challenged',
    'senior_citizens',
    'children'
);


ALTER TYPE public.room_category_enum OWNER TO infini_automation_deploy;

--
-- Name: room_status_enum; Type: TYPE; Schema: public; Owner: infini_automation_deploy
--

CREATE TYPE public.room_status_enum AS ENUM (
    'AVAILABLE',
    'PARTIALLY_ALLOTTED',
    'ALLOTTED',
    'RESERVED'
);


ALTER TYPE public.room_status_enum OWNER TO infini_automation_deploy;

--
-- Name: seeker_defaulter_action_enum; Type: TYPE; Schema: public; Owner: infini_automation_deploy
--

CREATE TYPE public.seeker_defaulter_action_enum AS ENUM (
    'MARKED',
    'UNMARKED',
    'COMMENT_UPDATED'
);


ALTER TYPE public.seeker_defaulter_action_enum OWNER TO infini_automation_deploy;

--
-- Name: session_status_enum; Type: TYPE; Schema: public; Owner: infini_automation_deploy
--

CREATE TYPE public.session_status_enum AS ENUM (
    'scheduled',
    'active',
    'completed',
    'cancelled',
    'postponed',
    'draft'
);


ALTER TYPE public.session_status_enum OWNER TO infini_automation_deploy;

--
-- Name: sub_program_type_enum; Type: TYPE; Schema: public; Owner: infini_automation_deploy
--

CREATE TYPE public.sub_program_type_enum AS ENUM (
    'PST_HDB',
    'PST_MSD',
    'PST_ENTRAINMENT',
    'PST_TAT'
);


ALTER TYPE public.sub_program_type_enum OWNER TO infini_automation_deploy;

--
-- Name: tds_applicability_enum; Type: TYPE; Schema: public; Owner: infini_automation_deploy
--

CREATE TYPE public.tds_applicability_enum AS ENUM (
    'base_only',
    'base_plus_tax'
);


ALTER TYPE public.tds_applicability_enum OWNER TO infini_automation_deploy;

--
-- Name: template_key_enum; Type: TYPE; Schema: public; Owner: infini_automation_deploy
--

CREATE TYPE public.template_key_enum AS ENUM (
    'hdb_first_timer',
    'hdb_checklist',
    'hdb_preparatory'
);


ALTER TYPE public.template_key_enum OWNER TO infini_automation_deploy;

--
-- Name: travel_status_enum; Type: TYPE; Schema: public; Owner: infini_automation_deploy
--

CREATE TYPE public.travel_status_enum AS ENUM (
    'draft',
    'pending',
    'completed',
    'save_as_draft'
);


ALTER TYPE public.travel_status_enum OWNER TO infini_automation_deploy;

--
-- Name: travel_type_enum; Type: TYPE; Schema: public; Owner: infini_automation_deploy
--

CREATE TYPE public.travel_type_enum AS ENUM (
    'flight',
    'own_transport',
    'city_pickup',
    'city_drop',
    'city_pick_up'
);


ALTER TYPE public.travel_type_enum OWNER TO infini_automation_deploy;

--
-- Name: tshirt_size_enum; Type: TYPE; Schema: public; Owner: infini_automation_deploy
--

CREATE TYPE public.tshirt_size_enum AS ENUM (
    'XS',
    'S',
    'M',
    'L',
    'XL',
    'XXL',
    'XXXL',
    'XXXXL'
);


ALTER TYPE public.tshirt_size_enum OWNER TO infini_automation_deploy;

--
-- Name: user_session_status_enum; Type: TYPE; Schema: public; Owner: infini_automation_deploy
--

CREATE TYPE public.user_session_status_enum AS ENUM (
    'initiated',
    'validated',
    'logged_out',
    'expired',
    'failed'
);


ALTER TYPE public.user_session_status_enum OWNER TO infini_automation_deploy;

--
-- Name: user_type_enum; Type: TYPE; Schema: public; Owner: infini_automation_deploy
--

CREATE TYPE public.user_type_enum AS ENUM (
    'Seeker',
    'Org',
    'AI',
    'System'
);


ALTER TYPE public.user_type_enum OWNER TO infini_automation_deploy;



--
-- Name: assets; Type: TABLE; Schema: public; Owner: infini_automation_deploy
--

CREATE TABLE public.assets (
    id integer NOT NULL,
    name character varying(255),
    url character varying(255),
    "createdAt" timestamp with time zone NOT NULL,
    "updatedAt" timestamp with time zone NOT NULL
);


ALTER TABLE public.assets OWNER TO infini_automation_deploy;

--
-- Name: assets_id_seq; Type: SEQUENCE; Schema: public; Owner: infini_automation_deploy
--

CREATE SEQUENCE public.assets_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.assets_id_seq OWNER TO infini_automation_deploy;

--
-- Name: assets_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: infini_automation_deploy
--

ALTER SEQUENCE public.assets_id_seq OWNED BY public.assets.id;


--
-- Name: audit_history_log; Type: TABLE; Schema: public; Owner: infini_automation_deploy
--

CREATE TABLE public.audit_history_log (
    id integer NOT NULL,
    entity_type character varying(100) NOT NULL,
    entity_name character varying(100) NOT NULL,
    entity_id character varying(100) NOT NULL,
    action character varying(10) NOT NULL,
    user_id character varying(100),
    ip_address character varying(45),
    user_agent character varying(500),
    request_id character varying(100),
    metadata jsonb,
    type character varying(10) DEFAULT 'AUDIT'::character varying NOT NULL,
    created_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP NOT NULL,
    api_endpoint character varying(255),
    http_method character varying(10),
    parent_ref_id character varying(100)
);


ALTER TABLE public.audit_history_log OWNER TO infini_automation_deploy;

--
-- Name: audit_history_log_detail; Type: TABLE; Schema: public; Owner: infini_automation_deploy
--

CREATE TABLE public.audit_history_log_detail (
    id integer NOT NULL,
    audit_log_id integer NOT NULL,
    field_name character varying(100) NOT NULL,
    old_value jsonb,
    new_value jsonb,
    field_type character varying(50) NOT NULL
);


ALTER TABLE public.audit_history_log_detail OWNER TO infini_automation_deploy;

--
-- Name: audit_history_log_detail_id_seq; Type: SEQUENCE; Schema: public; Owner: infini_automation_deploy
--

CREATE SEQUENCE public.audit_history_log_detail_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.audit_history_log_detail_id_seq OWNER TO infini_automation_deploy;

--
-- Name: audit_history_log_detail_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: infini_automation_deploy
--

ALTER SEQUENCE public.audit_history_log_detail_id_seq OWNED BY public.audit_history_log_detail.id;


--
-- Name: audit_history_log_id_seq; Type: SEQUENCE; Schema: public; Owner: infini_automation_deploy
--

CREATE SEQUENCE public.audit_history_log_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.audit_history_log_id_seq OWNER TO infini_automation_deploy;

--
-- Name: audit_history_log_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: infini_automation_deploy
--

ALTER SEQUENCE public.audit_history_log_id_seq OWNED BY public.audit_history_log.id;


--
-- Name: block; Type: TABLE; Schema: public; Owner: infini_automation_deploy
--

CREATE TABLE public.block (
    id bigint NOT NULL,
    label character varying(255) NOT NULL,
    description text,
    venue_id bigint NOT NULL,
    created_at timestamp without time zone NOT NULL,
    updated_at timestamp without time zone,
    deleted_at timestamp without time zone,
    created_by bigint NOT NULL,
    updated_by bigint
);


ALTER TABLE public.block OWNER TO infini_automation_deploy;

--
-- Name: block_id_seq; Type: SEQUENCE; Schema: public; Owner: infini_automation_deploy
--

CREATE SEQUENCE public.block_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.block_id_seq OWNER TO infini_automation_deploy;

--
-- Name: block_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: infini_automation_deploy
--

ALTER SEQUENCE public.block_id_seq OWNED BY public.block.id;


--
-- Name: configuration; Type: TABLE; Schema: public; Owner: infini_automation_deploy
--

CREATE TABLE public.configuration (
    id integer NOT NULL,
    key character varying(255) NOT NULL,
    value boolean NOT NULL,
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
    updated_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP
);


ALTER TABLE public.configuration OWNER TO infini_automation_deploy;

--
-- Name: configuration_id_seq; Type: SEQUENCE; Schema: public; Owner: infini_automation_deploy
--

CREATE SEQUENCE public.configuration_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.configuration_id_seq OWNER TO infini_automation_deploy;

--
-- Name: configuration_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: infini_automation_deploy
--

ALTER SEQUENCE public.configuration_id_seq OWNED BY public.configuration.id;


--
-- Name: feature_flag; Type: TABLE; Schema: public; Owner: infini_automation_deploy
--

CREATE TABLE public.feature_flag (
    id integer NOT NULL,
    feature_key character varying(255) NOT NULL,
    label character varying(255) NOT NULL,
    description character varying(512),
    flag boolean DEFAULT false NOT NULL,
    status character varying(50) DEFAULT 'active'::character varying NOT NULL,
    created_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP NOT NULL,
    updated_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP NOT NULL,
    deleted_at timestamp with time zone,
    created_by integer,
    updated_by integer
);


ALTER TABLE public.feature_flag OWNER TO infini_automation_deploy;

--
-- Name: feature_flag_id_seq; Type: SEQUENCE; Schema: public; Owner: infini_automation_deploy
--

CREATE SEQUENCE public.feature_flag_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.feature_flag_id_seq OWNER TO infini_automation_deploy;

--
-- Name: feature_flag_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: infini_automation_deploy
--

ALTER SEQUENCE public.feature_flag_id_seq OWNED BY public.feature_flag.id;


--
-- Name: floor; Type: TABLE; Schema: public; Owner: infini_automation_deploy
--

CREATE TABLE public.floor (
    id bigint NOT NULL,
    label character varying(255) NOT NULL,
    description text,
    block_id bigint NOT NULL,
    created_at timestamp without time zone NOT NULL,
    updated_at timestamp without time zone,
    deleted_at timestamp without time zone,
    created_by bigint NOT NULL,
    updated_by bigint
);


ALTER TABLE public.floor OWNER TO infini_automation_deploy;

--
-- Name: floor_id_seq; Type: SEQUENCE; Schema: public; Owner: infini_automation_deploy
--

CREATE SEQUENCE public.floor_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.floor_id_seq OWNER TO infini_automation_deploy;

--
-- Name: floor_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: infini_automation_deploy
--

ALTER SEQUENCE public.floor_id_seq OWNED BY public.floor.id;


--
-- Name: groups; Type: TABLE; Schema: public; Owner: infini_automation_deploy
--

CREATE TABLE public.groups (
    id integer NOT NULL,
    group_name character varying(255) NOT NULL,
    created_by integer NOT NULL,
    updated_by integer NOT NULL,
    created_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP NOT NULL,
    updated_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP NOT NULL,
    deleted_at timestamp with time zone
);


ALTER TABLE public.groups OWNER TO infini_automation_deploy;

--
-- Name: groups_id_seq; Type: SEQUENCE; Schema: public; Owner: infini_automation_deploy
--

CREATE SEQUENCE public.groups_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.groups_id_seq OWNER TO infini_automation_deploy;

--
-- Name: groups_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: infini_automation_deploy
--

ALTER SEQUENCE public.groups_id_seq OWNED BY public.groups.id;


--
-- Name: hdb_address; Type: TABLE; Schema: public; Owner: infini_automation_deploy
--

CREATE TABLE public.hdb_address (
    address_id integer NOT NULL,
    location_id integer,
    addr_1 character varying(255),
    addr_2 character varying(255),
    landmark character varying(255),
    city character varying(100),
    state character varying(100),
    country character varying(100),
    pincode character varying(20),
    lat numeric(9,6),
    long numeric(9,6),
    type public.address_type_enum,
    created_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP,
    updated_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP,
    created_by character varying(255),
    updated_by character varying(255)
);


ALTER TABLE public.hdb_address OWNER TO infini_automation_deploy;

--
-- Name: hdb_address_address_id_seq; Type: SEQUENCE; Schema: public; Owner: infini_automation_deploy
--

CREATE SEQUENCE public.hdb_address_address_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.hdb_address_address_id_seq OWNER TO infini_automation_deploy;

--
-- Name: hdb_address_address_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: infini_automation_deploy
--

ALTER SEQUENCE public.hdb_address_address_id_seq OWNED BY public.hdb_address.address_id;


--
-- Name: hdb_cancellation_reason; Type: TABLE; Schema: public; Owner: infini_automation_deploy
--

CREATE TABLE public.hdb_cancellation_reason (
    id integer NOT NULL,
    reason_key character varying(255) NOT NULL,
    display_name character varying(255) NOT NULL,
    description text,
    status public.hdb_common_status_enum DEFAULT 'active'::public.hdb_common_status_enum,
    created_by bigint,
    updated_by bigint,
    created_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP,
    updated_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP,
    deleted_at timestamp with time zone
);


ALTER TABLE public.hdb_cancellation_reason OWNER TO infini_automation_deploy;

--
-- Name: hdb_cancellation_reason_id_seq; Type: SEQUENCE; Schema: public; Owner: infini_automation_deploy
--

CREATE SEQUENCE public.hdb_cancellation_reason_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.hdb_cancellation_reason_id_seq OWNER TO infini_automation_deploy;

--
-- Name: hdb_cancellation_reason_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: infini_automation_deploy
--

ALTER SEQUENCE public.hdb_cancellation_reason_id_seq OWNED BY public.hdb_cancellation_reason.id;


--
-- Name: hdb_communication_templates; Type: TABLE; Schema: public; Owner: infini_automation_deploy
--

CREATE TABLE public.hdb_communication_templates (
    id integer NOT NULL,
    template_id text NOT NULL,
    template_key public.template_key_enum NOT NULL,
    template_content text NOT NULL,
    template_type public.communication_type_enum NOT NULL,
    created_at timestamp without time zone,
    updated_at timestamp without time zone,
    category public.communication_category_enum,
    program_key character varying(100)
);


ALTER TABLE public.hdb_communication_templates OWNER TO infini_automation_deploy;

--
-- Name: hdb_communication_templates_id_seq; Type: SEQUENCE; Schema: public; Owner: infini_automation_deploy
--

CREATE SEQUENCE public.hdb_communication_templates_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.hdb_communication_templates_id_seq OWNER TO infini_automation_deploy;

--
-- Name: hdb_communication_templates_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: infini_automation_deploy
--

ALTER SEQUENCE public.hdb_communication_templates_id_seq OWNED BY public.hdb_communication_templates.id;


--
-- Name: hdb_communication_track; Type: TABLE; Schema: public; Owner: infini_automation_deploy
--

CREATE TABLE public.hdb_communication_track (
    id bigint NOT NULL,
    registration_id bigint NOT NULL,
    typ public.communication_type_enum,
    stats public.communication_status_enum DEFAULT 'initiated'::public.communication_status_enum NOT NULL,
    failed_reason text,
    created_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP,
    updated_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP,
    created_by bigint,
    updated_by bigint,
    audit_ref_id bigint,
    parent_ref_id bigint
);


ALTER TABLE public.hdb_communication_track OWNER TO infini_automation_deploy;

--
-- Name: COLUMN hdb_communication_track.audit_ref_id; Type: COMMENT; Schema: public; Owner: infini_automation_deploy
--

COMMENT ON COLUMN public.hdb_communication_track.audit_ref_id IS 'Reference ID for audit tracking, typically the entity ID itself';


--
-- Name: COLUMN hdb_communication_track.parent_ref_id; Type: COMMENT; Schema: public; Owner: infini_automation_deploy
--

COMMENT ON COLUMN public.hdb_communication_track.parent_ref_id IS 'Parent reference ID for audit tracking, typically the entity ID itself';


--
-- Name: hdb_communication_track_id_seq; Type: SEQUENCE; Schema: public; Owner: infini_automation_deploy
--

CREATE SEQUENCE public.hdb_communication_track_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.hdb_communication_track_id_seq OWNER TO infini_automation_deploy;

--
-- Name: hdb_communication_track_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: infini_automation_deploy
--

ALTER SEQUENCE public.hdb_communication_track_id_seq OWNED BY public.hdb_communication_track.id;


--
-- Name: hdb_form_section; Type: TABLE; Schema: public; Owner: infini_automation_deploy
--

CREATE TABLE public.hdb_form_section (
    id integer NOT NULL,
    name character varying(255) NOT NULL,
    description text,
    created_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP,
    updated_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP,
    deleted_at timestamp with time zone,
    created_by integer,
    updated_by integer,
    display_order integer DEFAULT 0,
    key character varying(255) DEFAULT NULL::character varying
);


ALTER TABLE public.hdb_form_section OWNER TO infini_automation_deploy;

--
-- Name: hdb_form_section_id_seq; Type: SEQUENCE; Schema: public; Owner: infini_automation_deploy
--

CREATE SEQUENCE public.hdb_form_section_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.hdb_form_section_id_seq OWNER TO infini_automation_deploy;

--
-- Name: hdb_form_section_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: infini_automation_deploy
--

ALTER SEQUENCE public.hdb_form_section_id_seq OWNED BY public.hdb_form_section.id;


--
-- Name: hdb_option; Type: TABLE; Schema: public; Owner: infini_automation_deploy
--

CREATE TABLE public.hdb_option (
    id integer NOT NULL,
    typ public.hdb_option_type_enum NOT NULL,
    category_id integer,
    created_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP,
    updated_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP,
    deleted_at timestamp with time zone,
    stats public.hdb_common_status_enum DEFAULT 'draft'::public.hdb_common_status_enum,
    created_by integer,
    updated_by integer,
    name character varying(255)
);


ALTER TABLE public.hdb_option OWNER TO infini_automation_deploy;

--
-- Name: hdb_option_category; Type: TABLE; Schema: public; Owner: infini_automation_deploy
--

CREATE TABLE public.hdb_option_category (
    id integer NOT NULL,
    name character varying(255) NOT NULL,
    created_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP,
    updated_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP,
    deleted_at timestamp with time zone,
    created_by integer,
    updated_by integer
);


ALTER TABLE public.hdb_option_category OWNER TO infini_automation_deploy;

--
-- Name: hdb_option_category_id_seq; Type: SEQUENCE; Schema: public; Owner: infini_automation_deploy
--

CREATE SEQUENCE public.hdb_option_category_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.hdb_option_category_id_seq OWNER TO infini_automation_deploy;

--
-- Name: hdb_option_category_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: infini_automation_deploy
--

ALTER SEQUENCE public.hdb_option_category_id_seq OWNED BY public.hdb_option_category.id;


--
-- Name: hdb_option_id_seq; Type: SEQUENCE; Schema: public; Owner: infini_automation_deploy
--

CREATE SEQUENCE public.hdb_option_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.hdb_option_id_seq OWNER TO infini_automation_deploy;

--
-- Name: hdb_option_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: infini_automation_deploy
--

ALTER SEQUENCE public.hdb_option_id_seq OWNED BY public.hdb_option.id;


--
-- Name: hdb_payment_change_request; Type: TABLE; Schema: public; Owner: infini_automation_deploy
--

CREATE TABLE public.hdb_payment_change_request (
    id integer NOT NULL,
    payment_id bigint NOT NULL,
    request_status public.request_status_enum NOT NULL,
    requested_by bigint NOT NULL,
    updated_by bigint,
    completed_by bigint,
    created_at timestamp without time zone,
    updated_at timestamp without time zone
);


ALTER TABLE public.hdb_payment_change_request OWNER TO infini_automation_deploy;

--
-- Name: hdb_payment_change_request_id_seq; Type: SEQUENCE; Schema: public; Owner: infini_automation_deploy
--

CREATE SEQUENCE public.hdb_payment_change_request_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.hdb_payment_change_request_id_seq OWNER TO infini_automation_deploy;

--
-- Name: hdb_payment_change_request_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: infini_automation_deploy
--

ALTER SEQUENCE public.hdb_payment_change_request_id_seq OWNED BY public.hdb_payment_change_request.id;


--
-- Name: hdb_preference; Type: TABLE; Schema: public; Owner: infini_automation_deploy
--

CREATE TABLE public.hdb_preference (
    id bigint NOT NULL,
    session_id bigint,
    program_id integer NOT NULL,
    registration_id bigint NOT NULL,
    priority_order integer DEFAULT 0,
    created_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP,
    updated_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP,
    deleted_at timestamp with time zone,
    created_by integer,
    updated_by integer,
    preferred_session_id bigint,
    preferred_program_id integer,
    audit_ref_id bigint,
    parent_ref_id bigint
);


ALTER TABLE public.hdb_preference OWNER TO infini_automation_deploy;

--
-- Name: COLUMN hdb_preference.audit_ref_id; Type: COMMENT; Schema: public; Owner: infini_automation_deploy
--

COMMENT ON COLUMN public.hdb_preference.audit_ref_id IS 'Reference ID for audit tracking, typically the entity ID itself';


--
-- Name: COLUMN hdb_preference.parent_ref_id; Type: COMMENT; Schema: public; Owner: infini_automation_deploy
--

COMMENT ON COLUMN public.hdb_preference.parent_ref_id IS 'Parent reference ID for audit tracking, typically the entity ID itself';


--
-- Name: hdb_preference_id_seq; Type: SEQUENCE; Schema: public; Owner: infini_automation_deploy
--

CREATE SEQUENCE public.hdb_preference_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.hdb_preference_id_seq OWNER TO infini_automation_deploy;

--
-- Name: hdb_preference_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: infini_automation_deploy
--

ALTER SEQUENCE public.hdb_preference_id_seq OWNED BY public.hdb_preference.id;


--
-- Name: hdb_program_question; Type: TABLE; Schema: public; Owner: infini_automation_deploy
--

CREATE TABLE public.hdb_program_question (
    id integer NOT NULL,
    program_id integer NOT NULL,
    question_id integer NOT NULL,
    created_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP,
    updated_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP,
    deleted_at timestamp with time zone,
    program_session_id integer,
    registration_level public.registration_level_enum DEFAULT 'program'::public.registration_level_enum,
    created_by integer,
    updated_by integer,
    display_order integer DEFAULT 0,
    form_section_id integer
);


ALTER TABLE public.hdb_program_question OWNER TO infini_automation_deploy;

--
-- Name: hdb_program_question_id_seq; Type: SEQUENCE; Schema: public; Owner: infini_automation_deploy
--

CREATE SEQUENCE public.hdb_program_question_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.hdb_program_question_id_seq OWNER TO infini_automation_deploy;

--
-- Name: hdb_program_question_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: infini_automation_deploy
--

ALTER SEQUENCE public.hdb_program_question_id_seq OWNED BY public.hdb_program_question.id;


--
-- Name: hdb_program_registration; Type: TABLE; Schema: public; Owner: infini_automation_deploy
--

CREATE TABLE public.hdb_program_registration (
    id bigint NOT NULL,
    program_session_id bigint,
    user_id bigint,
    program_registration_seq_number integer,
    waiting_list_seq_number integer,
    registration_date timestamp with time zone DEFAULT CURRENT_TIMESTAMP,
    cancellation_date timestamp with time zone,
    cancelled_by bigint,
    rm_contact bigint,
    preferred_room_mate character varying(255),
    full_name public.citext,
    gender public.gender_enum,
    mobile_number character varying(20),
    email_address character varying(255),
    dob date,
    city character varying(100),
    notes text,
    terms_accepted boolean DEFAULT false,
    created_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP,
    updated_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP,
    created_by bigint,
    updated_by bigint,
    deleted_at timestamp with time zone,
    program_id bigint,
    registration_status public.registration_status_enum DEFAULT 'draft'::public.registration_status_enum,
    basic_details_status public.basic_details_status_enum DEFAULT 'draft'::public.basic_details_status_enum,
    allocated_program_id bigint,
    allocated_session_id bigint,
    rm_review text,
    registration_seq_number character varying(50),
    wait_list_registration_seq_number character varying(50),
    user_profile_url text,
    no_of_hdbs integer DEFAULT 0,
    user_video_url text,
    pro_forma_invoice_name character varying(255),
    pro_forma_invoice_address text,
    pro_forma_invoice_pdf_url text,
    proforma_invoice_seq_number character varying(255),
    alternate_phone_number character varying(20),
    comments text,
    is_free_seat boolean DEFAULT false,
    invoice_confirmation boolean DEFAULT false,
    cancellation_reason character varying(255) DEFAULT NULL::character varying,
    cancellation_comments text,
    audit_ref_id bigint,
    parent_ref_id bigint,
    average_rating numeric,
    country_name character varying(255),
    last_hdb_attended character varying(255),
    hdb_association_since character varying(255),
    other_infinitheism_contact character varying(255),
    other_city_name character varying(255),
    pro_forma_is_gst_registered boolean,
    pro_forma_gst_number character varying(50),
    pro_forma_zip character varying(10),
    first_song_preference character varying(255),
    second_song_preference character varying(255),
    parental_form_pdf_url text,
    parental_form_status public.parental_form_status_enum,
    person_type public.person_type_enum,
    phone_number_type character varying(50),
    phone_number_relation character varying(50),
    other_relation character varying(100),
    registration_category character varying(255),
    song_preferences jsonb,
    user_profile_signed_url text,
    user_video_signed_url text
);


ALTER TABLE public.hdb_program_registration OWNER TO infini_automation_deploy;

--
-- Name: COLUMN hdb_program_registration.audit_ref_id; Type: COMMENT; Schema: public; Owner: infini_automation_deploy
--

COMMENT ON COLUMN public.hdb_program_registration.audit_ref_id IS 'Reference ID for audit tracking, typically the entity ID itself';


--
-- Name: COLUMN hdb_program_registration.parent_ref_id; Type: COMMENT; Schema: public; Owner: infini_automation_deploy
--

COMMENT ON COLUMN public.hdb_program_registration.parent_ref_id IS 'Parent reference ID for audit tracking, typically the entity ID itself';


--
-- Name: COLUMN hdb_program_registration.parental_form_pdf_url; Type: COMMENT; Schema: public; Owner: infini_automation_deploy
--

COMMENT ON COLUMN public.hdb_program_registration.parental_form_pdf_url IS 'URL of the uploaded parental consent form PDF';


--
-- Name: COLUMN hdb_program_registration.parental_form_status; Type: COMMENT; Schema: public; Owner: infini_automation_deploy
--

COMMENT ON COLUMN public.hdb_program_registration.parental_form_status IS 'Status of the parental consent form';


--
-- Name: COLUMN hdb_program_registration.phone_number_type; Type: COMMENT; Schema: public; Owner: infini_automation_deploy
--

COMMENT ON COLUMN public.hdb_program_registration.phone_number_type IS 'Type of phone number for registration';


--
-- Name: COLUMN hdb_program_registration.phone_number_relation; Type: COMMENT; Schema: public; Owner: infini_automation_deploy
--

COMMENT ON COLUMN public.hdb_program_registration.phone_number_relation IS 'Relationship with the person associated with the entered phone number';


--
-- Name: COLUMN hdb_program_registration.other_relation; Type: COMMENT; Schema: public; Owner: infini_automation_deploy
--

COMMENT ON COLUMN public.hdb_program_registration.other_relation IS 'other relationship type when OTHER is selected';


--
-- Name: COLUMN hdb_program_registration.user_profile_signed_url; Type: COMMENT; Schema: public; Owner: infini_automation_deploy
--

COMMENT ON COLUMN public.hdb_program_registration.user_profile_signed_url IS 'Signed S3 URL for user profile picture';


--
-- Name: COLUMN hdb_program_registration.user_video_signed_url; Type: COMMENT; Schema: public; Owner: infini_automation_deploy
--

COMMENT ON COLUMN public.hdb_program_registration.user_video_signed_url IS 'Signed S3 URL for user video';


--
-- Name: hdb_program_registration_goodies; Type: TABLE; Schema: public; Owner: infini_automation_deploy
--

CREATE TABLE public.hdb_program_registration_goodies (
    id integer NOT NULL,
    registration_id integer NOT NULL,
    notebook boolean,
    ratria_pillar_leonia boolean,
    flask boolean,
    tshirt_size public.tshirt_size_enum,
    jacket_size public.tshirt_size_enum,
    created_at timestamp with time zone DEFAULT now(),
    updated_at timestamp with time zone DEFAULT now(),
    deleted_at timestamp with time zone,
    created_by integer,
    updated_by integer,
    tshirt boolean DEFAULT false,
    jacket boolean DEFAULT false,
    audit_ref_id bigint,
    parent_ref_id bigint,
    ratria_pillar_location character varying(100),
    ratria_pillar_other_location character varying(100)
);


ALTER TABLE public.hdb_program_registration_goodies OWNER TO infini_automation_deploy;

--
-- Name: COLUMN hdb_program_registration_goodies.audit_ref_id; Type: COMMENT; Schema: public; Owner: infini_automation_deploy
--

COMMENT ON COLUMN public.hdb_program_registration_goodies.audit_ref_id IS 'Reference ID for audit tracking, typically the entity ID itself';


--
-- Name: COLUMN hdb_program_registration_goodies.parent_ref_id; Type: COMMENT; Schema: public; Owner: infini_automation_deploy
--

COMMENT ON COLUMN public.hdb_program_registration_goodies.parent_ref_id IS 'Parent reference ID for audit tracking, typically the entity ID itself';


--
-- Name: hdb_program_registration_goodies_id_seq; Type: SEQUENCE; Schema: public; Owner: infini_automation_deploy
--

CREATE SEQUENCE public.hdb_program_registration_goodies_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.hdb_program_registration_goodies_id_seq OWNER TO infini_automation_deploy;

--
-- Name: hdb_program_registration_goodies_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: infini_automation_deploy
--

ALTER SEQUENCE public.hdb_program_registration_goodies_id_seq OWNED BY public.hdb_program_registration_goodies.id;


--
-- Name: hdb_program_registration_id_seq; Type: SEQUENCE; Schema: public; Owner: infini_automation_deploy
--

CREATE SEQUENCE public.hdb_program_registration_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.hdb_program_registration_id_seq OWNER TO infini_automation_deploy;

--
-- Name: hdb_program_registration_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: infini_automation_deploy
--

ALTER SEQUENCE public.hdb_program_registration_id_seq OWNED BY public.hdb_program_registration.id;


--
-- Name: hdb_program_registration_recommendations; Type: TABLE; Schema: public; Owner: infini_automation_deploy
--

CREATE TABLE public.hdb_program_registration_recommendations (
    id integer NOT NULL,
    registration_id integer NOT NULL,
    recommended_by integer NOT NULL,
    recommendation_key public.recommendation_level,
    is_recommended boolean,
    created_at timestamp without time zone,
    updated_at timestamp without time zone,
    recommendation_text text,
    audit_ref_id bigint,
    parent_ref_id bigint,
    follow_up_count integer DEFAULT 0
);


ALTER TABLE public.hdb_program_registration_recommendations OWNER TO infini_automation_deploy;

--
-- Name: COLUMN hdb_program_registration_recommendations.audit_ref_id; Type: COMMENT; Schema: public; Owner: infini_automation_deploy
--

COMMENT ON COLUMN public.hdb_program_registration_recommendations.audit_ref_id IS 'Reference ID for audit tracking, typically the entity ID itself';


--
-- Name: COLUMN hdb_program_registration_recommendations.parent_ref_id; Type: COMMENT; Schema: public; Owner: infini_automation_deploy
--

COMMENT ON COLUMN public.hdb_program_registration_recommendations.parent_ref_id IS 'Parent reference ID for audit tracking, typically the entity ID itself';


--
-- Name: COLUMN hdb_program_registration_recommendations.follow_up_count; Type: COMMENT; Schema: public; Owner: infini_automation_deploy
--

COMMENT ON COLUMN public.hdb_program_registration_recommendations.follow_up_count IS 'Number of follow-ups made for this recommendation';


--
-- Name: hdb_program_registration_recommendations_id_seq; Type: SEQUENCE; Schema: public; Owner: infini_automation_deploy
--

CREATE SEQUENCE public.hdb_program_registration_recommendations_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.hdb_program_registration_recommendations_id_seq OWNER TO infini_automation_deploy;

--
-- Name: hdb_program_registration_recommendations_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: infini_automation_deploy
--

ALTER SEQUENCE public.hdb_program_registration_recommendations_id_seq OWNED BY public.hdb_program_registration_recommendations.id;


--
-- Name: hdb_program_registration_rm_rating; Type: TABLE; Schema: public; Owner: infini_automation_deploy
--

CREATE TABLE public.hdb_program_registration_rm_rating (
    id integer NOT NULL,
    program_registration_id bigint,
    rm_id bigint NOT NULL,
    rating_key character varying(255) NOT NULL,
    rating numeric DEFAULT 0,
    created_at timestamp with time zone,
    updated_at timestamp with time zone,
    deleted_at timestamp with time zone,
    created_by bigint,
    updated_by bigint,
    audit_ref_id bigint,
    parent_ref_id bigint
);


ALTER TABLE public.hdb_program_registration_rm_rating OWNER TO infini_automation_deploy;

--
-- Name: COLUMN hdb_program_registration_rm_rating.audit_ref_id; Type: COMMENT; Schema: public; Owner: infini_automation_deploy
--

COMMENT ON COLUMN public.hdb_program_registration_rm_rating.audit_ref_id IS 'Reference ID for audit tracking, typically the entity ID itself';


--
-- Name: COLUMN hdb_program_registration_rm_rating.parent_ref_id; Type: COMMENT; Schema: public; Owner: infini_automation_deploy
--

COMMENT ON COLUMN public.hdb_program_registration_rm_rating.parent_ref_id IS 'Parent reference ID for audit tracking, typically the entity ID itself';


--
-- Name: hdb_program_registration_rm_rating_id_seq; Type: SEQUENCE; Schema: public; Owner: infini_automation_deploy
--

CREATE SEQUENCE public.hdb_program_registration_rm_rating_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.hdb_program_registration_rm_rating_id_seq OWNER TO infini_automation_deploy;

--
-- Name: hdb_program_registration_rm_rating_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: infini_automation_deploy
--

ALTER SEQUENCE public.hdb_program_registration_rm_rating_id_seq OWNED BY public.hdb_program_registration_rm_rating.id;


--
-- Name: hdb_program_registration_rm_rating_type; Type: TABLE; Schema: public; Owner: infini_automation_deploy
--

CREATE TABLE public.hdb_program_registration_rm_rating_type (
    id bigint NOT NULL,
    rating_key character varying(255) NOT NULL,
    name character varying(255) NOT NULL,
    created_at timestamp with time zone,
    updated_at timestamp with time zone,
    created_by bigint,
    updated_by bigint
);


ALTER TABLE public.hdb_program_registration_rm_rating_type OWNER TO infini_automation_deploy;

--
-- Name: hdb_program_registration_rm_rating_type_id_seq; Type: SEQUENCE; Schema: public; Owner: infini_automation_deploy
--

CREATE SEQUENCE public.hdb_program_registration_rm_rating_type_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.hdb_program_registration_rm_rating_type_id_seq OWNER TO infini_automation_deploy;

--
-- Name: hdb_program_registration_rm_rating_type_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: infini_automation_deploy
--

ALTER SEQUENCE public.hdb_program_registration_rm_rating_type_id_seq OWNED BY public.hdb_program_registration_rm_rating_type.id;


--
-- Name: hdb_program_registration_swap; Type: TABLE; Schema: public; Owner: infini_automation_deploy
--

CREATE TABLE public.hdb_program_registration_swap (
    id integer NOT NULL,
    program_registration_id bigint,
    type character varying(255),
    status character varying(255),
    created_at timestamp with time zone,
    updated_at timestamp with time zone,
    created_by bigint,
    updated_by bigint,
    comment text,
    target_program_id bigint,
    target_programs integer[],
    allocated_program_id bigint,
    current_program_id bigint,
    audit_ref_id bigint,
    parent_ref_id bigint,
    swap_requirement character varying(50) DEFAULT 'SWAP_REQUEST'::character varying
);


ALTER TABLE public.hdb_program_registration_swap OWNER TO infini_automation_deploy;

--
-- Name: COLUMN hdb_program_registration_swap.audit_ref_id; Type: COMMENT; Schema: public; Owner: infini_automation_deploy
--

COMMENT ON COLUMN public.hdb_program_registration_swap.audit_ref_id IS 'Reference ID for audit tracking, typically the entity ID itself';


--
-- Name: COLUMN hdb_program_registration_swap.parent_ref_id; Type: COMMENT; Schema: public; Owner: infini_automation_deploy
--

COMMENT ON COLUMN public.hdb_program_registration_swap.parent_ref_id IS 'Parent reference ID for audit tracking, typically the entity ID itself';


--
-- Name: hdb_program_registration_swap_id_seq; Type: SEQUENCE; Schema: public; Owner: infini_automation_deploy
--

CREATE SEQUENCE public.hdb_program_registration_swap_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.hdb_program_registration_swap_id_seq OWNER TO infini_automation_deploy;

--
-- Name: hdb_program_registration_swap_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: infini_automation_deploy
--

ALTER SEQUENCE public.hdb_program_registration_swap_id_seq OWNED BY public.hdb_program_registration_swap.id;


--
-- Name: hdb_question; Type: TABLE; Schema: public; Owner: infini_automation_deploy
--

CREATE TABLE public.hdb_question (
    id integer NOT NULL,
    label character varying(1024) NOT NULL,
    config jsonb,
    stats public.hdb_common_status_enum DEFAULT 'draft'::public.hdb_common_status_enum NOT NULL,
    typ character varying(50) NOT NULL,
    created_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP,
    updated_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP,
    deleted_at timestamp with time zone,
    created_by integer,
    updated_by integer,
    form_section_id integer,
    answer_location character varying(1024),
    binding_key character varying(255)
);


ALTER TABLE public.hdb_question OWNER TO infini_automation_deploy;

--
-- Name: hdb_question_id_seq; Type: SEQUENCE; Schema: public; Owner: infini_automation_deploy
--

CREATE SEQUENCE public.hdb_question_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.hdb_question_id_seq OWNER TO infini_automation_deploy;

--
-- Name: hdb_question_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: infini_automation_deploy
--

ALTER SEQUENCE public.hdb_question_id_seq OWNED BY public.hdb_question.id;


--
-- Name: hdb_question_option_map; Type: TABLE; Schema: public; Owner: infini_automation_deploy
--

CREATE TABLE public.hdb_question_option_map (
    id integer NOT NULL,
    question_id integer NOT NULL,
    option_id integer NOT NULL,
    created_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP,
    updated_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP,
    deleted_at timestamp with time zone,
    created_by integer,
    updated_by integer
);


ALTER TABLE public.hdb_question_option_map OWNER TO infini_automation_deploy;

--
-- Name: hdb_question_option_map_id_seq; Type: SEQUENCE; Schema: public; Owner: infini_automation_deploy
--

CREATE SEQUENCE public.hdb_question_option_map_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.hdb_question_option_map_id_seq OWNER TO infini_automation_deploy;

--
-- Name: hdb_question_option_map_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: infini_automation_deploy
--

ALTER SEQUENCE public.hdb_question_option_map_id_seq OWNED BY public.hdb_question_option_map.id;


--
-- Name: hdb_registration_approval; Type: TABLE; Schema: public; Owner: infini_automation_deploy
--

CREATE TABLE public.hdb_registration_approval (
    id bigint NOT NULL,
    registration_id bigint NOT NULL,
    approval_status public.approval_status_enum DEFAULT 'pending'::public.approval_status_enum NOT NULL,
    approval_date timestamp with time zone,
    approved_by bigint,
    rejection_reason text,
    reviewer_comments text,
    auto_approved boolean DEFAULT false NOT NULL,
    created_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP,
    updated_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP,
    created_by bigint,
    updated_by bigint,
    deleted_at timestamp with time zone,
    audit_ref_id bigint,
    parent_ref_id bigint
);


ALTER TABLE public.hdb_registration_approval OWNER TO infini_automation_deploy;

--
-- Name: COLUMN hdb_registration_approval.audit_ref_id; Type: COMMENT; Schema: public; Owner: infini_automation_deploy
--

COMMENT ON COLUMN public.hdb_registration_approval.audit_ref_id IS 'Reference ID for audit tracking, typically the entity ID itself';


--
-- Name: COLUMN hdb_registration_approval.parent_ref_id; Type: COMMENT; Schema: public; Owner: infini_automation_deploy
--

COMMENT ON COLUMN public.hdb_registration_approval.parent_ref_id IS 'Parent reference ID for audit tracking, typically the entity ID itself';


--
-- Name: hdb_registration_approval_id_seq; Type: SEQUENCE; Schema: public; Owner: infini_automation_deploy
--

CREATE SEQUENCE public.hdb_registration_approval_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.hdb_registration_approval_id_seq OWNER TO infini_automation_deploy;

--
-- Name: hdb_registration_approval_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: infini_automation_deploy
--

ALTER SEQUENCE public.hdb_registration_approval_id_seq OWNED BY public.hdb_registration_approval.id;


--
-- Name: hdb_registration_approval_track; Type: TABLE; Schema: public; Owner: infini_automation_deploy
--

CREATE TABLE public.hdb_registration_approval_track (
    id bigint NOT NULL,
    approval_id bigint NOT NULL,
    registration_id bigint NOT NULL,
    approval_status public.approval_status_enum DEFAULT 'pending'::public.approval_status_enum NOT NULL,
    approval_date timestamp with time zone,
    approved_by bigint,
    rejection_reason text,
    reviewer_comments text,
    auto_approved boolean DEFAULT false NOT NULL,
    created_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP,
    updated_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP,
    created_by bigint,
    updated_by bigint,
    type character varying(255) DEFAULT 'registration'::character varying,
    swap_request_id bigint,
    allocated_program_id bigint,
    allocated_session_id bigint
);


ALTER TABLE public.hdb_registration_approval_track OWNER TO infini_automation_deploy;

--
-- Name: hdb_registration_approval_track_id_seq; Type: SEQUENCE; Schema: public; Owner: infini_automation_deploy
--

CREATE SEQUENCE public.hdb_registration_approval_track_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.hdb_registration_approval_track_id_seq OWNER TO infini_automation_deploy;

--
-- Name: hdb_registration_approval_track_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: infini_automation_deploy
--

ALTER SEQUENCE public.hdb_registration_approval_track_id_seq OWNED BY public.hdb_registration_approval_track.id;


--
-- Name: hdb_registration_custom_response; Type: TABLE; Schema: public; Owner: infini_automation_deploy
--

CREATE TABLE public.hdb_registration_custom_response (
    id bigint NOT NULL,
    registration_id bigint NOT NULL,
    question_id bigint NOT NULL,
    response_value jsonb,
    created_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP,
    updated_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP,
    created_by bigint,
    updated_by bigint,
    deleted_at timestamp without time zone,
    audit_ref_id bigint,
    parent_ref_id bigint
);


ALTER TABLE public.hdb_registration_custom_response OWNER TO infini_automation_deploy;

--
-- Name: COLUMN hdb_registration_custom_response.audit_ref_id; Type: COMMENT; Schema: public; Owner: infini_automation_deploy
--

COMMENT ON COLUMN public.hdb_registration_custom_response.audit_ref_id IS 'Reference ID for audit tracking, typically the entity ID itself';


--
-- Name: COLUMN hdb_registration_custom_response.parent_ref_id; Type: COMMENT; Schema: public; Owner: infini_automation_deploy
--

COMMENT ON COLUMN public.hdb_registration_custom_response.parent_ref_id IS 'Parent reference ID for audit tracking, typically the entity ID itself';


--
-- Name: hdb_registration_custom_response_id_seq; Type: SEQUENCE; Schema: public; Owner: infini_automation_deploy
--

CREATE SEQUENCE public.hdb_registration_custom_response_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.hdb_registration_custom_response_id_seq OWNER TO infini_automation_deploy;

--
-- Name: hdb_registration_custom_response_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: infini_automation_deploy
--

ALTER SEQUENCE public.hdb_registration_custom_response_id_seq OWNED BY public.hdb_registration_custom_response.id;


--
-- Name: hdb_registration_invoice_basic_history; Type: TABLE; Schema: public; Owner: infini_automation_deploy
--

CREATE TABLE public.hdb_registration_invoice_basic_history (
    id integer NOT NULL,
    invoice_id bigint,
    invoice_type public.invoice_type_enum,
    invoice_name character varying(255),
    invoice_email character varying(255),
    invoice_address text,
    pan_number character varying(20),
    tds_amount numeric(10,2),
    tan_number character varying(20),
    zip character varying(10),
    gst_number character varying(50),
    created_at timestamp without time zone,
    updated_at timestamp without time zone,
    created_by bigint,
    updated_by bigint
);


ALTER TABLE public.hdb_registration_invoice_basic_history OWNER TO infini_automation_deploy;

--
-- Name: hdb_registration_invoice_basic_history_id_seq; Type: SEQUENCE; Schema: public; Owner: infini_automation_deploy
--

CREATE SEQUENCE public.hdb_registration_invoice_basic_history_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.hdb_registration_invoice_basic_history_id_seq OWNER TO infini_automation_deploy;

--
-- Name: hdb_registration_invoice_basic_history_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: infini_automation_deploy
--

ALTER SEQUENCE public.hdb_registration_invoice_basic_history_id_seq OWNED BY public.hdb_registration_invoice_basic_history.id;


--
-- Name: hdb_registration_invoice_detail; Type: TABLE; Schema: public; Owner: infini_automation_deploy
--

CREATE TABLE public.hdb_registration_invoice_detail (
    id bigint NOT NULL,
    registration_id bigint NOT NULL,
    invoice_type public.invoice_type_enum,
    invoice_name character varying(255),
    invoice_email character varying(255),
    pan_number character varying(20),
    is_gst_registered boolean DEFAULT false,
    invoice_address text,
    tax_amount numeric(10,2) DEFAULT 0.00,
    invoice_sequence_number character varying(50),
    razorpay_id character varying(100),
    invoice_issued_date timestamp with time zone,
    tds_applicable boolean DEFAULT false,
    tan_number character varying(20),
    handover_date timestamp with time zone,
    handover_to character varying(255),
    created_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP,
    updated_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP,
    created_by bigint,
    updated_by bigint,
    gst_number character varying(50),
    zip character varying(10),
    deleted_at timestamp without time zone,
    invoice_status public.invoice_status_enum DEFAULT 'draft'::public.invoice_status_enum,
    tds_amount numeric(10,2),
    einvoice_qr_link character varying(1024),
    einvoice_ack_date character varying(500),
    einvoice_inv_ref_num character varying(1024),
    einvoice_is_cancellable boolean,
    einvoice_status_formatted character varying(1024),
    einvoice_formatted_status character varying(500),
    einvoice_ack_number character varying(500),
    einvoice_status character varying(500),
    invoice_pdf_url character varying(2048),
    audit_ref_id bigint,
    parent_ref_id bigint
);


ALTER TABLE public.hdb_registration_invoice_detail OWNER TO infini_automation_deploy;

--
-- Name: COLUMN hdb_registration_invoice_detail.audit_ref_id; Type: COMMENT; Schema: public; Owner: infini_automation_deploy
--

COMMENT ON COLUMN public.hdb_registration_invoice_detail.audit_ref_id IS 'Reference ID for audit tracking, typically the entity ID itself';


--
-- Name: COLUMN hdb_registration_invoice_detail.parent_ref_id; Type: COMMENT; Schema: public; Owner: infini_automation_deploy
--

COMMENT ON COLUMN public.hdb_registration_invoice_detail.parent_ref_id IS 'Parent reference ID for audit tracking, typically the entity ID itself';


--
-- Name: hdb_registration_invoice_detail_id_seq; Type: SEQUENCE; Schema: public; Owner: infini_automation_deploy
--

CREATE SEQUENCE public.hdb_registration_invoice_detail_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.hdb_registration_invoice_detail_id_seq OWNER TO infini_automation_deploy;

--
-- Name: hdb_registration_invoice_detail_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: infini_automation_deploy
--

ALTER SEQUENCE public.hdb_registration_invoice_detail_id_seq OWNED BY public.hdb_registration_invoice_detail.id;


--
-- Name: hdb_registration_invoice_einvoice_history; Type: TABLE; Schema: public; Owner: infini_automation_deploy
--

CREATE TABLE public.hdb_registration_invoice_einvoice_history (
    id integer NOT NULL,
    invoice_id bigint,
    invoice_type public.invoice_type_enum,
    zip character varying(10),
    gst_number character varying(50),
    pan_number character varying(20),
    invoice_sequence_number character varying(50),
    invoice_issued_date timestamp without time zone,
    einvoice_qr_link character varying(1024),
    einvoice_ack_date character varying(500),
    einvoice_inv_ref_num character varying(1024),
    einvoice_is_cancellable boolean,
    einvoice_status_formatted character varying(1024),
    einvoice_formatted_status character varying(500),
    einvoice_ack_number character varying(500),
    einvoice_status character varying(500),
    einvoice_pdf_url character varying(2048),
    created_at timestamp without time zone,
    updated_at timestamp without time zone,
    created_by bigint,
    updated_by bigint
);


ALTER TABLE public.hdb_registration_invoice_einvoice_history OWNER TO infini_automation_deploy;

--
-- Name: hdb_registration_invoice_einvoice_history_id_seq; Type: SEQUENCE; Schema: public; Owner: infini_automation_deploy
--

CREATE SEQUENCE public.hdb_registration_invoice_einvoice_history_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.hdb_registration_invoice_einvoice_history_id_seq OWNER TO infini_automation_deploy;

--
-- Name: hdb_registration_invoice_einvoice_history_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: infini_automation_deploy
--

ALTER SEQUENCE public.hdb_registration_invoice_einvoice_history_id_seq OWNED BY public.hdb_registration_invoice_einvoice_history.id;


--
-- Name: hdb_registration_payment_detail; Type: TABLE; Schema: public; Owner: infini_automation_deploy
--

CREATE TABLE public.hdb_registration_payment_detail (
    id bigint NOT NULL,
    registration_id bigint NOT NULL,
    program_session_id bigint,
    payment_mode public.payment_mode_enum,
    tax_amount numeric(10,2) DEFAULT 0.00,
    tds numeric(10,2) DEFAULT 0.00,
    sub_total numeric(10,2) DEFAULT 0.00,
    razorpay_id character varying(100),
    offline_meta jsonb,
    original_amount numeric(10,2) DEFAULT 0.00,
    gst_amount numeric(10,2) DEFAULT 0.00,
    payment_date timestamp with time zone,
    created_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP,
    updated_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP,
    created_by bigint,
    updated_by bigint,
    deleted_at timestamp without time zone,
    payment_status public.payment_status_enum DEFAULT 'draft'::public.payment_status_enum,
    mark_as_received_date timestamp with time zone,
    portal_online_payment_attempt_status jsonb,
    webhook_online_payment_attempt_status jsonb,
    gateway_online_payment_status public.gateway_payment_status_enum,
    gateway_online_payment_attempt_status json,
    portal_online_payment_status public.gateway_payment_status_enum,
    webhook_online_payment_status public.gateway_payment_status_enum,
    audit_ref_id bigint,
    parent_ref_id bigint
);


ALTER TABLE public.hdb_registration_payment_detail OWNER TO infini_automation_deploy;

--
-- Name: COLUMN hdb_registration_payment_detail.audit_ref_id; Type: COMMENT; Schema: public; Owner: infini_automation_deploy
--

COMMENT ON COLUMN public.hdb_registration_payment_detail.audit_ref_id IS 'Reference ID for audit tracking, typically the entity ID itself';


--
-- Name: COLUMN hdb_registration_payment_detail.parent_ref_id; Type: COMMENT; Schema: public; Owner: infini_automation_deploy
--

COMMENT ON COLUMN public.hdb_registration_payment_detail.parent_ref_id IS 'Parent reference ID for audit tracking, typically the entity ID itself';


--
-- Name: hdb_registration_payment_detail_id_seq; Type: SEQUENCE; Schema: public; Owner: infini_automation_deploy
--

CREATE SEQUENCE public.hdb_registration_payment_detail_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.hdb_registration_payment_detail_id_seq OWNER TO infini_automation_deploy;

--
-- Name: hdb_registration_payment_detail_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: infini_automation_deploy
--

ALTER SEQUENCE public.hdb_registration_payment_detail_id_seq OWNED BY public.hdb_registration_payment_detail.id;


--
-- Name: hdb_registration_payment_details_history; Type: TABLE; Schema: public; Owner: infini_automation_deploy
--

CREATE TABLE public.hdb_registration_payment_details_history (
    id bigint NOT NULL,
    payment_details_id bigint NOT NULL,
    razorpay_id character varying(100),
    offline_meta jsonb,
    payment_status public.payment_status_enum DEFAULT 'draft'::public.payment_status_enum,
    created_at timestamp with time zone DEFAULT now(),
    updated_at timestamp with time zone DEFAULT now(),
    created_by bigint,
    updated_by bigint,
    payment_mode public.payment_mode_enum,
    portal_online_payment_attempt_status json,
    webhook_online_payment_attempt_status jsonb,
    gateway_online_payment_status public.gateway_payment_status_enum,
    gateway_online_payment_attempt_status json,
    portal_online_payment_status public.gateway_payment_status_enum,
    webhook_online_payment_status public.gateway_payment_status_enum
);


ALTER TABLE public.hdb_registration_payment_details_history OWNER TO infini_automation_deploy;

--
-- Name: hdb_registration_payment_details_history_id_seq; Type: SEQUENCE; Schema: public; Owner: infini_automation_deploy
--

CREATE SEQUENCE public.hdb_registration_payment_details_history_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.hdb_registration_payment_details_history_id_seq OWNER TO infini_automation_deploy;

--
-- Name: hdb_registration_payment_details_history_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: infini_automation_deploy
--

ALTER SEQUENCE public.hdb_registration_payment_details_history_id_seq OWNED BY public.hdb_registration_payment_details_history.id;


--
-- Name: hdb_registration_question_answer; Type: TABLE; Schema: public; Owner: infini_automation_deploy
--

CREATE TABLE public.hdb_registration_question_answer (
    id bigint NOT NULL,
    registration_id bigint NOT NULL,
    question_id bigint NOT NULL,
    answer_value jsonb,
    created_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP,
    updated_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP,
    created_by bigint,
    updated_by bigint,
    audit_ref_id bigint,
    parent_ref_id bigint
);


ALTER TABLE public.hdb_registration_question_answer OWNER TO infini_automation_deploy;

--
-- Name: COLUMN hdb_registration_question_answer.audit_ref_id; Type: COMMENT; Schema: public; Owner: infini_automation_deploy
--

COMMENT ON COLUMN public.hdb_registration_question_answer.audit_ref_id IS 'Reference ID for audit tracking, typically the entity ID itself';


--
-- Name: COLUMN hdb_registration_question_answer.parent_ref_id; Type: COMMENT; Schema: public; Owner: infini_automation_deploy
--

COMMENT ON COLUMN public.hdb_registration_question_answer.parent_ref_id IS 'Parent reference ID for audit tracking, typically the entity ID itself';


--
-- Name: hdb_registration_question_answer_id_seq; Type: SEQUENCE; Schema: public; Owner: infini_automation_deploy
--

CREATE SEQUENCE public.hdb_registration_question_answer_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.hdb_registration_question_answer_id_seq OWNER TO infini_automation_deploy;

--
-- Name: hdb_registration_question_answer_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: infini_automation_deploy
--

ALTER SEQUENCE public.hdb_registration_question_answer_id_seq OWNED BY public.hdb_registration_question_answer.id;


--
-- Name: hdb_registration_travel_info; Type: TABLE; Schema: public; Owner: infini_automation_deploy
--

CREATE TABLE public.hdb_registration_travel_info (
    id bigint NOT NULL,
    registration_id bigint NOT NULL,
    id_type public.id_type_enum,
    id_number character varying(50),
    id_picture_url character varying(500),
    user_picture_url character varying(500),
    tshirt_size public.tshirt_size_enum,
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
    updated_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
    created_by bigint,
    updated_by bigint,
    deleted_at timestamp without time zone,
    travel_info_status public.travel_status_enum DEFAULT 'pending'::public.travel_status_enum,
    audit_ref_id bigint,
    parent_ref_id bigint,
    id_back_picture_url character varying(500),
    international_id_picture_url character varying(500),
    passport_copy_picture_url character varying(500),
    visa_copy_picture_url character varying(500),
    id_picture_signed_url text,
    id_back_picture_signed_url text,
    passport_copy_picture_signed_url text,
    visa_copy_picture_signed_url text
);


ALTER TABLE public.hdb_registration_travel_info OWNER TO infini_automation_deploy;

--
-- Name: COLUMN hdb_registration_travel_info.audit_ref_id; Type: COMMENT; Schema: public; Owner: infini_automation_deploy
--

COMMENT ON COLUMN public.hdb_registration_travel_info.audit_ref_id IS 'Reference ID for audit tracking, typically the entity ID itself';


--
-- Name: COLUMN hdb_registration_travel_info.parent_ref_id; Type: COMMENT; Schema: public; Owner: infini_automation_deploy
--

COMMENT ON COLUMN public.hdb_registration_travel_info.parent_ref_id IS 'Parent reference ID for audit tracking, typically the entity ID itself';


--
-- Name: COLUMN hdb_registration_travel_info.id_picture_signed_url; Type: COMMENT; Schema: public; Owner: infini_automation_deploy
--

COMMENT ON COLUMN public.hdb_registration_travel_info.id_picture_signed_url IS 'Signed S3 URL for ID front picture';


--
-- Name: COLUMN hdb_registration_travel_info.id_back_picture_signed_url; Type: COMMENT; Schema: public; Owner: infini_automation_deploy
--

COMMENT ON COLUMN public.hdb_registration_travel_info.id_back_picture_signed_url IS 'Signed S3 URL for ID back picture';


--
-- Name: COLUMN hdb_registration_travel_info.passport_copy_picture_signed_url; Type: COMMENT; Schema: public; Owner: infini_automation_deploy
--

COMMENT ON COLUMN public.hdb_registration_travel_info.passport_copy_picture_signed_url IS 'Signed S3 URL for passport copy';


--
-- Name: COLUMN hdb_registration_travel_info.visa_copy_picture_signed_url; Type: COMMENT; Schema: public; Owner: infini_automation_deploy
--

COMMENT ON COLUMN public.hdb_registration_travel_info.visa_copy_picture_signed_url IS 'Signed S3 URL for visa copy';


--
-- Name: hdb_registration_travel_info_id_seq; Type: SEQUENCE; Schema: public; Owner: infini_automation_deploy
--

CREATE SEQUENCE public.hdb_registration_travel_info_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.hdb_registration_travel_info_id_seq OWNER TO infini_automation_deploy;

--
-- Name: hdb_registration_travel_info_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: infini_automation_deploy
--

ALTER SEQUENCE public.hdb_registration_travel_info_id_seq OWNED BY public.hdb_registration_travel_info.id;


--
-- Name: hdb_registration_travel_plan; Type: TABLE; Schema: public; Owner: infini_automation_deploy
--

CREATE TABLE public.hdb_registration_travel_plan (
    id bigint NOT NULL,
    registration_id bigint NOT NULL,
    travel_type public.travel_type_enum,
    airline_name character varying(100),
    flight_number character varying(20),
    arrival_datetime timestamp with time zone,
    departure_location character varying(255),
    pickup_time time without time zone,
    pickup_location character varying(255),
    checkin_time time without time zone,
    checkin_location character varying(255),
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
    updated_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
    created_by bigint,
    updated_by bigint,
    deleted_at timestamp with time zone,
    travel_plan_status public.travel_status_enum DEFAULT 'pending'::public.travel_status_enum,
    checkin_at timestamp with time zone,
    return_travel_type public.travel_type_enum,
    departure_datetime timestamp with time zone,
    departure_flight_number character varying(20),
    departure_airline_name character varying(100),
    arrival_from character varying(255),
    departure_to character varying(255),
    audit_ref_id bigint,
    parent_ref_id bigint,
    onward_additional_info text,
    return_additional_info text,
    arrival_other_airline_name character varying(100),
    departure_other_airline_name character varying(100),
    other_departure character varying(100),
    other_arrival character varying(100),
    onward_terminal character varying(100),
    return_terminal character varying(100),
    onward_journey_ticket_url text,
    onward_journey_ticket_signed_url text,
    return_journey_ticket_url text,
    return_journey_ticket_signed_url text
);


ALTER TABLE public.hdb_registration_travel_plan OWNER TO infini_automation_deploy;

--
-- Name: COLUMN hdb_registration_travel_plan.audit_ref_id; Type: COMMENT; Schema: public; Owner: infini_automation_deploy
--

COMMENT ON COLUMN public.hdb_registration_travel_plan.audit_ref_id IS 'Reference ID for audit tracking, typically the entity ID itself';


--
-- Name: COLUMN hdb_registration_travel_plan.parent_ref_id; Type: COMMENT; Schema: public; Owner: infini_automation_deploy
--

COMMENT ON COLUMN public.hdb_registration_travel_plan.parent_ref_id IS 'Parent reference ID for audit tracking, typically the entity ID itself';


--
-- Name: COLUMN hdb_registration_travel_plan.onward_journey_ticket_url; Type: COMMENT; Schema: public; Owner: infini_automation_deploy
--

COMMENT ON COLUMN public.hdb_registration_travel_plan.onward_journey_ticket_url IS 'Plain S3 URL for onward journey ticket';


--
-- Name: COLUMN hdb_registration_travel_plan.onward_journey_ticket_signed_url; Type: COMMENT; Schema: public; Owner: infini_automation_deploy
--

COMMENT ON COLUMN public.hdb_registration_travel_plan.onward_journey_ticket_signed_url IS 'Signed S3 URL for onward journey ticket';


--
-- Name: COLUMN hdb_registration_travel_plan.return_journey_ticket_url; Type: COMMENT; Schema: public; Owner: infini_automation_deploy
--

COMMENT ON COLUMN public.hdb_registration_travel_plan.return_journey_ticket_url IS 'Plain S3 URL for return journey ticket';


--
-- Name: COLUMN hdb_registration_travel_plan.return_journey_ticket_signed_url; Type: COMMENT; Schema: public; Owner: infini_automation_deploy
--

COMMENT ON COLUMN public.hdb_registration_travel_plan.return_journey_ticket_signed_url IS 'Signed S3 URL for return journey ticket';


--
-- Name: hdb_registration_travel_plan_id_seq; Type: SEQUENCE; Schema: public; Owner: infini_automation_deploy
--

CREATE SEQUENCE public.hdb_registration_travel_plan_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.hdb_registration_travel_plan_id_seq OWNER TO infini_automation_deploy;

--
-- Name: hdb_registration_travel_plan_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: infini_automation_deploy
--

ALTER SEQUENCE public.hdb_registration_travel_plan_id_seq OWNED BY public.hdb_registration_travel_plan.id;


--
-- Name: hdb_swap_requested_program; Type: TABLE; Schema: public; Owner: infini_automation_deploy
--

CREATE TABLE public.hdb_swap_requested_program (
    id integer NOT NULL,
    swap_request_id bigint,
    program_id bigint,
    created_at timestamp without time zone,
    updated_at timestamp without time zone,
    created_by bigint,
    updated_by bigint
);


ALTER TABLE public.hdb_swap_requested_program OWNER TO infini_automation_deploy;

--
-- Name: hdb_swap_requested_program_id_seq; Type: SEQUENCE; Schema: public; Owner: infini_automation_deploy
--

CREATE SEQUENCE public.hdb_swap_requested_program_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.hdb_swap_requested_program_id_seq OWNER TO infini_automation_deploy;

--
-- Name: hdb_swap_requested_program_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: infini_automation_deploy
--

ALTER SEQUENCE public.hdb_swap_requested_program_id_seq OWNED BY public.hdb_swap_requested_program.id;


--
-- Name: id_proof_export_jobs; Type: TABLE; Schema: public; Owner: infini_automation_deploy
--

CREATE TABLE public.id_proof_export_jobs (
    id integer NOT NULL,
    status character varying(20) DEFAULT 'pending'::character varying NOT NULL,
    progress integer DEFAULT 0 NOT NULL,
    total_records integer DEFAULT 0 NOT NULL,
    processed_records integer DEFAULT 0 NOT NULL,
    s3_url text,
    signed_url text,
    error_message text,
    created_by integer NOT NULL,
    program_id integer,
    filters jsonb,
    folder_name character varying(255),
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL,
    updated_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL,
    completed_at timestamp without time zone,
    deleted_at timestamp without time zone,
    CONSTRAINT id_proof_export_jobs_status_check CHECK (((status)::text = ANY (ARRAY[('pending'::character varying)::text, ('processing'::character varying)::text, ('completed'::character varying)::text, ('failed'::character varying)::text])))
);


ALTER TABLE public.id_proof_export_jobs OWNER TO infini_automation_deploy;

--
-- Name: TABLE id_proof_export_jobs; Type: COMMENT; Schema: public; Owner: infini_automation_deploy
--

COMMENT ON TABLE public.id_proof_export_jobs IS 'Stores ID proof export job tracking information';


--
-- Name: COLUMN id_proof_export_jobs.status; Type: COMMENT; Schema: public; Owner: infini_automation_deploy
--

COMMENT ON COLUMN public.id_proof_export_jobs.status IS 'Current status: pending, processing, completed, failed';


--
-- Name: COLUMN id_proof_export_jobs.progress; Type: COMMENT; Schema: public; Owner: infini_automation_deploy
--

COMMENT ON COLUMN public.id_proof_export_jobs.progress IS 'Progress percentage (0-100)';


--
-- Name: COLUMN id_proof_export_jobs.total_records; Type: COMMENT; Schema: public; Owner: infini_automation_deploy
--

COMMENT ON COLUMN public.id_proof_export_jobs.total_records IS 'Total number of records to process';


--
-- Name: COLUMN id_proof_export_jobs.processed_records; Type: COMMENT; Schema: public; Owner: infini_automation_deploy
--

COMMENT ON COLUMN public.id_proof_export_jobs.processed_records IS 'Number of records processed';


--
-- Name: COLUMN id_proof_export_jobs.s3_url; Type: COMMENT; Schema: public; Owner: infini_automation_deploy
--

COMMENT ON COLUMN public.id_proof_export_jobs.s3_url IS 'S3 URL of the generated zip file';


--
-- Name: COLUMN id_proof_export_jobs.signed_url; Type: COMMENT; Schema: public; Owner: infini_automation_deploy
--

COMMENT ON COLUMN public.id_proof_export_jobs.signed_url IS 'Temporary signed URL for download';


--
-- Name: COLUMN id_proof_export_jobs.error_message; Type: COMMENT; Schema: public; Owner: infini_automation_deploy
--

COMMENT ON COLUMN public.id_proof_export_jobs.error_message IS 'Error message if job failed';


--
-- Name: COLUMN id_proof_export_jobs.created_by; Type: COMMENT; Schema: public; Owner: infini_automation_deploy
--

COMMENT ON COLUMN public.id_proof_export_jobs.created_by IS 'User ID who created the job';


--
-- Name: COLUMN id_proof_export_jobs.program_id; Type: COMMENT; Schema: public; Owner: infini_automation_deploy
--

COMMENT ON COLUMN public.id_proof_export_jobs.program_id IS 'Program ID filter used';


--
-- Name: COLUMN id_proof_export_jobs.filters; Type: COMMENT; Schema: public; Owner: infini_automation_deploy
--

COMMENT ON COLUMN public.id_proof_export_jobs.filters IS 'Complete filter object from API request';


--
-- Name: COLUMN id_proof_export_jobs.folder_name; Type: COMMENT; Schema: public; Owner: infini_automation_deploy
--

COMMENT ON COLUMN public.id_proof_export_jobs.folder_name IS 'Folder name in S3 for the export';


--
-- Name: COLUMN id_proof_export_jobs.completed_at; Type: COMMENT; Schema: public; Owner: infini_automation_deploy
--

COMMENT ON COLUMN public.id_proof_export_jobs.completed_at IS 'Timestamp when job completed or failed';


--
-- Name: COLUMN id_proof_export_jobs.deleted_at; Type: COMMENT; Schema: public; Owner: infini_automation_deploy
--

COMMENT ON COLUMN public.id_proof_export_jobs.deleted_at IS 'Soft delete timestamp';


--
-- Name: id_proof_export_jobs_id_seq; Type: SEQUENCE; Schema: public; Owner: infini_automation_deploy
--

CREATE SEQUENCE public.id_proof_export_jobs_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.id_proof_export_jobs_id_seq OWNER TO infini_automation_deploy;

--
-- Name: id_proof_export_jobs_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: infini_automation_deploy
--

ALTER SEQUENCE public.id_proof_export_jobs_id_seq OWNED BY public.id_proof_export_jobs.id;


--
-- Name: infini_message_group_mapping; Type: TABLE; Schema: public; Owner: infini_automation_deploy
--

CREATE TABLE public.infini_message_group_mapping (
    id integer NOT NULL,
    message_id integer NOT NULL,
    user_id integer,
    group_id integer NOT NULL,
    created_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP NOT NULL,
    updated_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP NOT NULL,
    deleted_at timestamp without time zone
);


ALTER TABLE public.infini_message_group_mapping OWNER TO infini_automation_deploy;

--
-- Name: infini_message_group_mapping_id_seq; Type: SEQUENCE; Schema: public; Owner: infini_automation_deploy
--

CREATE SEQUENCE public.infini_message_group_mapping_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.infini_message_group_mapping_id_seq OWNER TO infini_automation_deploy;

--
-- Name: infini_message_group_mapping_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: infini_automation_deploy
--

ALTER SEQUENCE public.infini_message_group_mapping_id_seq OWNED BY public.infini_message_group_mapping.id;


--
-- Name: infini_message_track; Type: TABLE; Schema: public; Owner: infini_automation_deploy
--

CREATE TABLE public.infini_message_track (
    id integer NOT NULL,
    message_id integer,
    user_id character varying(255),
    created_at timestamp with time zone,
    updated_at timestamp with time zone
);


ALTER TABLE public.infini_message_track OWNER TO infini_automation_deploy;

--
-- Name: infini_message_track_id_seq; Type: SEQUENCE; Schema: public; Owner: infini_automation_deploy
--

CREATE SEQUENCE public.infini_message_track_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.infini_message_track_id_seq OWNER TO infini_automation_deploy;

--
-- Name: infini_message_track_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: infini_automation_deploy
--

ALTER SEQUENCE public.infini_message_track_id_seq OWNED BY public.infini_message_track.id;


--
-- Name: infini_message_user_approval; Type: TABLE; Schema: public; Owner: infini_automation_deploy
--

CREATE TABLE public.infini_message_user_approval (
    id integer NOT NULL,
    user_id integer,
    created_at timestamp with time zone,
    rejected_at timestamp with time zone
);


ALTER TABLE public.infini_message_user_approval OWNER TO infini_automation_deploy;

--
-- Name: infini_message_user_approval_id_seq; Type: SEQUENCE; Schema: public; Owner: infini_automation_deploy
--

CREATE SEQUENCE public.infini_message_user_approval_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.infini_message_user_approval_id_seq OWNER TO infini_automation_deploy;

--
-- Name: infini_message_user_approval_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: infini_automation_deploy
--

ALTER SEQUENCE public.infini_message_user_approval_id_seq OWNED BY public.infini_message_user_approval.id;


--
-- Name: infini_message_user_fcm_mapping; Type: TABLE; Schema: public; Owner: infini_automation_deploy
--

CREATE TABLE public.infini_message_user_fcm_mapping (
    id integer NOT NULL,
    user_id character varying,
    fcm_key character varying,
    created_at timestamp with time zone,
    updated_at timestamp with time zone
);


ALTER TABLE public.infini_message_user_fcm_mapping OWNER TO infini_automation_deploy;

--
-- Name: infini_message_user_fcm_mapping_id_seq; Type: SEQUENCE; Schema: public; Owner: infini_automation_deploy
--

CREATE SEQUENCE public.infini_message_user_fcm_mapping_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.infini_message_user_fcm_mapping_id_seq OWNER TO infini_automation_deploy;

--
-- Name: infini_message_user_fcm_mapping_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: infini_automation_deploy
--

ALTER SEQUENCE public.infini_message_user_fcm_mapping_id_seq OWNED BY public.infini_message_user_fcm_mapping.id;


--
-- Name: infini_message_user_group_mapping; Type: TABLE; Schema: public; Owner: infini_automation_deploy
--

CREATE TABLE public.infini_message_user_group_mapping (
    id integer NOT NULL,
    group_id integer NOT NULL,
    user_id integer NOT NULL,
    created_by integer NOT NULL,
    updated_by integer NOT NULL,
    created_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP NOT NULL,
    updated_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP NOT NULL,
    deleted_at timestamp with time zone
);


ALTER TABLE public.infini_message_user_group_mapping OWNER TO infini_automation_deploy;

--
-- Name: infini_message_user_group_mapping_id_seq; Type: SEQUENCE; Schema: public; Owner: infini_automation_deploy
--

CREATE SEQUENCE public.infini_message_user_group_mapping_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.infini_message_user_group_mapping_id_seq OWNER TO infini_automation_deploy;

--
-- Name: infini_message_user_group_mapping_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: infini_automation_deploy
--

ALTER SEQUENCE public.infini_message_user_group_mapping_id_seq OWNED BY public.infini_message_user_group_mapping.id;


--
-- Name: infini_messages; Type: TABLE; Schema: public; Owner: infini_automation_deploy
--

CREATE TABLE public.infini_messages (
    id integer NOT NULL,
    message_title text,
    message_content text,
    created_at timestamp with time zone,
    updated_at timestamp with time zone,
    message_type character varying(20),
    tag_ids integer[],
    android_text_content jsonb,
    android_message_title jsonb,
    is_premium boolean
);


ALTER TABLE public.infini_messages OWNER TO infini_automation_deploy;

--
-- Name: infini_messages_id_seq; Type: SEQUENCE; Schema: public; Owner: infini_automation_deploy
--

CREATE SEQUENCE public.infini_messages_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.infini_messages_id_seq OWNER TO infini_automation_deploy;

--
-- Name: infini_messages_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: infini_automation_deploy
--

ALTER SEQUENCE public.infini_messages_id_seq OWNED BY public.infini_messages.id;


--
-- Name: infini_path_bulk_registration; Type: TABLE; Schema: public; Owner: infini_automation_deploy
--

CREATE TABLE public.infini_path_bulk_registration (
    id integer NOT NULL,
    webinar_id integer NOT NULL,
    user_id integer,
    country_code character varying(10),
    phone_number character varying(15),
    first_name character varying(255),
    last_name character varying(255),
    email character varying(255),
    registration_type character varying(255),
    is_registered boolean,
    errors json,
    created_by integer,
    status character varying(255),
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
    updated_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP
);


ALTER TABLE public.infini_path_bulk_registration OWNER TO infini_automation_deploy;

--
-- Name: infini_path_bulk_registration_id_seq; Type: SEQUENCE; Schema: public; Owner: infini_automation_deploy
--

CREATE SEQUENCE public.infini_path_bulk_registration_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.infini_path_bulk_registration_id_seq OWNER TO infini_automation_deploy;

--
-- Name: infini_path_bulk_registration_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: infini_automation_deploy
--

ALTER SEQUENCE public.infini_path_bulk_registration_id_seq OWNED BY public.infini_path_bulk_registration.id;


--
-- Name: infini_path_meeting; Type: TABLE; Schema: public; Owner: infini_automation_deploy
--

CREATE TABLE public.infini_path_meeting (
    id integer NOT NULL,
    meeting_id bigint,
    password character varying(255),
    created_at timestamp with time zone,
    deleted_at timestamp with time zone,
    start_date timestamp with time zone,
    start_url character varying,
    duration integer,
    started_at timestamp with time zone,
    started_by bigint,
    created_by bigint,
    registration_starts_at timestamp with time zone,
    registration_ends_at timestamp with time zone,
    title character varying
);


ALTER TABLE public.infini_path_meeting OWNER TO infini_automation_deploy;

--
-- Name: infini_path_meeting_attendee; Type: TABLE; Schema: public; Owner: infini_automation_deploy
--

CREATE TABLE public.infini_path_meeting_attendee (
    id integer NOT NULL,
    infini_path_meeting_member_id integer,
    infini_path_meeting_id integer
);


ALTER TABLE public.infini_path_meeting_attendee OWNER TO infini_automation_deploy;

--
-- Name: infini_path_meeting_attendee_id_seq; Type: SEQUENCE; Schema: public; Owner: infini_automation_deploy
--

CREATE SEQUENCE public.infini_path_meeting_attendee_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.infini_path_meeting_attendee_id_seq OWNER TO infini_automation_deploy;

--
-- Name: infini_path_meeting_attendee_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: infini_automation_deploy
--

ALTER SEQUENCE public.infini_path_meeting_attendee_id_seq OWNED BY public.infini_path_meeting_attendee.id;


--
-- Name: infini_path_meeting_id_seq; Type: SEQUENCE; Schema: public; Owner: infini_automation_deploy
--

CREATE SEQUENCE public.infini_path_meeting_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.infini_path_meeting_id_seq OWNER TO infini_automation_deploy;

--
-- Name: infini_path_meeting_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: infini_automation_deploy
--

ALTER SEQUENCE public.infini_path_meeting_id_seq OWNED BY public.infini_path_meeting.id;


--
-- Name: infini_path_meeting_member; Type: TABLE; Schema: public; Owner: infini_automation_deploy
--

CREATE TABLE public.infini_path_meeting_member (
    id integer NOT NULL,
    first_name character varying(255),
    last_name character varying(255),
    phone_number bigint,
    deleted_at timestamp with time zone,
    user_id integer,
    created_at timestamp with time zone,
    updated_at timestamp with time zone
);


ALTER TABLE public.infini_path_meeting_member OWNER TO infini_automation_deploy;

--
-- Name: infini_path_meeting_member_id_seq; Type: SEQUENCE; Schema: public; Owner: infini_automation_deploy
--

CREATE SEQUENCE public.infini_path_meeting_member_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.infini_path_meeting_member_id_seq OWNER TO infini_automation_deploy;

--
-- Name: infini_path_meeting_member_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: infini_automation_deploy
--

ALTER SEQUENCE public.infini_path_meeting_member_id_seq OWNED BY public.infini_path_meeting_member.id;


--
-- Name: infini_path_member; Type: TABLE; Schema: public; Owner: infini_automation_deploy
--

CREATE TABLE public.infini_path_member (
    id integer NOT NULL,
    relation character varying(255),
    member_user_id integer,
    member_related_with_user_id integer,
    created_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP,
    updated_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP,
    deleted_at timestamp with time zone
);


ALTER TABLE public.infini_path_member OWNER TO infini_automation_deploy;

--
-- Name: infini_path_member_id_seq; Type: SEQUENCE; Schema: public; Owner: infini_automation_deploy
--

CREATE SEQUENCE public.infini_path_member_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.infini_path_member_id_seq OWNER TO infini_automation_deploy;

--
-- Name: infini_path_member_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: infini_automation_deploy
--

ALTER SEQUENCE public.infini_path_member_id_seq OWNED BY public.infini_path_member.id;


--
-- Name: infini_path_profile_image; Type: TABLE; Schema: public; Owner: infini_automation_deploy
--

CREATE TABLE public.infini_path_profile_image (
    id integer NOT NULL,
    user_id integer,
    face_id character varying,
    created_at timestamp with time zone,
    updated_at timestamp with time zone,
    deleted_at timestamp with time zone,
    image_url character varying
);


ALTER TABLE public.infini_path_profile_image OWNER TO infini_automation_deploy;

--
-- Name: infini_path_profile_image_id_seq; Type: SEQUENCE; Schema: public; Owner: infini_automation_deploy
--

CREATE SEQUENCE public.infini_path_profile_image_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.infini_path_profile_image_id_seq OWNER TO infini_automation_deploy;

--
-- Name: infini_path_profile_image_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: infini_automation_deploy
--

ALTER SEQUENCE public.infini_path_profile_image_id_seq OWNED BY public.infini_path_profile_image.id;


--
-- Name: infini_path_user_meeting; Type: TABLE; Schema: public; Owner: infini_automation_deploy
--

CREATE TABLE public.infini_path_user_meeting (
    id integer NOT NULL,
    user_id bigint,
    infini_path_meeting_id integer,
    created_at timestamp with time zone,
    updated_at timestamp with time zone,
    deleted_at timestamp with time zone,
    join_url character varying(255),
    is_panelist boolean,
    is_attended boolean,
    registration_id character varying(255)
);


ALTER TABLE public.infini_path_user_meeting OWNER TO infini_automation_deploy;

--
-- Name: infini_path_user_meeting_id_seq; Type: SEQUENCE; Schema: public; Owner: infini_automation_deploy
--

CREATE SEQUENCE public.infini_path_user_meeting_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.infini_path_user_meeting_id_seq OWNER TO infini_automation_deploy;

--
-- Name: infini_path_user_meeting_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: infini_automation_deploy
--

ALTER SEQUENCE public.infini_path_user_meeting_id_seq OWNED BY public.infini_path_user_meeting.id;


--
-- Name: infini_tags; Type: TABLE; Schema: public; Owner: infini_automation_deploy
--

CREATE TABLE public.infini_tags (
    id integer NOT NULL,
    tag_name character varying(255),
    created_at timestamp with time zone,
    updated_at timestamp with time zone,
    is_deleted boolean
);


ALTER TABLE public.infini_tags OWNER TO infini_automation_deploy;

--
-- Name: infini_tags_id_seq; Type: SEQUENCE; Schema: public; Owner: infini_automation_deploy
--

CREATE SEQUENCE public.infini_tags_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.infini_tags_id_seq OWNER TO infini_automation_deploy;

--
-- Name: infini_tags_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: infini_automation_deploy
--

ALTER SEQUENCE public.infini_tags_id_seq OWNED BY public.infini_tags.id;


--
-- Name: infiniminute_messages; Type: TABLE; Schema: public; Owner: infini_automation_deploy
--

CREATE TABLE public.infiniminute_messages (
    id integer NOT NULL,
    message character varying,
    create_at timestamp with time zone NOT NULL,
    updated_at timestamp with time zone NOT NULL
);


ALTER TABLE public.infiniminute_messages OWNER TO infini_automation_deploy;

--
-- Name: infiniminute_messages_id_seq; Type: SEQUENCE; Schema: public; Owner: infini_automation_deploy
--

CREATE SEQUENCE public.infiniminute_messages_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.infiniminute_messages_id_seq OWNER TO infini_automation_deploy;

--
-- Name: infiniminute_messages_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: infini_automation_deploy
--

ALTER SEQUENCE public.infiniminute_messages_id_seq OWNED BY public.infiniminute_messages.id;


--
-- Name: infinitheism_application; Type: TABLE; Schema: public; Owner: infini_automation_deploy
--

CREATE TABLE public.infinitheism_application (
    id integer NOT NULL,
    name text NOT NULL,
    description text,
    status character varying(255) NOT NULL,
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
    updated_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
    deleted_at timestamp without time zone
);


ALTER TABLE public.infinitheism_application OWNER TO infini_automation_deploy;

--
-- Name: infinitheism_application_id_seq; Type: SEQUENCE; Schema: public; Owner: infini_automation_deploy
--

CREATE SEQUENCE public.infinitheism_application_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.infinitheism_application_id_seq OWNER TO infini_automation_deploy;

--
-- Name: infinitheism_application_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: infini_automation_deploy
--

ALTER SEQUENCE public.infinitheism_application_id_seq OWNED BY public.infinitheism_application.id;


--
-- Name: lookup_data; Type: TABLE; Schema: public; Owner: infini_automation_deploy
--

CREATE TABLE public.lookup_data (
    id integer NOT NULL,
    lookup_category character varying(255) NOT NULL,
    lookup_category_name character varying(255),
    lookup_key character varying(255) NOT NULL,
    lookup_label character varying(255) NOT NULL,
    lookup_status public.hdb_common_status_enum DEFAULT 'active'::public.hdb_common_status_enum NOT NULL,
    lookup_order integer DEFAULT 0 NOT NULL
);


ALTER TABLE public.lookup_data OWNER TO infini_automation_deploy;

--
-- Name: lookup_data_id_seq; Type: SEQUENCE; Schema: public; Owner: infini_automation_deploy
--

CREATE SEQUENCE public.lookup_data_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.lookup_data_id_seq OWNER TO infini_automation_deploy;

--
-- Name: lookup_data_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: infini_automation_deploy
--

ALTER SEQUENCE public.lookup_data_id_seq OWNED BY public.lookup_data.id;


--
-- Name: portal_scheduler_logs; Type: TABLE; Schema: public; Owner: infini_automation_deploy
--

CREATE TABLE public.portal_scheduler_logs (
    id bigint NOT NULL,
    job_name character varying(100) NOT NULL,
    job_type character varying(100) NOT NULL,
    request_payload jsonb,
    response_data jsonb,
    execution_status character varying(50) DEFAULT 'pending'::character varying NOT NULL,
    attempt_number integer DEFAULT 1 NOT NULL,
    total_attempts integer DEFAULT 1 NOT NULL,
    error_message text,
    error_stack text,
    execution_time_ms integer,
    program_id bigint,
    registration_id bigint,
    triggered_by_user_id bigint NOT NULL,
    triggered_type character varying(50) DEFAULT 'scheduled'::character varying NOT NULL,
    completed_at timestamp with time zone,
    failed_at timestamp with time zone,
    created_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP,
    updated_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP
);


ALTER TABLE public.portal_scheduler_logs OWNER TO infini_automation_deploy;

--
-- Name: portal_scheduler_logs_id_seq; Type: SEQUENCE; Schema: public; Owner: infini_automation_deploy
--

CREATE SEQUENCE public.portal_scheduler_logs_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.portal_scheduler_logs_id_seq OWNER TO infini_automation_deploy;

--
-- Name: portal_scheduler_logs_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: infini_automation_deploy
--

ALTER SEQUENCE public.portal_scheduler_logs_id_seq OWNED BY public.portal_scheduler_logs.id;


--
-- Name: program; Type: TABLE; Schema: public; Owner: infini_automation_deploy
--

CREATE TABLE public.program (
    program_id integer NOT NULL,
    program_name character varying(255),
    program_type_id integer,
    created_at timestamp with time zone DEFAULT now(),
    updated_at timestamp with time zone DEFAULT now()
);


ALTER TABLE public.program OWNER TO infini_automation_deploy;

--
-- Name: program_attendance; Type: TABLE; Schema: public; Owner: infini_automation_deploy
--

CREATE TABLE public.program_attendance (
    program_attendance_id integer NOT NULL,
    program_occurrence_id integer,
    user_id integer,
    created_at timestamp with time zone DEFAULT now(),
    updated_at timestamp with time zone DEFAULT now()
);


ALTER TABLE public.program_attendance OWNER TO infini_automation_deploy;

--
-- Name: program_attendance_program_attendance_id_seq; Type: SEQUENCE; Schema: public; Owner: infini_automation_deploy
--

CREATE SEQUENCE public.program_attendance_program_attendance_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.program_attendance_program_attendance_id_seq OWNER TO infini_automation_deploy;

--
-- Name: program_attendance_program_attendance_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: infini_automation_deploy
--

ALTER SEQUENCE public.program_attendance_program_attendance_id_seq OWNED BY public.program_attendance.program_attendance_id;


--
-- Name: program_message; Type: TABLE; Schema: public; Owner: infini_automation_deploy
--

CREATE TABLE public.program_message (
    id integer NOT NULL,
    program_id integer NOT NULL,
    seeker_id integer NOT NULL,
    sender_id integer NOT NULL,
    receiver_id integer,
    receiver_role_flag boolean DEFAULT false,
    cc_role_id integer,
    content text NOT NULL,
    created_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP,
    created_by integer,
    audit_ref_id bigint,
    parent_ref_id bigint
);


ALTER TABLE public.program_message OWNER TO infini_automation_deploy;

--
-- Name: COLUMN program_message.audit_ref_id; Type: COMMENT; Schema: public; Owner: infini_automation_deploy
--

COMMENT ON COLUMN public.program_message.audit_ref_id IS 'Reference ID for audit tracking, typically the entity ID itself';


--
-- Name: COLUMN program_message.parent_ref_id; Type: COMMENT; Schema: public; Owner: infini_automation_deploy
--

COMMENT ON COLUMN public.program_message.parent_ref_id IS 'Parent reference ID for audit tracking, typically the entity ID itself';


--
-- Name: program_message_id_seq; Type: SEQUENCE; Schema: public; Owner: infini_automation_deploy
--

CREATE SEQUENCE public.program_message_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.program_message_id_seq OWNER TO infini_automation_deploy;

--
-- Name: program_message_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: infini_automation_deploy
--

ALTER SEQUENCE public.program_message_id_seq OWNED BY public.program_message.id;


--
-- Name: program_occurrence; Type: TABLE; Schema: public; Owner: infini_automation_deploy
--

CREATE TABLE public.program_occurrence (
    program_occurrence_id integer NOT NULL,
    program_id integer,
    start_date date,
    start_time time with time zone,
    end_date date,
    end_time time with time zone,
    created_at timestamp with time zone DEFAULT now(),
    updated_at timestamp with time zone DEFAULT now(),
    program_year integer
);


ALTER TABLE public.program_occurrence OWNER TO infini_automation_deploy;

--
-- Name: program_occurrence_program_occurrence_id_seq; Type: SEQUENCE; Schema: public; Owner: infini_automation_deploy
--

CREATE SEQUENCE public.program_occurrence_program_occurrence_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.program_occurrence_program_occurrence_id_seq OWNER TO infini_automation_deploy;

--
-- Name: program_occurrence_program_occurrence_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: infini_automation_deploy
--

ALTER SEQUENCE public.program_occurrence_program_occurrence_id_seq OWNED BY public.program_occurrence.program_occurrence_id;


--
-- Name: program_program_id_seq; Type: SEQUENCE; Schema: public; Owner: infini_automation_deploy
--

CREATE SEQUENCE public.program_program_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.program_program_id_seq OWNER TO infini_automation_deploy;

--
-- Name: program_program_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: infini_automation_deploy
--

ALTER SEQUENCE public.program_program_id_seq OWNED BY public.program.program_id;


--
-- Name: program_registration_failures; Type: TABLE; Schema: public; Owner: infini_automation_deploy
--

CREATE TABLE public.program_registration_failures (
    id bigint NOT NULL,
    program_id bigint NOT NULL,
    program_session_id bigint,
    payload jsonb NOT NULL,
    failure_reason character varying(255) NOT NULL,
    created_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP NOT NULL,
    updated_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP NOT NULL,
    deleted_at timestamp with time zone,
    created_by bigint,
    updated_by bigint,
    audit_ref_id bigint,
    parent_ref_id bigint
);


ALTER TABLE public.program_registration_failures OWNER TO infini_automation_deploy;

--
-- Name: COLUMN program_registration_failures.audit_ref_id; Type: COMMENT; Schema: public; Owner: infini_automation_deploy
--

COMMENT ON COLUMN public.program_registration_failures.audit_ref_id IS 'Reference ID for audit tracking, typically the entity ID itself';


--
-- Name: COLUMN program_registration_failures.parent_ref_id; Type: COMMENT; Schema: public; Owner: infini_automation_deploy
--

COMMENT ON COLUMN public.program_registration_failures.parent_ref_id IS 'Parent reference ID for audit tracking, typically the entity ID itself';


--
-- Name: program_registration_failures_id_seq; Type: SEQUENCE; Schema: public; Owner: infini_automation_deploy
--

CREATE SEQUENCE public.program_registration_failures_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.program_registration_failures_id_seq OWNER TO infini_automation_deploy;

--
-- Name: program_registration_failures_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: infini_automation_deploy
--

ALTER SEQUENCE public.program_registration_failures_id_seq OWNED BY public.program_registration_failures.id;


--
-- Name: program_room_inventory_map; Type: TABLE; Schema: public; Owner: infini_automation_deploy
--

CREATE TABLE public.program_room_inventory_map (
    id bigint NOT NULL,
    room_id bigint NOT NULL,
    program_id bigint NOT NULL,
    sub_program_id bigint,
    remaining_occupancy integer NOT NULL,
    is_reserved boolean NOT NULL,
    reserved_for character varying(255),
    room_status character varying(50) DEFAULT 'AVAILABLE'::public.room_status_enum NOT NULL,
    occupied_starts_at timestamp without time zone,
    occupied_ends_at timestamp without time zone,
    remarks text,
    created_at timestamp without time zone NOT NULL,
    updated_at timestamp without time zone,
    deleted_at timestamp without time zone,
    created_by bigint NOT NULL,
    updated_by bigint,
    room_category public.room_category_enum DEFAULT 'general'::public.room_category_enum NOT NULL
);


ALTER TABLE public.program_room_inventory_map OWNER TO infini_automation_deploy;

--
-- Name: program_room_inventory_map_id_seq; Type: SEQUENCE; Schema: public; Owner: infini_automation_deploy
--

CREATE SEQUENCE public.program_room_inventory_map_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.program_room_inventory_map_id_seq OWNER TO infini_automation_deploy;

--
-- Name: program_room_inventory_map_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: infini_automation_deploy
--

ALTER SEQUENCE public.program_room_inventory_map_id_seq OWNED BY public.program_room_inventory_map.id;


--
-- Name: program_session; Type: TABLE; Schema: public; Owner: infini_automation_deploy
--

CREATE TABLE public.program_session (
    id integer NOT NULL,
    program_id integer NOT NULL,
    name character varying(255) NOT NULL,
    description text,
    start_date date,
    start_time time with time zone,
    end_date date,
    end_time time with time zone,
    registration_start_date date,
    registration_start_time time with time zone,
    registration_end_date date,
    registration_end_time time with time zone,
    meta json DEFAULT '{}'::json,
    created_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP,
    updated_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP,
    mode_of_operation public.mode_of_operation_enum NOT NULL,
    online_type public.online_type_enum DEFAULT 'NA'::public.online_type_enum,
    max_session_duration_days integer DEFAULT 8,
    has_multiple_sessions boolean DEFAULT true,
    frequency public.frequency_enum DEFAULT 'yearly'::public.frequency_enum,
    default_start_time time without time zone,
    default_end_time time without time zone,
    duration character varying(50),
    requires_residence boolean DEFAULT false,
    involves_travel boolean DEFAULT false,
    has_checkin_checkout boolean DEFAULT false,
    requires_payment boolean DEFAULT true,
    requires_attendance_all_sessions boolean DEFAULT true,
    allows_minors boolean DEFAULT false,
    allows_proxy_registration boolean DEFAULT false,
    requires_approval boolean DEFAULT false,
    registration_level public.registration_level_enum DEFAULT 'session'::public.registration_level_enum,
    waitlist_applicable boolean DEFAULT false,
    limited_seats boolean DEFAULT false,
    is_grouped_program boolean DEFAULT false,
    total_seats integer,
    waitlist_trigger_count integer,
    available_seats integer,
    reserved_seats integer DEFAULT 0,
    filled_seats integer DEFAULT 0,
    max_capacity integer,
    session_fee numeric(10,2),
    base_price numeric(10,2) DEFAULT 0.00,
    gst_percentage numeric(5,2) DEFAULT 18.00,
    currency character varying(3) DEFAULT 'INR'::character varying,
    venue text,
    status public.session_status_enum DEFAULT 'scheduled'::public.session_status_enum,
    is_active boolean DEFAULT true,
    code character varying(50),
    display_order integer DEFAULT 1,
    banner_image_url character varying(1024) DEFAULT NULL::character varying,
    meeting_link character varying(500),
    meeting_id character varying(100),
    meeting_password character varying(100),
    deleted_at timestamp without time zone,
    created_by integer,
    updated_by integer,
    is_residence_required boolean DEFAULT false,
    is_travel_required boolean DEFAULT false,
    cgst numeric(5,2) DEFAULT 0,
    sgst numeric(5,2) DEFAULT 0,
    igst numeric(5,2) DEFAULT 0,
    tan_percent numeric(5,2) DEFAULT 0,
    registration_starts_at timestamp with time zone,
    registration_ends_at timestamp with time zone,
    checkin_at timestamp with time zone,
    checkout_at timestamp with time zone,
    starts_at timestamp with time zone,
    ends_at timestamp with time zone,
    tds_percent numeric(5,2) DEFAULT 0,
    gst_number character varying(50),
    tds_applicability public.tds_applicability_enum,
    invoice_sender_name character varying(255),
    invoice_sender_pan character varying(50),
    invoice_sender_cin character varying(50),
    venue_address_id integer,
    invoice_sender_address text,
    helpline_number text,
    email_sender_name text,
    venue_name_in_emails text,
    launch_date timestamp with time zone,
    logo_url character varying(1024) DEFAULT NULL::character varying,
    checkin_ends_at timestamp with time zone,
    checkout_ends_at timestamp with time zone,
    banner_animation_url character varying(1024),
    bless_ends_at timestamp with time zone,
    can_register_till timestamp with time zone
);


ALTER TABLE public.program_session OWNER TO infini_automation_deploy;

--
-- Name: COLUMN program_session.banner_animation_url; Type: COMMENT; Schema: public; Owner: infini_automation_deploy
--

COMMENT ON COLUMN public.program_session.banner_animation_url IS 'URL for banner animation video or GIF';


--
-- Name: COLUMN program_session.bless_ends_at; Type: COMMENT; Schema: public; Owner: infini_automation_deploy
--

COMMENT ON COLUMN public.program_session.bless_ends_at IS 'Date and time when the blessing period ends for this session';


--
-- Name: COLUMN program_session.can_register_till; Type: COMMENT; Schema: public; Owner: infini_automation_deploy
--

COMMENT ON COLUMN public.program_session.can_register_till IS 'Date and time till when registration is allowed for this session';


--
-- Name: program_session_id_seq; Type: SEQUENCE; Schema: public; Owner: infini_automation_deploy
--

CREATE SEQUENCE public.program_session_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.program_session_id_seq OWNER TO infini_automation_deploy;

--
-- Name: program_session_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: infini_automation_deploy
--

ALTER SEQUENCE public.program_session_id_seq OWNED BY public.program_session.id;


--
-- Name: program_type; Type: TABLE; Schema: public; Owner: infini_automation_deploy
--

CREATE TABLE public.program_type (
    program_type_id integer NOT NULL,
    program_type_name character varying(255),
    created_at timestamp with time zone DEFAULT now(),
    updated_at timestamp with time zone DEFAULT now(),
    deleted_at timestamp without time zone
);


ALTER TABLE public.program_type OWNER TO infini_automation_deploy;

--
-- Name: program_type_program_type_id_seq; Type: SEQUENCE; Schema: public; Owner: infini_automation_deploy
--

CREATE SEQUENCE public.program_type_program_type_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.program_type_program_type_id_seq OWNER TO infini_automation_deploy;

--
-- Name: program_type_program_type_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: infini_automation_deploy
--

ALTER SEQUENCE public.program_type_program_type_id_seq OWNED BY public.program_type.program_type_id;


--
-- Name: program_type_v1; Type: TABLE; Schema: public; Owner: infini_automation_deploy
--

CREATE TABLE public.program_type_v1 (
    id integer NOT NULL,
    program_type character varying(255),
    name character varying(255) NOT NULL,
    description text,
    created_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP,
    updated_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP,
    mode_of_operation public.mode_of_operation_enum NOT NULL,
    online_type public.online_type_enum DEFAULT 'NA'::public.online_type_enum,
    max_session_duration_days integer DEFAULT 8,
    has_multiple_sessions boolean DEFAULT true,
    frequency public.frequency_enum DEFAULT 'yearly'::public.frequency_enum,
    default_start_time time without time zone,
    default_end_time time without time zone,
    default_duration character varying(50),
    requires_residence boolean DEFAULT false,
    involves_travel boolean DEFAULT false,
    has_checkin_checkout boolean DEFAULT false,
    requires_payment boolean DEFAULT true,
    requires_attendance_all_sessions boolean DEFAULT true,
    allows_minors boolean DEFAULT false,
    allows_proxy_registration boolean DEFAULT false,
    requires_approval boolean DEFAULT false,
    registration_level public.registration_level_enum DEFAULT 'session'::public.registration_level_enum,
    is_active boolean DEFAULT true,
    created_by integer,
    updated_by integer,
    no_of_session integer DEFAULT 0 NOT NULL,
    waitlist_applicable boolean DEFAULT false,
    max_capacity integer DEFAULT 0,
    meta json DEFAULT '{}'::json,
    venue text,
    limited_seats boolean DEFAULT false,
    is_grouped_program boolean DEFAULT false,
    logo_url character varying(1024) DEFAULT NULL::character varying,
    banner_url character varying(1024) DEFAULT NULL::character varying,
    key character varying(255) NOT NULL,
    igst numeric(5,2) DEFAULT 0,
    cgst numeric(5,2) DEFAULT 0,
    sgst numeric(5,2) DEFAULT 0,
    gst_percentage numeric(5,2) DEFAULT 18.00,
    tds_percent numeric(5,2) DEFAULT 0,
    gst_number character varying(50),
    tds_applicability public.tds_applicability_enum,
    invoice_sender_name character varying(255),
    invoice_sender_pan character varying(50),
    invoice_sender_cin character varying(50),
    invoice_sender_address text,
    helpline_number text,
    email_sender_name text,
    venue_name_in_emails text,
    is_special_program boolean DEFAULT false,
    deleted_at timestamp with time zone,
    seeker_can_share_experience boolean DEFAULT false
);


ALTER TABLE public.program_type_v1 OWNER TO infini_automation_deploy;

--
-- Name: program_type_v1_id_seq; Type: SEQUENCE; Schema: public; Owner: infini_automation_deploy
--

CREATE SEQUENCE public.program_type_v1_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.program_type_v1_id_seq OWNER TO infini_automation_deploy;

--
-- Name: program_type_v1_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: infini_automation_deploy
--

ALTER SEQUENCE public.program_type_v1_id_seq OWNED BY public.program_type_v1.id;


--
-- Name: program_v1; Type: TABLE; Schema: public; Owner: infini_automation_deploy
--

CREATE TABLE public.program_v1 (
    id integer NOT NULL,
    program character varying(255),
    program_type_id integer NOT NULL,
    name character varying(255) NOT NULL,
    description text,
    start_date date,
    start_time time with time zone,
    end_date date,
    end_time time with time zone,
    no_of_session integer,
    registration_start_date date,
    registration_start_time time with time zone,
    registration_end_date date,
    registration_end_time time with time zone,
    meta json DEFAULT '{}'::json,
    created_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP,
    updated_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP,
    mode_of_operation public.mode_of_operation_enum NOT NULL,
    online_type public.online_type_enum DEFAULT 'NA'::public.online_type_enum,
    max_session_duration_days integer DEFAULT 8,
    has_multiple_sessions boolean DEFAULT true,
    frequency public.frequency_enum DEFAULT 'yearly'::public.frequency_enum,
    default_start_time time without time zone,
    default_end_time time without time zone,
    duration character varying(50),
    requires_residence boolean DEFAULT false,
    involves_travel boolean DEFAULT false,
    has_checkin_checkout boolean DEFAULT false,
    requires_payment boolean DEFAULT true,
    requires_attendance_all_sessions boolean DEFAULT true,
    allows_minors boolean DEFAULT false,
    allows_proxy_registration boolean DEFAULT false,
    requires_approval boolean DEFAULT false,
    registration_level public.registration_level_enum DEFAULT 'session'::public.registration_level_enum,
    waitlist_applicable boolean DEFAULT false,
    limited_seats boolean DEFAULT false,
    is_grouped_program boolean DEFAULT false,
    max_capacity integer,
    total_seats integer DEFAULT 0,
    waitlist_trigger_count integer DEFAULT 0,
    available_seats integer DEFAULT 0,
    filled_seats integer DEFAULT 0,
    program_fee numeric(10,2),
    base_price numeric(10,2) DEFAULT 0.00,
    gst_percentage numeric(5,2) DEFAULT 18.00,
    currency character varying(3) DEFAULT 'INR'::character varying,
    venue text,
    status public.program_status_enum DEFAULT 'draft'::public.program_status_enum,
    is_active boolean DEFAULT true,
    code character varying(50),
    banner_image_url character varying(1024) DEFAULT NULL::character varying,
    is_approval_required boolean DEFAULT false,
    is_residence_required boolean DEFAULT false,
    is_travel_involved boolean DEFAULT false,
    group_id uuid,
    is_primary_program boolean DEFAULT false,
    primary_program_id integer,
    group_display_order integer DEFAULT 1,
    cgst numeric(5,2) DEFAULT 0,
    sgst numeric(5,2) DEFAULT 0,
    igst numeric(5,2) DEFAULT 0,
    tan_percent numeric(5,2) DEFAULT 0,
    checkin_at timestamp with time zone,
    checkout_at timestamp with time zone,
    starts_at timestamp with time zone,
    ends_at timestamp with time zone,
    tds_percent numeric(5,2) DEFAULT 0,
    gst_number character varying(50),
    tds_applicability public.tds_applicability_enum,
    invoice_sender_name character varying(255),
    invoice_sender_pan character varying(50),
    invoice_sender_cin character varying(50),
    venue_address_id integer,
    invoice_sender_address text,
    helpline_number text,
    email_sender_name text,
    venue_name_in_emails text,
    launch_date timestamp with time zone,
    logo_url character varying(1024) DEFAULT NULL::character varying,
    checkin_ends_at timestamp with time zone,
    checkout_ends_at timestamp with time zone,
    created_by integer,
    updated_by integer,
    deleted_at timestamp without time zone,
    registration_starts_at timestamp with time zone,
    registration_ends_at timestamp with time zone,
    banner_animation_url character varying(1024),
    elder_min_age integer,
    child_max_age integer,
    sub_program_type public.sub_program_type_enum,
    total_bed_count integer DEFAULT 0,
    seeker_can_share_experience boolean DEFAULT false,
    bless_ends_at timestamp with time zone,
    can_register_till timestamp with time zone
);


ALTER TABLE public.program_v1 OWNER TO infini_automation_deploy;

--
-- Name: COLUMN program_v1.banner_animation_url; Type: COMMENT; Schema: public; Owner: infini_automation_deploy
--

COMMENT ON COLUMN public.program_v1.banner_animation_url IS 'URL for banner animation video or GIF';


--
-- Name: COLUMN program_v1.sub_program_type; Type: COMMENT; Schema: public; Owner: infini_automation_deploy
--

COMMENT ON COLUMN public.program_v1.sub_program_type IS 'Sub program type classification (PST_HDB, PST_MSD) - NULL for other programs';


--
-- Name: COLUMN program_v1.bless_ends_at; Type: COMMENT; Schema: public; Owner: infini_automation_deploy
--

COMMENT ON COLUMN public.program_v1.bless_ends_at IS 'Date and time when the blessing period ends';


--
-- Name: COLUMN program_v1.can_register_till; Type: COMMENT; Schema: public; Owner: infini_automation_deploy
--

COMMENT ON COLUMN public.program_v1.can_register_till IS 'Date and time till when registration is allowed';


--
-- Name: program_v1_id_seq; Type: SEQUENCE; Schema: public; Owner: infini_automation_deploy
--

CREATE SEQUENCE public.program_v1_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.program_v1_id_seq OWNER TO infini_automation_deploy;

--
-- Name: program_v1_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: infini_automation_deploy
--

ALTER SEQUENCE public.program_v1_id_seq OWNED BY public.program_v1.id;


--
-- Name: registration_group; Type: TABLE; Schema: public; Owner: infini_automation_deploy
--

CREATE TABLE public.registration_group (
    id bigint NOT NULL,
    group_name character varying(255) NOT NULL,
    program_id bigint NOT NULL,
    sub_program_id bigint,
    remarks text,
    created_at timestamp without time zone NOT NULL,
    updated_at timestamp without time zone,
    deleted_at timestamp without time zone,
    created_by bigint NOT NULL,
    updated_by bigint
);


ALTER TABLE public.registration_group OWNER TO infini_automation_deploy;

--
-- Name: registration_group_id_seq; Type: SEQUENCE; Schema: public; Owner: infini_automation_deploy
--

CREATE SEQUENCE public.registration_group_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.registration_group_id_seq OWNER TO infini_automation_deploy;

--
-- Name: registration_group_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: infini_automation_deploy
--

ALTER SEQUENCE public.registration_group_id_seq OWNED BY public.registration_group.id;


--
-- Name: registration_group_map; Type: TABLE; Schema: public; Owner: infini_automation_deploy
--

CREATE TABLE public.registration_group_map (
    id bigint NOT NULL,
    registration_group_id bigint NOT NULL,
    registration_id bigint NOT NULL,
    created_at timestamp without time zone NOT NULL,
    updated_at timestamp without time zone,
    deleted_at timestamp without time zone,
    created_by bigint NOT NULL,
    updated_by bigint
);


ALTER TABLE public.registration_group_map OWNER TO infini_automation_deploy;

--
-- Name: registration_group_map_id_seq; Type: SEQUENCE; Schema: public; Owner: infini_automation_deploy
--

CREATE SEQUENCE public.registration_group_map_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.registration_group_map_id_seq OWNER TO infini_automation_deploy;

--
-- Name: registration_group_map_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: infini_automation_deploy
--

ALTER SEQUENCE public.registration_group_map_id_seq OWNED BY public.registration_group_map.id;


--
-- Name: registration_pair; Type: TABLE; Schema: public; Owner: infini_automation_deploy
--

CREATE TABLE public.registration_pair (
    id bigint NOT NULL,
    pair_code character varying(10) NOT NULL,
    seq_number bigint NOT NULL,
    program_id bigint NOT NULL,
    sub_program_id bigint,
    remarks text,
    created_at timestamp without time zone NOT NULL,
    updated_at timestamp without time zone,
    deleted_at timestamp without time zone,
    created_by bigint NOT NULL,
    updated_by bigint
);


ALTER TABLE public.registration_pair OWNER TO infini_automation_deploy;

--
-- Name: registration_pair_id_seq; Type: SEQUENCE; Schema: public; Owner: infini_automation_deploy
--

CREATE SEQUENCE public.registration_pair_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.registration_pair_id_seq OWNER TO infini_automation_deploy;

--
-- Name: registration_pair_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: infini_automation_deploy
--

ALTER SEQUENCE public.registration_pair_id_seq OWNED BY public.registration_pair.id;


--
-- Name: registration_pair_map; Type: TABLE; Schema: public; Owner: infini_automation_deploy
--

CREATE TABLE public.registration_pair_map (
    id bigint NOT NULL,
    registration_pair_id bigint NOT NULL,
    registration_id bigint NOT NULL,
    created_at timestamp without time zone NOT NULL,
    updated_at timestamp without time zone,
    deleted_at timestamp without time zone,
    created_by bigint NOT NULL,
    updated_by bigint
);


ALTER TABLE public.registration_pair_map OWNER TO infini_automation_deploy;

--
-- Name: registration_pair_map_id_seq; Type: SEQUENCE; Schema: public; Owner: infini_automation_deploy
--

CREATE SEQUENCE public.registration_pair_map_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.registration_pair_map_id_seq OWNER TO infini_automation_deploy;

--
-- Name: registration_pair_map_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: infini_automation_deploy
--

ALTER SEQUENCE public.registration_pair_map_id_seq OWNED BY public.registration_pair_map.id;


--
-- Name: relation; Type: TABLE; Schema: public; Owner: infini_automation_deploy
--

CREATE TABLE public.relation (
    id integer NOT NULL,
    key character varying(255) NOT NULL,
    name character varying(255) NOT NULL,
    description text,
    created_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP,
    updated_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP
);


ALTER TABLE public.relation OWNER TO infini_automation_deploy;

--
-- Name: relation_id_seq; Type: SEQUENCE; Schema: public; Owner: infini_automation_deploy
--

CREATE SEQUENCE public.relation_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.relation_id_seq OWNER TO infini_automation_deploy;

--
-- Name: relation_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: infini_automation_deploy
--

ALTER SEQUENCE public.relation_id_seq OWNED BY public.relation.id;


--
-- Name: report_status; Type: TABLE; Schema: public; Owner: infini_automation_deploy
--

CREATE TABLE public.report_status (
    id integer NOT NULL,
    webinar_id integer NOT NULL,
    program_session_id integer,
    status_id integer,
    created_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP,
    updated_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP
);


ALTER TABLE public.report_status OWNER TO infini_automation_deploy;

--
-- Name: report_status_id_seq; Type: SEQUENCE; Schema: public; Owner: infini_automation_deploy
--

CREATE SEQUENCE public.report_status_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.report_status_id_seq OWNER TO infini_automation_deploy;

--
-- Name: report_status_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: infini_automation_deploy
--

ALTER SEQUENCE public.report_status_id_seq OWNED BY public.report_status.id;


--
-- Name: report_status_transaction; Type: TABLE; Schema: public; Owner: infini_automation_deploy
--

CREATE TABLE public.report_status_transaction (
    id integer NOT NULL,
    report_status_id integer,
    previous_status_id integer,
    new_status_id integer,
    changed_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP,
    changed_by character varying(255) NOT NULL
);


ALTER TABLE public.report_status_transaction OWNER TO infini_automation_deploy;

--
-- Name: report_status_transaction_id_seq; Type: SEQUENCE; Schema: public; Owner: infini_automation_deploy
--

CREATE SEQUENCE public.report_status_transaction_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.report_status_transaction_id_seq OWNER TO infini_automation_deploy;

--
-- Name: report_status_transaction_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: infini_automation_deploy
--

ALTER SEQUENCE public.report_status_transaction_id_seq OWNED BY public.report_status_transaction.id;


--
-- Name: report_status_type; Type: TABLE; Schema: public; Owner: infini_automation_deploy
--

CREATE TABLE public.report_status_type (
    id integer NOT NULL,
    name character varying(255) NOT NULL,
    created_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP,
    updated_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP
);


ALTER TABLE public.report_status_type OWNER TO infini_automation_deploy;

--
-- Name: report_status_type_id_seq; Type: SEQUENCE; Schema: public; Owner: infini_automation_deploy
--

CREATE SEQUENCE public.report_status_type_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.report_status_type_id_seq OWNER TO infini_automation_deploy;

--
-- Name: report_status_type_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: infini_automation_deploy
--

ALTER SEQUENCE public.report_status_type_id_seq OWNED BY public.report_status_type.id;


--
-- Name: room; Type: TABLE; Schema: public; Owner: infini_automation_deploy
--

CREATE TABLE public.room (
    id bigint NOT NULL,
    label character varying(255) NOT NULL,
    description text,
    floor_id bigint NOT NULL,
    room_number character varying(50) NOT NULL,
    occupancy integer NOT NULL,
    room_status character varying(50) NOT NULL,
    room_type character varying(50) NOT NULL,
    bed_type character varying(50),
    remarks text,
    created_at timestamp without time zone NOT NULL,
    updated_at timestamp without time zone,
    deleted_at timestamp without time zone,
    created_by bigint NOT NULL,
    updated_by bigint
);


ALTER TABLE public.room OWNER TO infini_automation_deploy;

--
-- Name: room_allocation; Type: TABLE; Schema: public; Owner: infini_automation_deploy
--

CREATE TABLE public.room_allocation (
    id bigint NOT NULL,
    program_room_inventory_map_id bigint NOT NULL,
    registration_id bigint NOT NULL,
    remarks text,
    bed_position integer,
    created_at timestamp without time zone NOT NULL,
    updated_at timestamp without time zone,
    deleted_at timestamp without time zone,
    created_by bigint NOT NULL,
    updated_by bigint
);


ALTER TABLE public.room_allocation OWNER TO infini_automation_deploy;

--
-- Name: room_allocation_history; Type: TABLE; Schema: public; Owner: infini_automation_deploy
--

CREATE TABLE public.room_allocation_history (
    id bigint NOT NULL,
    room_allocation_id bigint NOT NULL,
    program_room_inventory_map_id bigint NOT NULL,
    registration_id bigint NOT NULL,
    remarks text,
    bed_position integer,
    created_at timestamp without time zone NOT NULL,
    updated_at timestamp without time zone,
    created_by bigint NOT NULL,
    updated_by bigint
);


ALTER TABLE public.room_allocation_history OWNER TO infini_automation_deploy;

--
-- Name: room_allocation_history_id_seq; Type: SEQUENCE; Schema: public; Owner: infini_automation_deploy
--

CREATE SEQUENCE public.room_allocation_history_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.room_allocation_history_id_seq OWNER TO infini_automation_deploy;

--
-- Name: room_allocation_history_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: infini_automation_deploy
--

ALTER SEQUENCE public.room_allocation_history_id_seq OWNED BY public.room_allocation_history.id;


--
-- Name: room_allocation_id_seq; Type: SEQUENCE; Schema: public; Owner: infini_automation_deploy
--

CREATE SEQUENCE public.room_allocation_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.room_allocation_id_seq OWNER TO infini_automation_deploy;

--
-- Name: room_allocation_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: infini_automation_deploy
--

ALTER SEQUENCE public.room_allocation_id_seq OWNED BY public.room_allocation.id;


--
-- Name: room_id_seq; Type: SEQUENCE; Schema: public; Owner: infini_automation_deploy
--

CREATE SEQUENCE public.room_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.room_id_seq OWNER TO infini_automation_deploy;

--
-- Name: room_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: infini_automation_deploy
--

ALTER SEQUENCE public.room_id_seq OWNED BY public.room.id;


--
-- Name: scheduler_times; Type: TABLE; Schema: public; Owner: infini_automation_deploy
--

CREATE TABLE public.scheduler_times (
    scheduler_time_id integer NOT NULL,
    scheduler_id integer,
    scheduler_time character varying(255),
    scheduler_day character varying(255),
    user_id character varying(255) NOT NULL,
    "createdAt" timestamp with time zone,
    "updatedAt" timestamp with time zone,
    active boolean,
    is_repetitive boolean,
    created_at timestamp with time zone,
    updated_at timestamp with time zone
);


ALTER TABLE public.scheduler_times OWNER TO infini_automation_deploy;

--
-- Name: scheduler_times_scheduler_time_id_seq; Type: SEQUENCE; Schema: public; Owner: infini_automation_deploy
--

CREATE SEQUENCE public.scheduler_times_scheduler_time_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.scheduler_times_scheduler_time_id_seq OWNER TO infini_automation_deploy;

--
-- Name: scheduler_times_scheduler_time_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: infini_automation_deploy
--

ALTER SEQUENCE public.scheduler_times_scheduler_time_id_seq OWNED BY public.scheduler_times.scheduler_time_id;


--
-- Name: scheduler_trackers; Type: TABLE; Schema: public; Owner: infini_automation_deploy
--

CREATE TABLE public.scheduler_trackers (
    scheduler_tracker_id integer NOT NULL,
    scheduler_time_id integer,
    user_id character varying(255) NOT NULL,
    status boolean,
    "createdAt" timestamp with time zone,
    "updatedAt" timestamp with time zone,
    practice_time time with time zone,
    practice_type character varying(255),
    created_at timestamp with time zone,
    updated_at timestamp with time zone
);


ALTER TABLE public.scheduler_trackers OWNER TO infini_automation_deploy;

--
-- Name: scheduler_trackers_scheduler_tracker_id_seq; Type: SEQUENCE; Schema: public; Owner: infini_automation_deploy
--

CREATE SEQUENCE public.scheduler_trackers_scheduler_tracker_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.scheduler_trackers_scheduler_tracker_id_seq OWNER TO infini_automation_deploy;

--
-- Name: scheduler_trackers_scheduler_tracker_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: infini_automation_deploy
--

ALTER SEQUENCE public.scheduler_trackers_scheduler_tracker_id_seq OWNED BY public.scheduler_trackers.scheduler_tracker_id;


--
-- Name: schedulers; Type: TABLE; Schema: public; Owner: infini_automation_deploy
--

CREATE TABLE public.schedulers (
    scheduler_id integer NOT NULL,
    scheduler_name character varying(255) NOT NULL,
    scheduler_status character varying(255),
    user_id character varying(255) NOT NULL,
    "createdAt" timestamp with time zone,
    "updatedAt" timestamp with time zone,
    is_repetitive boolean,
    scheduler_type character varying,
    is_deleted boolean DEFAULT false NOT NULL,
    created_at timestamp with time zone,
    updated_at timestamp with time zone,
    non_doing_time integer DEFAULT 0 NOT NULL,
    uuid character varying
);


ALTER TABLE public.schedulers OWNER TO infini_automation_deploy;

--
-- Name: schedulers_scheduler_id_seq; Type: SEQUENCE; Schema: public; Owner: infini_automation_deploy
--

CREATE SEQUENCE public.schedulers_scheduler_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.schedulers_scheduler_id_seq OWNER TO infini_automation_deploy;

--
-- Name: schedulers_scheduler_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: infini_automation_deploy
--

ALTER SEQUENCE public.schedulers_scheduler_id_seq OWNED BY public.schedulers.scheduler_id;


--
-- Name: seeker_defaulter; Type: TABLE; Schema: public; Owner: infini_automation_deploy
--

CREATE TABLE public.seeker_defaulter (
    id bigint NOT NULL,
    user_id bigint NOT NULL,
    registration_id bigint NOT NULL,
    is_defaulter boolean NOT NULL,
    comment text,
    default_marker_role character varying(50) NOT NULL,
    created_by bigint NOT NULL,
    updated_by bigint,
    created_at timestamp with time zone NOT NULL,
    updated_at timestamp with time zone NOT NULL,
    deleted_at timestamp with time zone
);


ALTER TABLE public.seeker_defaulter OWNER TO infini_automation_deploy;

--
-- Name: TABLE seeker_defaulter; Type: COMMENT; Schema: public; Owner: infini_automation_deploy
--

COMMENT ON TABLE public.seeker_defaulter IS 'Stores defaulter status for seekers. User ID is the primary source of truth, registration ID tracks the context where defaulter was marked';


--
-- Name: COLUMN seeker_defaulter.user_id; Type: COMMENT; Schema: public; Owner: infini_automation_deploy
--

COMMENT ON COLUMN public.seeker_defaulter.user_id IS 'Reference to the user (seeker) who is marked as defaulter - PRIMARY SOURCE OF TRUTH';


--
-- Name: COLUMN seeker_defaulter.registration_id; Type: COMMENT; Schema: public; Owner: infini_automation_deploy
--

COMMENT ON COLUMN public.seeker_defaulter.registration_id IS 'Reference to the program registration where this defaulter status was created/last updated - for context and auditing';


--
-- Name: COLUMN seeker_defaulter.is_defaulter; Type: COMMENT; Schema: public; Owner: infini_automation_deploy
--

COMMENT ON COLUMN public.seeker_defaulter.is_defaulter IS 'Current defaulter status for the user (true = marked as defaulter, false = unmarked)';


--
-- Name: COLUMN seeker_defaulter.comment; Type: COMMENT; Schema: public; Owner: infini_automation_deploy
--

COMMENT ON COLUMN public.seeker_defaulter.comment IS 'Optional comment/reason for marking as defaulter';


--
-- Name: COLUMN seeker_defaulter.default_marker_role; Type: COMMENT; Schema: public; Owner: infini_automation_deploy
--

COMMENT ON COLUMN public.seeker_defaulter.default_marker_role IS 'Role of the user who marked/unmarked (MAHATRIA, SHOBA, RELATIONAL_MANAGER)';


--
-- Name: COLUMN seeker_defaulter.deleted_at; Type: COMMENT; Schema: public; Owner: infini_automation_deploy
--

COMMENT ON COLUMN public.seeker_defaulter.deleted_at IS 'Soft delete timestamp - null means active record';


--
-- Name: seeker_defaulter_id_seq; Type: SEQUENCE; Schema: public; Owner: infini_automation_deploy
--

CREATE SEQUENCE public.seeker_defaulter_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.seeker_defaulter_id_seq OWNER TO infini_automation_deploy;

--
-- Name: seeker_defaulter_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: infini_automation_deploy
--

ALTER SEQUENCE public.seeker_defaulter_id_seq OWNED BY public.seeker_defaulter.id;


--
-- Name: seeker_defaulter_track; Type: TABLE; Schema: public; Owner: infini_automation_deploy
--

CREATE TABLE public.seeker_defaulter_track (
    id bigint NOT NULL,
    seeker_defaulter_id bigint NOT NULL,
    user_id bigint NOT NULL,
    registration_id bigint NOT NULL,
    performed_by bigint NOT NULL,
    action_type public.seeker_defaulter_action_enum NOT NULL,
    comment text,
    role character varying(50) NOT NULL,
    previous_is_defaulter boolean,
    new_is_defaulter boolean NOT NULL,
    previous_comment text,
    created_at timestamp with time zone NOT NULL
);


ALTER TABLE public.seeker_defaulter_track OWNER TO infini_automation_deploy;

--
-- Name: TABLE seeker_defaulter_track; Type: COMMENT; Schema: public; Owner: infini_automation_deploy
--

COMMENT ON TABLE public.seeker_defaulter_track IS 'Audit log for all defaulter status changes';


--
-- Name: COLUMN seeker_defaulter_track.action_type; Type: COMMENT; Schema: public; Owner: infini_automation_deploy
--

COMMENT ON COLUMN public.seeker_defaulter_track.action_type IS 'Type of action performed (MARKED, UNMARKED, COMMENT_UPDATED)';


--
-- Name: COLUMN seeker_defaulter_track.previous_is_defaulter; Type: COMMENT; Schema: public; Owner: infini_automation_deploy
--

COMMENT ON COLUMN public.seeker_defaulter_track.previous_is_defaulter IS 'Previous defaulter status before the action';


--
-- Name: COLUMN seeker_defaulter_track.new_is_defaulter; Type: COMMENT; Schema: public; Owner: infini_automation_deploy
--

COMMENT ON COLUMN public.seeker_defaulter_track.new_is_defaulter IS 'New defaulter status after the action';


--
-- Name: COLUMN seeker_defaulter_track.previous_comment; Type: COMMENT; Schema: public; Owner: infini_automation_deploy
--

COMMENT ON COLUMN public.seeker_defaulter_track.previous_comment IS 'Previous comment before update (if action is COMMENT_UPDATED)';


--
-- Name: seeker_defaulter_track_id_seq; Type: SEQUENCE; Schema: public; Owner: infini_automation_deploy
--

CREATE SEQUENCE public.seeker_defaulter_track_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.seeker_defaulter_track_id_seq OWNER TO infini_automation_deploy;

--
-- Name: seeker_defaulter_track_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: infini_automation_deploy
--

ALTER SEQUENCE public.seeker_defaulter_track_id_seq OWNED BY public.seeker_defaulter_track.id;


--
-- Name: seeker_program_experience; Type: TABLE; Schema: public; Owner: infini_automation_deploy
--

CREATE TABLE public.seeker_program_experience (
    id integer NOT NULL,
    user_id integer,
    registration_id integer,
    record_type character varying(100) NOT NULL,
    message text,
    media_url text,
    is_viewed boolean DEFAULT false,
    is_approved boolean DEFAULT false,
    is_private boolean DEFAULT false,
    deleted_reason text,
    created_by integer,
    updated_by integer,
    deleted_by integer,
    created_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP,
    updated_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP,
    deleted_at timestamp with time zone
);


ALTER TABLE public.seeker_program_experience OWNER TO infini_automation_deploy;

--
-- Name: seeker_program_experience_id_seq; Type: SEQUENCE; Schema: public; Owner: infini_automation_deploy
--

CREATE SEQUENCE public.seeker_program_experience_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.seeker_program_experience_id_seq OWNER TO infini_automation_deploy;

--
-- Name: seeker_program_experience_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: infini_automation_deploy
--

ALTER SEQUENCE public.seeker_program_experience_id_seq OWNED BY public.seeker_program_experience.id;


--
-- Name: temp_mesg_183; Type: TABLE; Schema: public; Owner: infini_automation_deploy
--

CREATE TABLE public.temp_mesg_183 (
    id integer,
    message_title text,
    message_content text,
    created_at timestamp with time zone,
    updated_at timestamp with time zone,
    message_type character varying(20),
    tag_ids integer[],
    android_text_content jsonb,
    android_message_title jsonb,
    is_premium boolean
);


ALTER TABLE public.temp_mesg_183 OWNER TO infini_automation_deploy;

--
-- Name: user_application_subscription_log; Type: TABLE; Schema: public; Owner: infini_automation_deploy
--

CREATE TABLE public.user_application_subscription_log (
    id integer NOT NULL,
    user_id integer NOT NULL,
    application_id integer NOT NULL,
    action character varying(255) NOT NULL,
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
    updated_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
    deleted_at timestamp without time zone
);


ALTER TABLE public.user_application_subscription_log OWNER TO infini_automation_deploy;

--
-- Name: user_application_subscription_log_id_seq; Type: SEQUENCE; Schema: public; Owner: infini_automation_deploy
--

CREATE SEQUENCE public.user_application_subscription_log_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.user_application_subscription_log_id_seq OWNER TO infini_automation_deploy;

--
-- Name: user_application_subscription_log_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: infini_automation_deploy
--

ALTER SEQUENCE public.user_application_subscription_log_id_seq OWNED BY public.user_application_subscription_log.id;


--
-- Name: user_application_subscription_status; Type: TABLE; Schema: public; Owner: infini_automation_deploy
--

CREATE TABLE public.user_application_subscription_status (
    id integer NOT NULL,
    user_id integer NOT NULL,
    application_id integer NOT NULL,
    status character varying(255) NOT NULL,
    subscribed_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
    unsubscribed_at timestamp without time zone,
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
    updated_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
    deleted_at timestamp without time zone
);


ALTER TABLE public.user_application_subscription_status OWNER TO infini_automation_deploy;

--
-- Name: user_application_subscription_status_id_seq; Type: SEQUENCE; Schema: public; Owner: infini_automation_deploy
--

CREATE SEQUENCE public.user_application_subscription_status_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.user_application_subscription_status_id_seq OWNER TO infini_automation_deploy;

--
-- Name: user_application_subscription_status_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: infini_automation_deploy
--

ALTER SEQUENCE public.user_application_subscription_status_id_seq OWNED BY public.user_application_subscription_status.id;


--
-- Name: user_device_information; Type: TABLE; Schema: public; Owner: infini_automation_deploy
--

CREATE TABLE public.user_device_information (
    user_device_information_id integer NOT NULL,
    user_id integer,
    subscription_id_ext character varying(255),
    onesignal_id_ext character varying(255),
    app_version character varying(255),
    device_type character varying(255),
    created_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP,
    updated_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP,
    app_type character varying(255),
    device_name character varying(255),
    device_os_version character varying(255),
    device_screen_resolution character varying(255)
);


ALTER TABLE public.user_device_information OWNER TO infini_automation_deploy;

--
-- Name: user_device_information_bkp_20241112; Type: TABLE; Schema: public; Owner: infini_automation_deploy
--

CREATE TABLE public.user_device_information_bkp_20241112 (
    user_device_information_id integer,
    user_id integer,
    subscription_id_ext character varying(255),
    onesignal_id_ext character varying(255),
    app_version character varying(255),
    device_type character varying(255),
    created_at timestamp with time zone,
    updated_at timestamp with time zone
);


ALTER TABLE public.user_device_information_bkp_20241112 OWNER TO infini_automation_deploy;

--
-- Name: user_device_information_user_device_information_id_seq; Type: SEQUENCE; Schema: public; Owner: infini_automation_deploy
--

CREATE SEQUENCE public.user_device_information_user_device_information_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.user_device_information_user_device_information_id_seq OWNER TO infini_automation_deploy;

--
-- Name: user_device_information_user_device_information_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: infini_automation_deploy
--

ALTER SEQUENCE public.user_device_information_user_device_information_id_seq OWNED BY public.user_device_information.user_device_information_id;


--
-- Name: user_participation_summary; Type: TABLE; Schema: public; Owner: infini_automation_deploy
--

CREATE TABLE public.user_participation_summary (
    id bigint NOT NULL,
    user_id bigint NOT NULL,
    program_id bigint NOT NULL,
    program_name text,
    sub_program_id bigint,
    sub_program_name text,
    session_id bigint,
    session_name text,
    created_by bigint,
    updated_by bigint,
    created_at timestamp without time zone DEFAULT now(),
    updated_at timestamp without time zone DEFAULT now(),
    deleted_at timestamp without time zone,
    program_starts_at timestamp with time zone,
    program_ends_at timestamp with time zone,
    sub_program_type public.sub_program_type_enum,
    origin_type public.origin_type_enum DEFAULT 'code_inserted'::public.origin_type_enum NOT NULL
);


ALTER TABLE public.user_participation_summary OWNER TO infini_automation_deploy;

--
-- Name: COLUMN user_participation_summary.program_starts_at; Type: COMMENT; Schema: public; Owner: infini_automation_deploy
--

COMMENT ON COLUMN public.user_participation_summary.program_starts_at IS 'Start date and time of the program';


--
-- Name: COLUMN user_participation_summary.program_ends_at; Type: COMMENT; Schema: public; Owner: infini_automation_deploy
--

COMMENT ON COLUMN public.user_participation_summary.program_ends_at IS 'End date and time of the program';


--
-- Name: COLUMN user_participation_summary.sub_program_type; Type: COMMENT; Schema: public; Owner: infini_automation_deploy
--

COMMENT ON COLUMN public.user_participation_summary.sub_program_type IS 'Sub program type classification for participation tracking - NULL for other programs';


--
-- Name: user_participation_summary_id_seq; Type: SEQUENCE; Schema: public; Owner: infini_automation_deploy
--

CREATE SEQUENCE public.user_participation_summary_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.user_participation_summary_id_seq OWNER TO infini_automation_deploy;

--
-- Name: user_participation_summary_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: infini_automation_deploy
--

ALTER SEQUENCE public.user_participation_summary_id_seq OWNED BY public.user_participation_summary.id;


--
-- Name: user_profile_extension; Type: TABLE; Schema: public; Owner: infini_automation_deploy
--

CREATE TABLE public.user_profile_extension (
    id bigint NOT NULL,
    user_id bigint NOT NULL,
    id_front_back_only_from_download_link text,
    id_back_only_download_link text,
    email_to_which_invoice_to_be_sent public.citext,
    name_in_which_invoice_to_be_issued text,
    invoice_address text,
    tan character varying(20),
    gstin character varying(20),
    are_you_registered_under_gst boolean,
    when_was_your_last_hdb_msd text,
    since_when_have_you_been_associated_with_this_path text,
    how_many_hdb_msd_have_you_done integer,
    which_of_the_following_have_you_experienced text,
    song_preference_1 text,
    song_preference_2 text,
    rm_rating numeric(5,2),
    rm_review text,
    contact_person text,
    created_at timestamp without time zone DEFAULT now(),
    updated_at timestamp without time zone DEFAULT now(),
    deleted_at timestamp without time zone,
    created_by bigint,
    updated_by bigint,
    infinitheism_contact bigint,
    pincode character varying(10),
    hdb_year text,
    id_front_url text,
    id_back_url text
);


ALTER TABLE public.user_profile_extension OWNER TO infini_automation_deploy;

--
-- Name: COLUMN user_profile_extension.id_front_back_only_from_download_link; Type: COMMENT; Schema: public; Owner: infini_automation_deploy
--

COMMENT ON COLUMN public.user_profile_extension.id_front_back_only_from_download_link IS 'Original ID front URL from Zoho/Entrainment - preserved for audit/reference';


--
-- Name: COLUMN user_profile_extension.id_back_only_download_link; Type: COMMENT; Schema: public; Owner: infini_automation_deploy
--

COMMENT ON COLUMN public.user_profile_extension.id_back_only_download_link IS 'Original ID back URL from Zoho/Entrainment - preserved for audit/reference';


--
-- Name: COLUMN user_profile_extension.pincode; Type: COMMENT; Schema: public; Owner: infini_automation_deploy
--

COMMENT ON COLUMN public.user_profile_extension.pincode IS 'Postal/ZIP code for the user';


--
-- Name: COLUMN user_profile_extension.id_front_url; Type: COMMENT; Schema: public; Owner: infini_automation_deploy
--

COMMENT ON COLUMN public.user_profile_extension.id_front_url IS 'Portal-hosted S3 URL for ID front - primary URL for application use';


--
-- Name: COLUMN user_profile_extension.id_back_url; Type: COMMENT; Schema: public; Owner: infini_automation_deploy
--

COMMENT ON COLUMN public.user_profile_extension.id_back_url IS 'Portal-hosted S3 URL for ID back - primary URL for application use';


--
-- Name: user_profile_extension_id_seq; Type: SEQUENCE; Schema: public; Owner: infini_automation_deploy
--

CREATE SEQUENCE public.user_profile_extension_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.user_profile_extension_id_seq OWNER TO infini_automation_deploy;

--
-- Name: user_profile_extension_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: infini_automation_deploy
--

ALTER SEQUENCE public.user_profile_extension_id_seq OWNED BY public.user_profile_extension.id;


--
-- Name: user_program_experience; Type: TABLE; Schema: public; Owner: infini_automation_deploy
--

CREATE TABLE public.user_program_experience (
    id integer NOT NULL,
    user_id integer NOT NULL,
    registration_id integer,
    lookup_data_id integer NOT NULL,
    created_by integer,
    updated_by integer,
    created_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP NOT NULL,
    updated_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP NOT NULL,
    deleted_at timestamp with time zone
);


ALTER TABLE public.user_program_experience OWNER TO infini_automation_deploy;

--
-- Name: user_program_experience_id_seq; Type: SEQUENCE; Schema: public; Owner: infini_automation_deploy
--

CREATE SEQUENCE public.user_program_experience_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.user_program_experience_id_seq OWNER TO infini_automation_deploy;

--
-- Name: user_program_experience_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: infini_automation_deploy
--

ALTER SEQUENCE public.user_program_experience_id_seq OWNED BY public.user_program_experience.id;


--
-- Name: user_registration_map; Type: TABLE; Schema: public; Owner: infini_automation_deploy
--

CREATE TABLE public.user_registration_map (
    id bigint NOT NULL,
    user_id bigint NOT NULL,
    registration_id bigint NOT NULL,
    summary_id bigint,
    created_by bigint,
    updated_by bigint,
    created_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP NOT NULL,
    updated_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP NOT NULL,
    deleted_at timestamp with time zone,
    origin_type public.origin_type_enum DEFAULT 'code_inserted'::public.origin_type_enum NOT NULL
);


ALTER TABLE public.user_registration_map OWNER TO infini_automation_deploy;

--
-- Name: user_registration_map_id_seq; Type: SEQUENCE; Schema: public; Owner: infini_automation_deploy
--

CREATE SEQUENCE public.user_registration_map_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.user_registration_map_id_seq OWNER TO infini_automation_deploy;

--
-- Name: user_registration_map_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: infini_automation_deploy
--

ALTER SEQUENCE public.user_registration_map_id_seq OWNED BY public.user_registration_map.id;


--
-- Name: user_relationship; Type: TABLE; Schema: public; Owner: infini_automation_deploy
--

CREATE TABLE public.user_relationship (
    id integer NOT NULL,
    user_id integer NOT NULL,
    related_user_id integer NOT NULL,
    relation_id integer,
    deleted_at timestamp with time zone,
    created_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP,
    updated_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP,
    is_verified boolean DEFAULT false,
    updated_by integer
);


ALTER TABLE public.user_relationship OWNER TO infini_automation_deploy;

--
-- Name: user_relationship_id_seq; Type: SEQUENCE; Schema: public; Owner: infini_automation_deploy
--

CREATE SEQUENCE public.user_relationship_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.user_relationship_id_seq OWNER TO infini_automation_deploy;

--
-- Name: user_relationship_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: infini_automation_deploy
--

ALTER SEQUENCE public.user_relationship_id_seq OWNED BY public.user_relationship.id;


--
-- Name: user_role; Type: TABLE; Schema: public; Owner: infini_automation_deploy
--

CREATE TABLE public.user_role (
    id integer NOT NULL,
    name character varying(100) NOT NULL,
    created_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP,
    updated_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP,
    role_key character varying(255),
    priority integer,
    is_system_role boolean DEFAULT false NOT NULL
);


ALTER TABLE public.user_role OWNER TO infini_automation_deploy;

--
-- Name: user_role_id_seq; Type: SEQUENCE; Schema: public; Owner: infini_automation_deploy
--

CREATE SEQUENCE public.user_role_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.user_role_id_seq OWNER TO infini_automation_deploy;

--
-- Name: user_role_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: infini_automation_deploy
--

ALTER SEQUENCE public.user_role_id_seq OWNED BY public.user_role.id;


--
-- Name: user_role_map; Type: TABLE; Schema: public; Owner: infini_automation_deploy
--

CREATE TABLE public.user_role_map (
    id integer NOT NULL,
    user_id integer NOT NULL,
    role_id integer NOT NULL,
    created_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP,
    updated_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP,
    audit_ref_id bigint,
    parent_ref_id bigint
);


ALTER TABLE public.user_role_map OWNER TO infini_automation_deploy;

--
-- Name: COLUMN user_role_map.audit_ref_id; Type: COMMENT; Schema: public; Owner: infini_automation_deploy
--

COMMENT ON COLUMN public.user_role_map.audit_ref_id IS 'Reference ID for audit tracking, typically the entity ID itself';


--
-- Name: COLUMN user_role_map.parent_ref_id; Type: COMMENT; Schema: public; Owner: infini_automation_deploy
--

COMMENT ON COLUMN public.user_role_map.parent_ref_id IS 'Parent reference ID for audit tracking, typically the entity ID itself';


--
-- Name: user_role_map_id_seq; Type: SEQUENCE; Schema: public; Owner: infini_automation_deploy
--

CREATE SEQUENCE public.user_role_map_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.user_role_map_id_seq OWNER TO infini_automation_deploy;

--
-- Name: user_role_map_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: infini_automation_deploy
--

ALTER SEQUENCE public.user_role_map_id_seq OWNED BY public.user_role_map.id;


--
-- Name: user_session; Type: TABLE; Schema: public; Owner: infini_automation_deploy
--

CREATE TABLE public.user_session (
    id bigint NOT NULL,
    user_id bigint,
    phone_number character varying(255),
    country_code character varying(5),
    email character varying(320),
    login_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP NOT NULL,
    otp character varying(6),
    attempt_count smallint DEFAULT 0,
    jwt_token text,
    session_status public.user_session_status_enum DEFAULT 'initiated'::public.user_session_status_enum NOT NULL,
    user_agent character varying(1024),
    ip_address character varying(45),
    expires_at timestamp with time zone,
    updated_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP
);


ALTER TABLE public.user_session OWNER TO infini_automation_deploy;

--
-- Name: TABLE user_session; Type: COMMENT; Schema: public; Owner: infini_automation_deploy
--

COMMENT ON TABLE public.user_session IS 'Stores user session information, including JWTs and OTPs.';


--
-- Name: COLUMN user_session.id; Type: COMMENT; Schema: public; Owner: infini_automation_deploy
--

COMMENT ON COLUMN public.user_session.id IS 'Unique identifier for the user session.';


--
-- Name: COLUMN user_session.user_id; Type: COMMENT; Schema: public; Owner: infini_automation_deploy
--

COMMENT ON COLUMN public.user_session.user_id IS 'Foreign key to the users table, identifying the user.';


--
-- Name: COLUMN user_session.phone_number; Type: COMMENT; Schema: public; Owner: infini_automation_deploy
--

COMMENT ON COLUMN public.user_session.phone_number IS 'The phone number used to initiate this session, if applicable.';


--
-- Name: COLUMN user_session.country_code; Type: COMMENT; Schema: public; Owner: infini_automation_deploy
--

COMMENT ON COLUMN public.user_session.country_code IS 'The country code for the phone number used, if applicable.';


--
-- Name: COLUMN user_session.email; Type: COMMENT; Schema: public; Owner: infini_automation_deploy
--

COMMENT ON COLUMN public.user_session.email IS 'The email address used to initiate this session, if applicable.';


--
-- Name: COLUMN user_session.login_at; Type: COMMENT; Schema: public; Owner: infini_automation_deploy
--

COMMENT ON COLUMN public.user_session.login_at IS 'Timestamp of when the user logged in and the session was created.';


--
-- Name: COLUMN user_session.otp; Type: COMMENT; Schema: public; Owner: infini_automation_deploy
--

COMMENT ON COLUMN public.user_session.otp IS 'The one-time password sent for login, if applicable (6-digit alphanumeric).';


--
-- Name: COLUMN user_session.attempt_count; Type: COMMENT; Schema: public; Owner: infini_automation_deploy
--

COMMENT ON COLUMN public.user_session.attempt_count IS 'Number of OTP validation attempts for this session.';


--
-- Name: COLUMN user_session.jwt_token; Type: COMMENT; Schema: public; Owner: infini_automation_deploy
--

COMMENT ON COLUMN public.user_session.jwt_token IS 'The JWT bearer token for this session. Populated after successful validation.';


--
-- Name: COLUMN user_session.session_status; Type: COMMENT; Schema: public; Owner: infini_automation_deploy
--

COMMENT ON COLUMN public.user_session.session_status IS 'The current status of the session (e.g., initiated, validated, logged_out, expired, failed).';


--
-- Name: COLUMN user_session.user_agent; Type: COMMENT; Schema: public; Owner: infini_automation_deploy
--

COMMENT ON COLUMN public.user_session.user_agent IS 'Information about the user''s device, such as User-Agent, OS, etc.';


--
-- Name: COLUMN user_session.ip_address; Type: COMMENT; Schema: public; Owner: infini_automation_deploy
--

COMMENT ON COLUMN public.user_session.ip_address IS 'The IP address from which the session was initiated.';


--
-- Name: COLUMN user_session.expires_at; Type: COMMENT; Schema: public; Owner: infini_automation_deploy
--

COMMENT ON COLUMN public.user_session.expires_at IS 'Timestamp when the session is set to expire.';


--
-- Name: user_session_id_seq; Type: SEQUENCE; Schema: public; Owner: infini_automation_deploy
--

CREATE SEQUENCE public.user_session_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.user_session_id_seq OWNER TO infini_automation_deploy;

--
-- Name: user_session_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: infini_automation_deploy
--

ALTER SEQUENCE public.user_session_id_seq OWNED BY public.user_session.id;


--
-- Name: user_temps; Type: TABLE; Schema: public; Owner: infini_automation_deploy
--

CREATE TABLE public.user_temps (
    id integer NOT NULL,
    "phoneNumber" integer,
    first_name character varying(255),
    last_name character varying(255),
    role character varying(255) NOT NULL,
    created_at timestamp with time zone NOT NULL,
    updated_at timestamp with time zone,
    "createdAt" timestamp with time zone NOT NULL,
    "updatedAt" timestamp with time zone NOT NULL,
    date_of_birth timestamp with time zone NOT NULL,
    email_id timestamp with time zone NOT NULL
);


ALTER TABLE public.user_temps OWNER TO infini_automation_deploy;

--
-- Name: user_temps_id_seq; Type: SEQUENCE; Schema: public; Owner: infini_automation_deploy
--

CREATE SEQUENCE public.user_temps_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.user_temps_id_seq OWNER TO infini_automation_deploy;

--
-- Name: user_temps_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: infini_automation_deploy
--

ALTER SEQUENCE public.user_temps_id_seq OWNED BY public.user_temps.id;


--
-- Name: users; Type: TABLE; Schema: public; Owner: infini_automation_deploy
--

CREATE TABLE public.users (
    id integer NOT NULL,
    phone_number character varying(255),
    full_name character varying(255),
    role character varying(255) NOT NULL,
    "createdAt" timestamp with time zone,
    "updatedAt" timestamp with time zone,
    created_at timestamp with time zone,
    updated_at timestamp with time zone,
    is_infiminute boolean DEFAULT true,
    is_infimessages boolean,
    user_approval_status character varying(20),
    first_name character varying(255),
    last_name character varying(255),
    status_updated_at timestamp without time zone,
    is_infipath boolean DEFAULT true,
    email character varying(319),
    is_infimessage_user_active boolean,
    is_infipath_user_active boolean DEFAULT true,
    name_audio character varying,
    is_infiminute_user_active boolean DEFAULT true,
    country_code character varying(7),
    profile_url character varying,
    address text,
    associated_since date,
    gender character varying,
    dob date,
    other_address text,
    firebase_id_ext character varying(255),
    terms_and_conditions boolean DEFAULT false,
    acknowledgement_date timestamp with time zone,
    alternate_country_code character varying(255),
    alternate_phone_number character varying(255),
    alternate_email character varying(255),
    encrypted_phone_number character varying(1024),
    masked_phone_number character varying(1024),
    encrypted_email character varying(1024),
    legal_full_name character varying(255),
    is_system_user boolean DEFAULT false,
    is_ai_user boolean DEFAULT false,
    user_type public.user_type_enum DEFAULT 'Seeker'::public.user_type_enum,
    audit_ref_id bigint,
    parent_ref_id bigint,
    country_name character varying(255),
    org_email character varying(255),
    source character varying(255),
    action character varying(255),
    org_usr_name character varying(255),
    hdb_defaulter boolean
);


ALTER TABLE public.users OWNER TO infini_automation_deploy;

--
-- Name: COLUMN users.audit_ref_id; Type: COMMENT; Schema: public; Owner: infini_automation_deploy
--

COMMENT ON COLUMN public.users.audit_ref_id IS 'Reference ID for audit tracking, typically the entity ID itself';


--
-- Name: COLUMN users.parent_ref_id; Type: COMMENT; Schema: public; Owner: infini_automation_deploy
--

COMMENT ON COLUMN public.users.parent_ref_id IS 'Parent reference ID for audit tracking, typically the entity ID itself';


--
-- Name: COLUMN users.hdb_defaulter; Type: COMMENT; Schema: public; Owner: infini_automation_deploy
--

COMMENT ON COLUMN public.users.hdb_defaulter IS 'Indicates if the user is marked as a defaulter. Updated automatically when seeker is marked/unmarked as defaulter in any registration.';


--
-- Name: users_id_seq; Type: SEQUENCE; Schema: public; Owner: infini_automation_deploy
--

CREATE SEQUENCE public.users_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.users_id_seq OWNER TO infini_automation_deploy;

--
-- Name: users_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: infini_automation_deploy
--

ALTER SEQUENCE public.users_id_seq OWNED BY public.users.id;


--
-- Name: users_transactions_history; Type: TABLE; Schema: public; Owner: infini_automation_deploy
--

CREATE TABLE public.users_transactions_history (
    id integer NOT NULL,
    phone_number bigint,
    first_name character varying(255),
    last_name character varying(255),
    full_name character varying(255),
    app_type character varying(255),
    created_at timestamp with time zone,
    updated_at timestamp with time zone
);


ALTER TABLE public.users_transactions_history OWNER TO infini_automation_deploy;

--
-- Name: users_transactions_history_id_seq; Type: SEQUENCE; Schema: public; Owner: infini_automation_deploy
--

CREATE SEQUENCE public.users_transactions_history_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.users_transactions_history_id_seq OWNER TO infini_automation_deploy;

--
-- Name: users_transactions_history_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: infini_automation_deploy
--

ALTER SEQUENCE public.users_transactions_history_id_seq OWNED BY public.users_transactions_history.id;


--
-- Name: venue; Type: TABLE; Schema: public; Owner: infini_automation_deploy
--

CREATE TABLE public.venue (
    id bigint NOT NULL,
    label character varying(255) NOT NULL,
    description text,
    address_id bigint NOT NULL,
    type character varying(50),
    created_at timestamp without time zone NOT NULL,
    updated_at timestamp without time zone,
    deleted_at timestamp without time zone,
    created_by bigint,
    updated_by bigint
);


ALTER TABLE public.venue OWNER TO infini_automation_deploy;

--
-- Name: venue_id_seq; Type: SEQUENCE; Schema: public; Owner: infini_automation_deploy
--

CREATE SEQUENCE public.venue_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.venue_id_seq OWNER TO infini_automation_deploy;

--
-- Name: venue_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: infini_automation_deploy
--

ALTER SEQUENCE public.venue_id_seq OWNED BY public.venue.id;


--
-- Name: webinar; Type: TABLE; Schema: public; Owner: infini_automation_deploy
--

CREATE TABLE public.webinar (
    id integer NOT NULL,
    title character varying(255) NOT NULL,
    program_session_id integer NOT NULL,
    webinar_id_ext character varying(255),
    password character varying(255),
    start_date timestamp with time zone,
    start_url text,
    duration integer,
    end_date timestamp with time zone,
    start_at timestamp with time zone,
    started_by character varying(255),
    created_by character varying(255),
    registration_starts_at timestamp with time zone,
    registration_ends_at timestamp with time zone,
    meta json,
    created_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP,
    updated_at time with time zone DEFAULT CURRENT_TIMESTAMP,
    deleted_at timestamp with time zone,
    max_video_limit integer,
    max_non_video_limit integer,
    actual_meeting_ends_at timestamp with time zone,
    video_limit_count integer DEFAULT 0,
    non_video_limit_count integer DEFAULT 0,
    join_enable_time integer,
    webinar_status character varying,
    start_enable_time integer
);


ALTER TABLE public.webinar OWNER TO infini_automation_deploy;

--
-- Name: webinar_absentees; Type: TABLE; Schema: public; Owner: infini_automation_deploy
--

CREATE TABLE public.webinar_absentees (
    id integer NOT NULL,
    email character varying(255) NOT NULL,
    status character varying(50) NOT NULL,
    create_time timestamp with time zone NOT NULL,
    webinar_id_ext character varying(255) NOT NULL,
    registrant_id character varying(255) NOT NULL,
    webinar_id integer,
    created_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP,
    updated_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP
);


ALTER TABLE public.webinar_absentees OWNER TO infini_automation_deploy;

--
-- Name: webinar_absentees_id_seq; Type: SEQUENCE; Schema: public; Owner: infini_automation_deploy
--

CREATE SEQUENCE public.webinar_absentees_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.webinar_absentees_id_seq OWNER TO infini_automation_deploy;

--
-- Name: webinar_absentees_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: infini_automation_deploy
--

ALTER SEQUENCE public.webinar_absentees_id_seq OWNED BY public.webinar_absentees.id;


--
-- Name: webinar_analytics; Type: TABLE; Schema: public; Owner: infini_automation_deploy
--

CREATE TABLE public.webinar_analytics (
    id integer NOT NULL,
    participant_id character varying,
    webinar_ext_id character varying,
    email character varying,
    join_time timestamp with time zone,
    left_time timestamp with time zone,
    initial_join_time timestamp with time zone,
    last_left_time timestamp with time zone,
    user_id character varying,
    full_name character varying,
    first_name character varying,
    last_name character varying,
    address character varying,
    dob date,
    gender character varying,
    mobile_number character varying,
    face_verification_status boolean,
    device_type character varying,
    mode_of_joining character varying,
    registration_type character varying,
    webinar_id character varying,
    join_url character varying,
    join_status character varying,
    registration_status character varying,
    internal_user boolean,
    registration_create_time timestamp with time zone,
    start_time timestamp with time zone,
    end_time timestamp with time zone,
    reg_starts_on timestamp with time zone,
    reg_ends_on timestamp with time zone,
    is_multiple boolean,
    age integer,
    is_participant boolean,
    is_absentee boolean,
    join_with_others boolean,
    device_info character varying,
    is_infinithiest boolean,
    is_dropoff boolean,
    is_late_comer boolean,
    is_registration_cancelled boolean,
    is_registration_downgraded boolean,
    is_primary boolean DEFAULT true NOT NULL,
    is_new_seeker boolean DEFAULT false,
    created_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP,
    updated_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP,
    user_profile_url character varying(2083),
    other_address character varying(256),
    duration integer DEFAULT 0,
    rejoin_count integer DEFAULT 0,
    country_code character varying(255)
);


ALTER TABLE public.webinar_analytics OWNER TO infini_automation_deploy;

--
-- Name: webinar_analytics_id_seq; Type: SEQUENCE; Schema: public; Owner: infini_automation_deploy
--

CREATE SEQUENCE public.webinar_analytics_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.webinar_analytics_id_seq OWNER TO infini_automation_deploy;

--
-- Name: webinar_analytics_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: infini_automation_deploy
--

ALTER SEQUENCE public.webinar_analytics_id_seq OWNED BY public.webinar_analytics.id;


--
-- Name: webinar_attendee; Type: TABLE; Schema: public; Owner: infini_automation_deploy
--

CREATE TABLE public.webinar_attendee (
    id integer NOT NULL,
    webinar_id integer NOT NULL,
    user_id integer NOT NULL,
    related_user_id integer,
    mode_of_joining character varying(50),
    face_verification_status boolean DEFAULT false,
    attendance_time timestamp with time zone,
    created_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP,
    updated_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP,
    device_type character varying(255),
    device_info character varying(255)
);


ALTER TABLE public.webinar_attendee OWNER TO infini_automation_deploy;

--
-- Name: webinar_attendee_id_seq; Type: SEQUENCE; Schema: public; Owner: infini_automation_deploy
--

CREATE SEQUENCE public.webinar_attendee_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.webinar_attendee_id_seq OWNER TO infini_automation_deploy;

--
-- Name: webinar_attendee_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: infini_automation_deploy
--

ALTER SEQUENCE public.webinar_attendee_id_seq OWNED BY public.webinar_attendee.id;


--
-- Name: webinar_id_seq; Type: SEQUENCE; Schema: public; Owner: infini_automation_deploy
--

CREATE SEQUENCE public.webinar_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.webinar_id_seq OWNER TO infini_automation_deploy;

--
-- Name: webinar_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: infini_automation_deploy
--

ALTER SEQUENCE public.webinar_id_seq OWNED BY public.webinar.id;


--
-- Name: webinar_participants; Type: TABLE; Schema: public; Owner: infini_automation_deploy
--

CREATE TABLE public.webinar_participants (
    id integer NOT NULL,
    webinar_id_ext character varying(255) NOT NULL,
    name character varying(255) NOT NULL,
    user_email character varying(255) NOT NULL,
    join_time timestamp with time zone NOT NULL,
    leave_time timestamp with time zone NOT NULL,
    registrant_id character varying(255),
    status character varying(50) NOT NULL,
    internal_user boolean NOT NULL,
    initial_join_time timestamp with time zone,
    last_left_time timestamp with time zone,
    duration integer,
    webinar_id integer,
    created_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP,
    updated_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP
);


ALTER TABLE public.webinar_participants OWNER TO infini_automation_deploy;

--
-- Name: webinar_participants_id_seq; Type: SEQUENCE; Schema: public; Owner: infini_automation_deploy
--

CREATE SEQUENCE public.webinar_participants_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.webinar_participants_id_seq OWNER TO infini_automation_deploy;

--
-- Name: webinar_participants_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: infini_automation_deploy
--

ALTER SEQUENCE public.webinar_participants_id_seq OWNED BY public.webinar_participants.id;


--
-- Name: webinar_registrants; Type: TABLE; Schema: public; Owner: infini_automation_deploy
--

CREATE TABLE public.webinar_registrants (
    id integer NOT NULL,
    webinar_id_ext character varying(255) NOT NULL,
    name character varying(255) NOT NULL,
    join_url text NOT NULL,
    email character varying(255) NOT NULL,
    registration_type character varying(50),
    user_id character varying(255),
    webinar_id integer,
    created_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP,
    updated_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP,
    registered_at timestamp without time zone
);


ALTER TABLE public.webinar_registrants OWNER TO infini_automation_deploy;

--
-- Name: webinar_registrants_id_seq; Type: SEQUENCE; Schema: public; Owner: infini_automation_deploy
--

CREATE SEQUENCE public.webinar_registrants_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.webinar_registrants_id_seq OWNER TO infini_automation_deploy;

--
-- Name: webinar_registrants_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: infini_automation_deploy
--

ALTER SEQUENCE public.webinar_registrants_id_seq OWNED BY public.webinar_registrants.id;


--
-- Name: webinar_registration; Type: TABLE; Schema: public; Owner: infini_automation_deploy
--

CREATE TABLE public.webinar_registration (
    id integer NOT NULL,
    user_id integer NOT NULL,
    webinar_id integer NOT NULL,
    created_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP,
    updated_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP,
    deleted_at timestamp with time zone,
    join_url character varying(255),
    is_panelist boolean DEFAULT false,
    registration_id_ext character varying(255),
    is_auto_registered boolean DEFAULT false
);


ALTER TABLE public.webinar_registration OWNER TO infini_automation_deploy;

--
-- Name: webinar_registration_id_seq; Type: SEQUENCE; Schema: public; Owner: infini_automation_deploy
--

CREATE SEQUENCE public.webinar_registration_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.webinar_registration_id_seq OWNER TO infini_automation_deploy;

--
-- Name: webinar_registration_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: infini_automation_deploy
--

ALTER SEQUENCE public.webinar_registration_id_seq OWNED BY public.webinar_registration.id;


--
-- Name: webinar_registration_transaction; Type: TABLE; Schema: public; Owner: infini_automation_deploy
--

CREATE TABLE public.webinar_registration_transaction (
    id integer NOT NULL,
    webinar_registration_id integer NOT NULL,
    registration_id_ext character varying(255),
    is_downgraded boolean DEFAULT false,
    is_upgraded boolean DEFAULT false,
    created_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP,
    updated_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP,
    is_cancelled boolean
);


ALTER TABLE public.webinar_registration_transaction OWNER TO infini_automation_deploy;

--
-- Name: webinar_registration_transaction_id_seq; Type: SEQUENCE; Schema: public; Owner: infini_automation_deploy
--

CREATE SEQUENCE public.webinar_registration_transaction_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.webinar_registration_transaction_id_seq OWNER TO infini_automation_deploy;

--
-- Name: webinar_registration_transaction_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: infini_automation_deploy
--

ALTER SEQUENCE public.webinar_registration_transaction_id_seq OWNED BY public.webinar_registration_transaction.id;


--
-- Name: webinar_user_actions_log; Type: TABLE; Schema: public; Owner: infini_automation_deploy
--

CREATE TABLE public.webinar_user_actions_log (
    id integer NOT NULL,
    webinar_id integer,
    user_id integer,
    action_type character varying(255),
    action_performed_by integer,
    action_created_time timestamp without time zone DEFAULT CURRENT_TIMESTAMP
);


ALTER TABLE public.webinar_user_actions_log OWNER TO infini_automation_deploy;

--
-- Name: webinar_user_actions_log_id_seq; Type: SEQUENCE; Schema: public; Owner: infini_automation_deploy
--

CREATE SEQUENCE public.webinar_user_actions_log_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER SEQUENCE public.webinar_user_actions_log_id_seq OWNER TO infini_automation_deploy;

--
-- Name: webinar_user_actions_log_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: infini_automation_deploy
--

ALTER SEQUENCE public.webinar_user_actions_log_id_seq OWNED BY public.webinar_user_actions_log.id;


--
-- Name: zz_backup_20250718_post_migration_users; Type: TABLE; Schema: public; Owner: infini_automation_deploy
--

CREATE TABLE public.zz_backup_20250718_post_migration_users (
    id integer,
    phone_number character varying(255),
    full_name character varying(255),
    role character varying(255),
    "createdAt" timestamp with time zone,
    "updatedAt" timestamp with time zone,
    created_at timestamp with time zone,
    updated_at timestamp with time zone,
    is_infiminute boolean,
    is_infimessages boolean,
    user_approval_status character varying(20),
    first_name character varying(255),
    last_name character varying(255),
    status_updated_at timestamp without time zone,
    is_infipath boolean,
    email character varying(319),
    is_infimessage_user_active boolean,
    is_infipath_user_active boolean,
    name_audio character varying,
    is_infiminute_user_active boolean,
    country_code character varying(7),
    profile_url character varying,
    address text,
    associated_since date,
    gender character varying,
    dob date,
    other_address text,
    firebase_id_ext character varying,
    terms_and_conditions boolean,
    acknowledgement_date timestamp with time zone,
    alternate_country_code character varying(15),
    alternate_phone_number character varying(15),
    alternate_email character varying(100),
    encrypted_phone_number character varying(1024),
    masked_phone_number character varying(1024),
    encrypted_email character varying(1024),
    legal_full_name character varying(255)
);


ALTER TABLE public.zz_backup_20250718_post_migration_users OWNER TO infini_automation_deploy;

--
-- Name: zz_backup_20250718_pre_migration_users; Type: TABLE; Schema: public; Owner: infini_automation_deploy
--

CREATE TABLE public.zz_backup_20250718_pre_migration_users (
    id integer,
    phone_number character varying(255),
    full_name character varying(255),
    role character varying(255),
    "createdAt" timestamp with time zone,
    "updatedAt" timestamp with time zone,
    created_at timestamp with time zone,
    updated_at timestamp with time zone,
    is_infiminute boolean,
    is_infimessages boolean,
    user_approval_status character varying(20),
    first_name character varying(255),
    last_name character varying(255),
    status_updated_at timestamp without time zone,
    is_infipath boolean,
    email character varying(319),
    is_infimessage_user_active boolean,
    is_infipath_user_active boolean,
    name_audio character varying,
    is_infiminute_user_active boolean,
    country_code character varying(7),
    profile_url character varying,
    address text,
    associated_since date,
    gender character varying,
    dob date,
    other_address text,
    firebase_id_ext character varying,
    terms_and_conditions boolean,
    acknowledgement_date timestamp with time zone,
    alternate_country_code character varying(15),
    alternate_phone_number character varying(15),
    alternate_email character varying(100),
    encrypted_phone_number character varying(1024),
    masked_phone_number character varying(1024),
    encrypted_email character varying(1024)
);


ALTER TABLE public.zz_backup_20250718_pre_migration_users OWNER TO infini_automation_deploy;

--
-- Name: zz_backup_20250720_1030_post_migration_users; Type: TABLE; Schema: public; Owner: infini_automation_deploy
--

CREATE TABLE public.zz_backup_20250720_1030_post_migration_users (
    id integer,
    phone_number character varying(255),
    full_name character varying(255),
    role character varying(255),
    "createdAt" timestamp with time zone,
    "updatedAt" timestamp with time zone,
    created_at timestamp with time zone,
    updated_at timestamp with time zone,
    is_infiminute boolean,
    is_infimessages boolean,
    user_approval_status character varying(20),
    first_name character varying(255),
    last_name character varying(255),
    status_updated_at timestamp without time zone,
    is_infipath boolean,
    email character varying(319),
    is_infimessage_user_active boolean,
    is_infipath_user_active boolean,
    name_audio character varying,
    is_infiminute_user_active boolean,
    country_code character varying(7),
    profile_url character varying,
    address text,
    associated_since date,
    gender character varying,
    dob date,
    other_address text,
    firebase_id_ext character varying,
    terms_and_conditions boolean,
    acknowledgement_date timestamp with time zone,
    alternate_country_code character varying(15),
    alternate_phone_number character varying(15),
    alternate_email character varying(100),
    encrypted_phone_number character varying(1024),
    masked_phone_number character varying(1024),
    encrypted_email character varying(1024),
    legal_full_name character varying(255)
);


ALTER TABLE public.zz_backup_20250720_1030_post_migration_users OWNER TO infini_automation_deploy;

--
-- Name: zz_backup_20250720_1030_pre_migration_users; Type: TABLE; Schema: public; Owner: infini_automation_deploy
--

CREATE TABLE public.zz_backup_20250720_1030_pre_migration_users (
    id integer,
    phone_number character varying(255),
    full_name character varying(255),
    role character varying(255),
    "createdAt" timestamp with time zone,
    "updatedAt" timestamp with time zone,
    created_at timestamp with time zone,
    updated_at timestamp with time zone,
    is_infiminute boolean,
    is_infimessages boolean,
    user_approval_status character varying(20),
    first_name character varying(255),
    last_name character varying(255),
    status_updated_at timestamp without time zone,
    is_infipath boolean,
    email character varying(319),
    is_infimessage_user_active boolean,
    is_infipath_user_active boolean,
    name_audio character varying,
    is_infiminute_user_active boolean,
    country_code character varying(7),
    profile_url character varying,
    address text,
    associated_since date,
    gender character varying,
    dob date,
    other_address text,
    firebase_id_ext character varying,
    terms_and_conditions boolean,
    acknowledgement_date timestamp with time zone,
    alternate_country_code character varying(15),
    alternate_phone_number character varying(15),
    alternate_email character varying(100),
    encrypted_phone_number character varying(1024),
    masked_phone_number character varying(1024),
    encrypted_email character varying(1024),
    legal_full_name character varying(255)
);


ALTER TABLE public.zz_backup_20250720_1030_pre_migration_users OWNER TO infini_automation_deploy;

--
-- Name: zz_backup_hdb_question_20250920; Type: TABLE; Schema: public; Owner: infini_automation_deploy
--

CREATE TABLE public.zz_backup_hdb_question_20250920 (
    id integer,
    label character varying(1024),
    config jsonb,
    stats public.hdb_common_status_enum,
    typ character varying(50),
    created_at timestamp with time zone,
    updated_at timestamp with time zone,
    deleted_at timestamp with time zone,
    created_by integer,
    updated_by integer,
    form_section_id integer,
    answer_location character varying(1024),
    binding_key character varying(255)
);


ALTER TABLE public.zz_backup_hdb_question_20250920 OWNER TO infini_automation_deploy;

--
-- Name: zz_load_tat_2025_data_20250902; Type: TABLE; Schema: public; Owner: infini_automation_deploy
--

CREATE TABLE public.zz_load_tat_2025_data_20250902 (
    batch character varying(255),
    full_name character varying(255),
    user_group character varying(255),
    full_name_2 character varying(255),
    mobile character varying(255),
    email character varying(255),
    gender character varying(255),
    dob date,
    city character varying(255),
    infinitheism_contact character varying(255)
);


ALTER TABLE public.zz_load_tat_2025_data_20250902 OWNER TO infini_automation_deploy;

--
-- Name: zz_load_tat_2025_data_20250902_clean; Type: TABLE; Schema: public; Owner: infini_automation_deploy
--

CREATE TABLE public.zz_load_tat_2025_data_20250902_clean (
    batch character varying(255),
    full_name character varying(255),
    user_group character varying(255),
    full_name_2 character varying(255),
    mobile character varying(255),
    email character varying(255),
    gender character varying(255),
    dob date,
    city character varying(255),
    infinitheism_contact character varying(255),
    country_code character varying(5),
    bare_mobile character varying(15),
    country character varying(15),
    city_clean character varying(55),
    phone_email_name_match boolean DEFAULT false,
    phone_email_match boolean DEFAULT false,
    phone_name_match boolean DEFAULT false,
    email_name_match boolean DEFAULT false,
    phone_match boolean DEFAULT false,
    email_match boolean DEFAULT false,
    name_match boolean DEFAULT false,
    no_match boolean DEFAULT false,
    match_status character varying(50),
    portal_user_id bigint,
    unique_or_duplicate character varying(20) DEFAULT 'unique'::character varying,
    is_phone_duplicate boolean DEFAULT false,
    is_email_duplicate boolean DEFAULT false,
    is_name_duplicate boolean DEFAULT false,
    alternative_phone_number character varying(255),
    alternative_country_code character varying(100),
    details_incoming_status boolean,
    update_portal_user_id bigint
);


ALTER TABLE public.zz_load_tat_2025_data_20250902_clean OWNER TO infini_automation_deploy;

--
-- Name: zz_ref_20250714_hdb_info_asis_trimmed; Type: TABLE; Schema: public; Owner: infini_automation_deploy
--

CREATE TABLE public.zz_ref_20250714_hdb_info_asis_trimmed (
    s_no bigint,
    hdb_year text,
    name text,
    email text,
    mobile text,
    gender text,
    date_of_birth text,
    contact_person text,
    city text,
    country text,
    when_was_your_last_hdb_msd text,
    since_when_have_you_been_associated_with_this_path text,
    how_many_hdb_msd_have_you_done text,
    which_of_the_following_have_you_experienced text,
    song_preference_1 text,
    song_preference_2 text,
    rm_rating text,
    rm_review text,
    hdb_allocation text,
    status text,
    are_you_registered_under_gst text,
    gstin text,
    tan text,
    email_to_which_invoice_to_be_sent text,
    name_in_which_invoice_to_be_issued text,
    invoice_address text,
    id_front_back_only_from_download_link text,
    id_back_only_download_link text,
    seeker_mapped_rec_id text,
    hdb_msd_reg_rec_id text,
    travel_data_rec_id text,
    country_code character varying(5),
    bare_mobile character varying(15),
    duplicate_mobile character(1) DEFAULT 'N'::bpchar,
    mobile_matched character(1) DEFAULT 'N'::bpchar,
    email_matched character(1) DEFAULT 'N'::bpchar,
    name_matched character(1) DEFAULT 'N'::bpchar,
    user_mobile character varying(500),
    user_country_code character varying(15),
    user_email character varying(500),
    user_name character varying(500),
    user_gender character varying(500),
    user_date_of_birth character varying(500),
    user_id integer,
    program_id integer,
    registration_id integer
);


ALTER TABLE public.zz_ref_20250714_hdb_info_asis_trimmed OWNER TO infini_automation_deploy;

--
-- Name: zz_ref_20250717_hdb_2021_2022_info_asis_trimmed; Type: TABLE; Schema: public; Owner: infini_automation_deploy
--

CREATE TABLE public.zz_ref_20250717_hdb_2021_2022_info_asis_trimmed (
    hdb_year text,
    name text,
    date_of_birth text,
    email text,
    mobile text,
    gender text,
    country text,
    city text,
    contact_person text,
    rm_rating text,
    rm_review text,
    since_when_have_you_been_associated_with_this_path text,
    how_many_hdb_msd_have_you_done text,
    when_was_your_last_hdb_msd text,
    which_of_the_following_have_you_experienced text,
    archive_data_id text,
    country_code character varying(5),
    bare_mobile character varying(15),
    hdb_allocation character varying(100),
    hdb_allocation_date character varying(100),
    status character varying(50)
);


ALTER TABLE public.zz_ref_20250717_hdb_2021_2022_info_asis_trimmed OWNER TO infini_automation_deploy;

--
-- Name: zz_ref_20250717_hdb_2022_2023_info_asis_trimmed; Type: TABLE; Schema: public; Owner: infini_automation_deploy
--

CREATE TABLE public.zz_ref_20250717_hdb_2022_2023_info_asis_trimmed (
    hdb_year text,
    email text,
    name text,
    mobile text,
    gender text,
    date_of_birth text,
    contact_person text,
    city text,
    country text,
    when_was_your_last_hdb_msd text,
    since_when_have_you_been_associated_with_this_path text,
    how_many_hdb_msd_have_you_done text,
    which_of_the_following_have_you_experienced text,
    song_preference_1 text,
    song_preference_2 text,
    rm_rating text,
    rm_review text,
    hdb_allocation text,
    status text,
    are_you_registered_under_gst text,
    gstin text,
    tan text,
    email_to_which_invoice_to_be_sent text,
    name_in_which_invoice_to_be_issued text,
    invoice_address text,
    id_1_download_link text,
    id_2_download_link text,
    seeker_mapped_rec_id text,
    hdb_msd_reg_rec_id text,
    travel_data_rec_id text,
    country_code character varying(5),
    bare_mobile character varying(15)
);


ALTER TABLE public.zz_ref_20250717_hdb_2022_2023_info_asis_trimmed OWNER TO infini_automation_deploy;

--
-- Name: zz_ref_20250717_hdb_2023_2024_info_asis_trimmed; Type: TABLE; Schema: public; Owner: infini_automation_deploy
--

CREATE TABLE public.zz_ref_20250717_hdb_2023_2024_info_asis_trimmed (
    hdb_year text,
    name text,
    email text,
    mobile text,
    gender text,
    date_of_birth text,
    contact_person text,
    city text,
    country text,
    when_was_your_last_hdb_msd text,
    since_when_have_you_been_associated_with_this_path text,
    how_many_hdb_msd_have_you_done text,
    which_of_the_following_have_you_experienced text,
    song_preference_1 text,
    song_preference_2 text,
    rm_rating text,
    rm_review text,
    hdb_allocation text,
    status text,
    are_you_registered_under_gst text,
    gstin text,
    tan text,
    email_to_which_invoice_to_be_sent text,
    name_in_which_invoice_to_be_issued text,
    invoice_address text,
    id_1_download_link text,
    id_2_download_link text,
    upload_id_card_front_front_back text,
    seeker_mapped_rec_id text,
    hdb_msd_reg_rec_id text,
    travel_data_rec_id text,
    country_code character varying(5),
    bare_mobile character varying(15),
    id_1_download_link_new_updated text,
    id_2_download_link_new_updated text
);


ALTER TABLE public.zz_ref_20250717_hdb_2023_2024_info_asis_trimmed OWNER TO infini_automation_deploy;

--
-- Name: zz_ref_20250920_hdb_2022_2023_info_asis_trimmed; Type: TABLE; Schema: public; Owner: infini_automation_deploy
--

CREATE TABLE public.zz_ref_20250920_hdb_2022_2023_info_asis_trimmed (
    hdb_year text,
    email text,
    name text,
    mobile text,
    gender text,
    date_of_birth text,
    contact_person text,
    city text,
    country text,
    when_was_your_last_hdb_msd text,
    since_when_have_you_been_associated_with_this_path text,
    how_many_hdb_msd_have_you_done text,
    which_of_the_following_have_you_experienced text,
    song_preference_1 text,
    song_preference_2 text,
    rm_rating text,
    rm_review text,
    hdb_allocation text,
    status text,
    are_you_registered_under_gst text,
    gstin text,
    tan text,
    email_to_which_invoice_to_be_sent text,
    name_in_which_invoice_to_be_issued text,
    invoice_address text,
    id_1_download_link text,
    id_2_download_link text,
    seeker_mapped_rec_id text,
    hdb_msd_reg_rec_id text,
    travel_data_rec_id text,
    country_code character varying,
    bare_mobile character varying,
    tobeused_mobile character varying,
    operation character varying
);


ALTER TABLE public.zz_ref_20250920_hdb_2022_2023_info_asis_trimmed OWNER TO infini_automation_deploy;

--
-- Name: zz_ref_20250920_hdb_2023_2024_info_asis_trimmed; Type: TABLE; Schema: public; Owner: infini_automation_deploy
--

CREATE TABLE public.zz_ref_20250920_hdb_2023_2024_info_asis_trimmed (
    hdb_year text,
    name text,
    email text,
    mobile text,
    gender text,
    date_of_birth text,
    contact_person text,
    city text,
    country text,
    when_was_your_last_hdb_msd text,
    since_when_have_you_been_associated_with_this_path text,
    how_many_hdb_msd_have_you_done text,
    which_of_the_following_have_you_experienced text,
    song_preference_1 text,
    song_preference_2 text,
    rm_rating text,
    rm_review text,
    hdb_allocation text,
    status text,
    are_you_registered_under_gst text,
    gstin text,
    tan text,
    email_to_which_invoice_to_be_sent text,
    name_in_which_invoice_to_be_issued text,
    invoice_address text,
    id_1_download_link text,
    id_2_download_link text,
    upload_id_card_front_front_back text,
    seeker_mapped_rec_id text,
    hdb_msd_reg_rec_id text,
    travel_data_rec_id text,
    country_code character varying,
    bare_mobile character varying,
    tobeused_mobile character varying,
    operation character varying,
    id_1_download_link_new_updated text,
    id_2_download_link_new_updated text
);


ALTER TABLE public.zz_ref_20250920_hdb_2023_2024_info_asis_trimmed OWNER TO infini_automation_deploy;

--
-- Name: zz_ref_ent_user_migration_v1; Type: TABLE; Schema: public; Owner: infini_automation_deploy
--

CREATE TABLE public.zz_ref_ent_user_migration_v1 (
    reg_seq_number character varying(255)
);


ALTER TABLE public.zz_ref_ent_user_migration_v1 OWNER TO infini_automation_deploy;

--
-- Name: zz_ref_entrainment_program_registration_info; Type: TABLE; Schema: public; Owner: infini_automation_deploy
--

CREATE TABLE public.zz_ref_entrainment_program_registration_info (
    attendance character varying(255),
    program_registration_id integer,
    user_id integer,
    user_full_name character varying(255),
    user_bare_mobile character varying(20),
    user_country_code character varying(10),
    user_email character varying(255),
    user_mobile character varying(20),
    user_gender character varying(50),
    user_dob date,
    program_id integer,
    register_status character varying(255),
    register_sub_status character varying(255),
    program_registration_seq_number character varying(255),
    waiting_list_seq_number character varying(255),
    cancellation_date timestamp with time zone,
    cancelled_by character varying(255),
    is_qr_generated boolean,
    registration_status_id integer,
    rm_user_id integer,
    rm_full_name character varying(255),
    rm_bare_mobile character varying(20),
    rm_country_code character varying(10),
    rm_email character varying(255),
    rm_mobile character varying(20),
    rm_username character varying(255),
    rm_notes text,
    prefered_room_mate_name character varying(255),
    other_rm_name character varying(255),
    registration_for character varying(10),
    source_user_id integer,
    source_full_name character varying(255),
    source_mobile_number character varying(20),
    source_email character varying(255),
    payment_id integer,
    payment_paid_amount numeric(10,2),
    payment_mode character varying(50),
    payment_type_id integer,
    payment_tax_amount numeric(10,2),
    payment_tds numeric(10,2),
    payment_subtotal numeric(10,2),
    payment_total numeric(10,2),
    payment_status character varying(50),
    payment_razorpay_order_id character varying(50),
    payment_sub_status character varying(255),
    payment_type_status character varying(255),
    payment_original_amount double precision,
    payment_gst_amount double precision,
    payment_invoice_reference_id_ext character varying(255),
    payment_is_razorpay_captured character varying(255),
    payment_razorpay_payment_id character varying(255),
    payment_offline_meta jsonb,
    payment_gateway_name character varying(255),
    invoice_id integer,
    invoice_type integer,
    invoice_program_registration_id integer,
    invoice_billing_name character varying(255),
    invoice_billing_address text,
    invoice_amount numeric(10,2),
    invoice_pan character varying(20),
    invoice_tan character varying(20),
    invoice_tds_amount numeric(10,2),
    invoice_sub_total numeric(10,2),
    invoice_tax_amount numeric(10,2),
    invoice_total_amount numeric(10,2),
    invoice_status character varying(50),
    invoice_created_at timestamp without time zone,
    invoice_updated_at timestamp without time zone,
    invoice_created_by character varying(255),
    invoice_updated_by character varying(255),
    invoice_payment_id integer,
    invoice_razorpay_order_id character varying(50),
    invoice_number integer,
    invoice_shipping_address json,
    invoice_einvoice_billing_address json,
    invoice_einvoice_qr_link character varying(255),
    invoice_einvoice_ack_date timestamp with time zone,
    invoice_einvoice_inv_ref_num character varying(255),
    invoice_user_id integer,
    invoice_einvoice_status character varying(255),
    invoice_sub_status character varying(255),
    invoice_email_to_send character varying(255),
    invoice_billing_address2 character varying(255),
    invoice_billing_gst character varying(255),
    invoice_billing_pin character varying(10),
    invoice_billing_utc_code character varying(50),
    invoice_einvoice_is_cancellable boolean,
    invoice_einvoice_status_formatted character varying(255),
    invoice_einvoice_ack_number character varying(255),
    invoice_einvoice_status_raw character varying(255),
    invoice_einvoice_formatted_status character varying(255),
    invoice_registration_seq_number character varying(255),
    invoice_date date,
    invoice_revised_date date,
    invoice_revised_number character varying(255),
    invoice_revised_url character varying(255),
    invoice_einvoice_error_message text,
    transport_id integer,
    transport_from_address text,
    transport_to_address text,
    transport_is_arrival boolean,
    transport_arrival_airline_name character varying(255),
    transport_arrival_flight_name character varying(255),
    transport_arrival_datetime timestamp with time zone,
    transport_departure_airline_name character varying(255),
    transport_departure_flight_name character varying(255),
    transport_departure_datetime timestamp with time zone,
    transport_full_name character varying(255),
    transport_emergency_contact_name character varying(50),
    transport_emergency_contact_relation character varying(20),
    transport_emergency_contact_mobile_number character varying(20),
    transport_emergency_contact_email_address character varying(255),
    transport_status character varying(255),
    transport_sub_status character varying(255),
    transport_logistic_status character varying(255),
    transport_logistic_sub_status character varying(255),
    transport_room_allocation_status character varying(255),
    transport_room_allocation_sub_status character varying(255),
    transport_id_reference_number character varying(20),
    transport_schedule boolean,
    transport_other_arrival_airline character varying(255),
    transport_other_departure_airline character varying(255),
    transport_arrival_type character varying(255),
    transport_return_type character varying(255),
    user_city character varying(255),
    user_state character varying(255),
    user_country character varying(255),
    profile_image text,
    shirt_size integer,
    user_image_url text,
    profile_image_back text,
    is_phone_only boolean DEFAULT false,
    is_email_only boolean DEFAULT false,
    is_name_only boolean DEFAULT false,
    is_phone_email boolean DEFAULT false,
    is_phone_name boolean DEFAULT false,
    is_email_name boolean DEFAULT false,
    is_phone_email_name boolean DEFAULT false,
    is_no_match boolean DEFAULT false,
    unique_or_duplicate text,
    program_name text,
    portal_email character varying(255),
    portal_phone_number character varying(20),
    portal_full_name character varying(255),
    portal_user_id integer,
    is_phone_email_legal_name boolean DEFAULT false,
    is_phone_legal_name boolean DEFAULT false,
    is_email_legal_name boolean DEFAULT false,
    is_legal_name_only boolean DEFAULT false,
    portal_legal_full_name text,
    is_name_duplicate boolean DEFAULT false,
    is_email_duplicate boolean DEFAULT false,
    is_phone_duplicate boolean DEFAULT false,
    migration_status character varying(100),
    mapped_portal_user_id bigint,
    do_not_map boolean DEFAULT false,
    reason text,
    sheet_classified character varying(255),
    alternative_phone_number character varying(255),
    alternative_country_code character varying(100),
    latest_phone boolean,
    latest_name boolean,
    latest_email boolean
);


ALTER TABLE public.zz_ref_entrainment_program_registration_info OWNER TO infini_automation_deploy;

--
-- Name: zz_ref_org_users_list; Type: TABLE; Schema: public; Owner: infini_automation_deploy
--

CREATE TABLE public.zz_ref_org_users_list (
    name character varying(255) NOT NULL,
    email character varying(255) NOT NULL,
    mobile character varying(20) NOT NULL,
    hdb_msd_registered_email character varying(255),
    gender character varying(20),
    dob date,
    location character varying(255),
    t_shirt_size character varying(10)
);


ALTER TABLE public.zz_ref_org_users_list OWNER TO infini_automation_deploy;

--
-- Name: zz_ref_temp_unified_hdb_info; Type: TABLE; Schema: public; Owner: infini_automation_deploy
--

CREATE TABLE public.zz_ref_temp_unified_hdb_info (
    user_id integer,
    when_was_your_last_hdb_msd text,
    since_when_have_you_been_associated_with_this_path text,
    how_many_hdb_msd_have_you_done integer,
    which_of_the_following_have_you_experienced text,
    song_preference_1 text,
    song_preference_2 text,
    rm_rating numeric(5,2),
    rm_review text,
    contact_person text,
    email_to_which_invoice_to_be_sent public.citext,
    name_in_which_invoice_to_be_issued text,
    invoice_address text,
    tan text,
    gstin text,
    are_you_registered_under_gst boolean,
    hdb_year text,
    id_front_back_only_from_download_link text,
    id_back_only_download_link text
);


ALTER TABLE public.zz_ref_temp_unified_hdb_info OWNER TO infini_automation_deploy;

--
-- Name: assets id; Type: DEFAULT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.assets ALTER COLUMN id SET DEFAULT nextval('public.assets_id_seq'::regclass);


--
-- Name: audit_history_log id; Type: DEFAULT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.audit_history_log ALTER COLUMN id SET DEFAULT nextval('public.audit_history_log_id_seq'::regclass);


--
-- Name: audit_history_log_detail id; Type: DEFAULT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.audit_history_log_detail ALTER COLUMN id SET DEFAULT nextval('public.audit_history_log_detail_id_seq'::regclass);


--
-- Name: block id; Type: DEFAULT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.block ALTER COLUMN id SET DEFAULT nextval('public.block_id_seq'::regclass);


--
-- Name: configuration id; Type: DEFAULT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.configuration ALTER COLUMN id SET DEFAULT nextval('public.configuration_id_seq'::regclass);


--
-- Name: feature_flag id; Type: DEFAULT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.feature_flag ALTER COLUMN id SET DEFAULT nextval('public.feature_flag_id_seq'::regclass);


--
-- Name: floor id; Type: DEFAULT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.floor ALTER COLUMN id SET DEFAULT nextval('public.floor_id_seq'::regclass);


--
-- Name: groups id; Type: DEFAULT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.groups ALTER COLUMN id SET DEFAULT nextval('public.groups_id_seq'::regclass);


--
-- Name: hdb_address address_id; Type: DEFAULT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_address ALTER COLUMN address_id SET DEFAULT nextval('public.hdb_address_address_id_seq'::regclass);


--
-- Name: hdb_cancellation_reason id; Type: DEFAULT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_cancellation_reason ALTER COLUMN id SET DEFAULT nextval('public.hdb_cancellation_reason_id_seq'::regclass);


--
-- Name: hdb_communication_templates id; Type: DEFAULT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_communication_templates ALTER COLUMN id SET DEFAULT nextval('public.hdb_communication_templates_id_seq'::regclass);


--
-- Name: hdb_communication_track id; Type: DEFAULT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_communication_track ALTER COLUMN id SET DEFAULT nextval('public.hdb_communication_track_id_seq'::regclass);


--
-- Name: hdb_form_section id; Type: DEFAULT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_form_section ALTER COLUMN id SET DEFAULT nextval('public.hdb_form_section_id_seq'::regclass);


--
-- Name: hdb_option id; Type: DEFAULT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_option ALTER COLUMN id SET DEFAULT nextval('public.hdb_option_id_seq'::regclass);


--
-- Name: hdb_option_category id; Type: DEFAULT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_option_category ALTER COLUMN id SET DEFAULT nextval('public.hdb_option_category_id_seq'::regclass);


--
-- Name: hdb_payment_change_request id; Type: DEFAULT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_payment_change_request ALTER COLUMN id SET DEFAULT nextval('public.hdb_payment_change_request_id_seq'::regclass);


--
-- Name: hdb_preference id; Type: DEFAULT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_preference ALTER COLUMN id SET DEFAULT nextval('public.hdb_preference_id_seq'::regclass);


--
-- Name: hdb_program_question id; Type: DEFAULT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_program_question ALTER COLUMN id SET DEFAULT nextval('public.hdb_program_question_id_seq'::regclass);


--
-- Name: hdb_program_registration id; Type: DEFAULT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_program_registration ALTER COLUMN id SET DEFAULT nextval('public.hdb_program_registration_id_seq'::regclass);


--
-- Name: hdb_program_registration_goodies id; Type: DEFAULT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_program_registration_goodies ALTER COLUMN id SET DEFAULT nextval('public.hdb_program_registration_goodies_id_seq'::regclass);


--
-- Name: hdb_program_registration_recommendations id; Type: DEFAULT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_program_registration_recommendations ALTER COLUMN id SET DEFAULT nextval('public.hdb_program_registration_recommendations_id_seq'::regclass);


--
-- Name: hdb_program_registration_rm_rating id; Type: DEFAULT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_program_registration_rm_rating ALTER COLUMN id SET DEFAULT nextval('public.hdb_program_registration_rm_rating_id_seq'::regclass);


--
-- Name: hdb_program_registration_rm_rating_type id; Type: DEFAULT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_program_registration_rm_rating_type ALTER COLUMN id SET DEFAULT nextval('public.hdb_program_registration_rm_rating_type_id_seq'::regclass);


--
-- Name: hdb_program_registration_swap id; Type: DEFAULT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_program_registration_swap ALTER COLUMN id SET DEFAULT nextval('public.hdb_program_registration_swap_id_seq'::regclass);


--
-- Name: hdb_question id; Type: DEFAULT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_question ALTER COLUMN id SET DEFAULT nextval('public.hdb_question_id_seq'::regclass);


--
-- Name: hdb_question_option_map id; Type: DEFAULT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_question_option_map ALTER COLUMN id SET DEFAULT nextval('public.hdb_question_option_map_id_seq'::regclass);


--
-- Name: hdb_registration_approval id; Type: DEFAULT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_registration_approval ALTER COLUMN id SET DEFAULT nextval('public.hdb_registration_approval_id_seq'::regclass);


--
-- Name: hdb_registration_approval_track id; Type: DEFAULT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_registration_approval_track ALTER COLUMN id SET DEFAULT nextval('public.hdb_registration_approval_track_id_seq'::regclass);


--
-- Name: hdb_registration_custom_response id; Type: DEFAULT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_registration_custom_response ALTER COLUMN id SET DEFAULT nextval('public.hdb_registration_custom_response_id_seq'::regclass);


--
-- Name: hdb_registration_invoice_basic_history id; Type: DEFAULT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_registration_invoice_basic_history ALTER COLUMN id SET DEFAULT nextval('public.hdb_registration_invoice_basic_history_id_seq'::regclass);


--
-- Name: hdb_registration_invoice_detail id; Type: DEFAULT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_registration_invoice_detail ALTER COLUMN id SET DEFAULT nextval('public.hdb_registration_invoice_detail_id_seq'::regclass);


--
-- Name: hdb_registration_invoice_einvoice_history id; Type: DEFAULT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_registration_invoice_einvoice_history ALTER COLUMN id SET DEFAULT nextval('public.hdb_registration_invoice_einvoice_history_id_seq'::regclass);


--
-- Name: hdb_registration_payment_detail id; Type: DEFAULT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_registration_payment_detail ALTER COLUMN id SET DEFAULT nextval('public.hdb_registration_payment_detail_id_seq'::regclass);


--
-- Name: hdb_registration_payment_details_history id; Type: DEFAULT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_registration_payment_details_history ALTER COLUMN id SET DEFAULT nextval('public.hdb_registration_payment_details_history_id_seq'::regclass);


--
-- Name: hdb_registration_question_answer id; Type: DEFAULT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_registration_question_answer ALTER COLUMN id SET DEFAULT nextval('public.hdb_registration_question_answer_id_seq'::regclass);


--
-- Name: hdb_registration_travel_info id; Type: DEFAULT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_registration_travel_info ALTER COLUMN id SET DEFAULT nextval('public.hdb_registration_travel_info_id_seq'::regclass);


--
-- Name: hdb_registration_travel_plan id; Type: DEFAULT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_registration_travel_plan ALTER COLUMN id SET DEFAULT nextval('public.hdb_registration_travel_plan_id_seq'::regclass);


--
-- Name: hdb_swap_requested_program id; Type: DEFAULT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_swap_requested_program ALTER COLUMN id SET DEFAULT nextval('public.hdb_swap_requested_program_id_seq'::regclass);


--
-- Name: id_proof_export_jobs id; Type: DEFAULT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.id_proof_export_jobs ALTER COLUMN id SET DEFAULT nextval('public.id_proof_export_jobs_id_seq'::regclass);


--
-- Name: infini_message_group_mapping id; Type: DEFAULT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.infini_message_group_mapping ALTER COLUMN id SET DEFAULT nextval('public.infini_message_group_mapping_id_seq'::regclass);


--
-- Name: infini_message_track id; Type: DEFAULT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.infini_message_track ALTER COLUMN id SET DEFAULT nextval('public.infini_message_track_id_seq'::regclass);


--
-- Name: infini_message_user_approval id; Type: DEFAULT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.infini_message_user_approval ALTER COLUMN id SET DEFAULT nextval('public.infini_message_user_approval_id_seq'::regclass);


--
-- Name: infini_message_user_fcm_mapping id; Type: DEFAULT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.infini_message_user_fcm_mapping ALTER COLUMN id SET DEFAULT nextval('public.infini_message_user_fcm_mapping_id_seq'::regclass);


--
-- Name: infini_message_user_group_mapping id; Type: DEFAULT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.infini_message_user_group_mapping ALTER COLUMN id SET DEFAULT nextval('public.infini_message_user_group_mapping_id_seq'::regclass);


--
-- Name: infini_messages id; Type: DEFAULT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.infini_messages ALTER COLUMN id SET DEFAULT nextval('public.infini_messages_id_seq'::regclass);


--
-- Name: infini_path_bulk_registration id; Type: DEFAULT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.infini_path_bulk_registration ALTER COLUMN id SET DEFAULT nextval('public.infini_path_bulk_registration_id_seq'::regclass);


--
-- Name: infini_path_meeting id; Type: DEFAULT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.infini_path_meeting ALTER COLUMN id SET DEFAULT nextval('public.infini_path_meeting_id_seq'::regclass);


--
-- Name: infini_path_meeting_attendee id; Type: DEFAULT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.infini_path_meeting_attendee ALTER COLUMN id SET DEFAULT nextval('public.infini_path_meeting_attendee_id_seq'::regclass);


--
-- Name: infini_path_meeting_member id; Type: DEFAULT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.infini_path_meeting_member ALTER COLUMN id SET DEFAULT nextval('public.infini_path_meeting_member_id_seq'::regclass);


--
-- Name: infini_path_member id; Type: DEFAULT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.infini_path_member ALTER COLUMN id SET DEFAULT nextval('public.infini_path_member_id_seq'::regclass);


--
-- Name: infini_path_profile_image id; Type: DEFAULT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.infini_path_profile_image ALTER COLUMN id SET DEFAULT nextval('public.infini_path_profile_image_id_seq'::regclass);


--
-- Name: infini_path_user_meeting id; Type: DEFAULT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.infini_path_user_meeting ALTER COLUMN id SET DEFAULT nextval('public.infini_path_user_meeting_id_seq'::regclass);


--
-- Name: infini_tags id; Type: DEFAULT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.infini_tags ALTER COLUMN id SET DEFAULT nextval('public.infini_tags_id_seq'::regclass);


--
-- Name: infiniminute_messages id; Type: DEFAULT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.infiniminute_messages ALTER COLUMN id SET DEFAULT nextval('public.infiniminute_messages_id_seq'::regclass);


--
-- Name: infinitheism_application id; Type: DEFAULT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.infinitheism_application ALTER COLUMN id SET DEFAULT nextval('public.infinitheism_application_id_seq'::regclass);


--
-- Name: lookup_data id; Type: DEFAULT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.lookup_data ALTER COLUMN id SET DEFAULT nextval('public.lookup_data_id_seq'::regclass);


--
-- Name: portal_scheduler_logs id; Type: DEFAULT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.portal_scheduler_logs ALTER COLUMN id SET DEFAULT nextval('public.portal_scheduler_logs_id_seq'::regclass);


--
-- Name: program program_id; Type: DEFAULT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.program ALTER COLUMN program_id SET DEFAULT nextval('public.program_program_id_seq'::regclass);


--
-- Name: program_attendance program_attendance_id; Type: DEFAULT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.program_attendance ALTER COLUMN program_attendance_id SET DEFAULT nextval('public.program_attendance_program_attendance_id_seq'::regclass);


--
-- Name: program_message id; Type: DEFAULT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.program_message ALTER COLUMN id SET DEFAULT nextval('public.program_message_id_seq'::regclass);


--
-- Name: program_occurrence program_occurrence_id; Type: DEFAULT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.program_occurrence ALTER COLUMN program_occurrence_id SET DEFAULT nextval('public.program_occurrence_program_occurrence_id_seq'::regclass);


--
-- Name: program_registration_failures id; Type: DEFAULT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.program_registration_failures ALTER COLUMN id SET DEFAULT nextval('public.program_registration_failures_id_seq'::regclass);


--
-- Name: program_room_inventory_map id; Type: DEFAULT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.program_room_inventory_map ALTER COLUMN id SET DEFAULT nextval('public.program_room_inventory_map_id_seq'::regclass);


--
-- Name: program_session id; Type: DEFAULT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.program_session ALTER COLUMN id SET DEFAULT nextval('public.program_session_id_seq'::regclass);


--
-- Name: program_type program_type_id; Type: DEFAULT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.program_type ALTER COLUMN program_type_id SET DEFAULT nextval('public.program_type_program_type_id_seq'::regclass);


--
-- Name: program_type_v1 id; Type: DEFAULT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.program_type_v1 ALTER COLUMN id SET DEFAULT nextval('public.program_type_v1_id_seq'::regclass);


--
-- Name: program_v1 id; Type: DEFAULT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.program_v1 ALTER COLUMN id SET DEFAULT nextval('public.program_v1_id_seq'::regclass);


--
-- Name: registration_group id; Type: DEFAULT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.registration_group ALTER COLUMN id SET DEFAULT nextval('public.registration_group_id_seq'::regclass);


--
-- Name: registration_group_map id; Type: DEFAULT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.registration_group_map ALTER COLUMN id SET DEFAULT nextval('public.registration_group_map_id_seq'::regclass);


--
-- Name: registration_pair id; Type: DEFAULT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.registration_pair ALTER COLUMN id SET DEFAULT nextval('public.registration_pair_id_seq'::regclass);


--
-- Name: registration_pair_map id; Type: DEFAULT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.registration_pair_map ALTER COLUMN id SET DEFAULT nextval('public.registration_pair_map_id_seq'::regclass);


--
-- Name: relation id; Type: DEFAULT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.relation ALTER COLUMN id SET DEFAULT nextval('public.relation_id_seq'::regclass);


--
-- Name: report_status id; Type: DEFAULT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.report_status ALTER COLUMN id SET DEFAULT nextval('public.report_status_id_seq'::regclass);


--
-- Name: report_status_transaction id; Type: DEFAULT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.report_status_transaction ALTER COLUMN id SET DEFAULT nextval('public.report_status_transaction_id_seq'::regclass);


--
-- Name: report_status_type id; Type: DEFAULT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.report_status_type ALTER COLUMN id SET DEFAULT nextval('public.report_status_type_id_seq'::regclass);


--
-- Name: room id; Type: DEFAULT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.room ALTER COLUMN id SET DEFAULT nextval('public.room_id_seq'::regclass);


--
-- Name: room_allocation id; Type: DEFAULT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.room_allocation ALTER COLUMN id SET DEFAULT nextval('public.room_allocation_id_seq'::regclass);


--
-- Name: room_allocation_history id; Type: DEFAULT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.room_allocation_history ALTER COLUMN id SET DEFAULT nextval('public.room_allocation_history_id_seq'::regclass);


--
-- Name: scheduler_times scheduler_time_id; Type: DEFAULT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.scheduler_times ALTER COLUMN scheduler_time_id SET DEFAULT nextval('public.scheduler_times_scheduler_time_id_seq'::regclass);


--
-- Name: scheduler_trackers scheduler_tracker_id; Type: DEFAULT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.scheduler_trackers ALTER COLUMN scheduler_tracker_id SET DEFAULT nextval('public.scheduler_trackers_scheduler_tracker_id_seq'::regclass);


--
-- Name: schedulers scheduler_id; Type: DEFAULT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.schedulers ALTER COLUMN scheduler_id SET DEFAULT nextval('public.schedulers_scheduler_id_seq'::regclass);


--
-- Name: seeker_defaulter id; Type: DEFAULT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.seeker_defaulter ALTER COLUMN id SET DEFAULT nextval('public.seeker_defaulter_id_seq'::regclass);


--
-- Name: seeker_defaulter_track id; Type: DEFAULT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.seeker_defaulter_track ALTER COLUMN id SET DEFAULT nextval('public.seeker_defaulter_track_id_seq'::regclass);


--
-- Name: seeker_program_experience id; Type: DEFAULT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.seeker_program_experience ALTER COLUMN id SET DEFAULT nextval('public.seeker_program_experience_id_seq'::regclass);


--
-- Name: user_application_subscription_log id; Type: DEFAULT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.user_application_subscription_log ALTER COLUMN id SET DEFAULT nextval('public.user_application_subscription_log_id_seq'::regclass);


--
-- Name: user_application_subscription_status id; Type: DEFAULT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.user_application_subscription_status ALTER COLUMN id SET DEFAULT nextval('public.user_application_subscription_status_id_seq'::regclass);


--
-- Name: user_device_information user_device_information_id; Type: DEFAULT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.user_device_information ALTER COLUMN user_device_information_id SET DEFAULT nextval('public.user_device_information_user_device_information_id_seq'::regclass);


--
-- Name: user_participation_summary id; Type: DEFAULT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.user_participation_summary ALTER COLUMN id SET DEFAULT nextval('public.user_participation_summary_id_seq'::regclass);


--
-- Name: user_profile_extension id; Type: DEFAULT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.user_profile_extension ALTER COLUMN id SET DEFAULT nextval('public.user_profile_extension_id_seq'::regclass);


--
-- Name: user_program_experience id; Type: DEFAULT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.user_program_experience ALTER COLUMN id SET DEFAULT nextval('public.user_program_experience_id_seq'::regclass);


--
-- Name: user_registration_map id; Type: DEFAULT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.user_registration_map ALTER COLUMN id SET DEFAULT nextval('public.user_registration_map_id_seq'::regclass);


--
-- Name: user_relationship id; Type: DEFAULT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.user_relationship ALTER COLUMN id SET DEFAULT nextval('public.user_relationship_id_seq'::regclass);


--
-- Name: user_role id; Type: DEFAULT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.user_role ALTER COLUMN id SET DEFAULT nextval('public.user_role_id_seq'::regclass);


--
-- Name: user_role_map id; Type: DEFAULT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.user_role_map ALTER COLUMN id SET DEFAULT nextval('public.user_role_map_id_seq'::regclass);


--
-- Name: user_session id; Type: DEFAULT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.user_session ALTER COLUMN id SET DEFAULT nextval('public.user_session_id_seq'::regclass);


--
-- Name: user_temps id; Type: DEFAULT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.user_temps ALTER COLUMN id SET DEFAULT nextval('public.user_temps_id_seq'::regclass);


--
-- Name: users id; Type: DEFAULT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.users ALTER COLUMN id SET DEFAULT nextval('public.users_id_seq'::regclass);


--
-- Name: users_transactions_history id; Type: DEFAULT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.users_transactions_history ALTER COLUMN id SET DEFAULT nextval('public.users_transactions_history_id_seq'::regclass);


--
-- Name: venue id; Type: DEFAULT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.venue ALTER COLUMN id SET DEFAULT nextval('public.venue_id_seq'::regclass);


--
-- Name: webinar id; Type: DEFAULT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.webinar ALTER COLUMN id SET DEFAULT nextval('public.webinar_id_seq'::regclass);


--
-- Name: webinar_absentees id; Type: DEFAULT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.webinar_absentees ALTER COLUMN id SET DEFAULT nextval('public.webinar_absentees_id_seq'::regclass);


--
-- Name: webinar_analytics id; Type: DEFAULT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.webinar_analytics ALTER COLUMN id SET DEFAULT nextval('public.webinar_analytics_id_seq'::regclass);


--
-- Name: webinar_attendee id; Type: DEFAULT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.webinar_attendee ALTER COLUMN id SET DEFAULT nextval('public.webinar_attendee_id_seq'::regclass);


--
-- Name: webinar_participants id; Type: DEFAULT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.webinar_participants ALTER COLUMN id SET DEFAULT nextval('public.webinar_participants_id_seq'::regclass);


--
-- Name: webinar_registrants id; Type: DEFAULT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.webinar_registrants ALTER COLUMN id SET DEFAULT nextval('public.webinar_registrants_id_seq'::regclass);


--
-- Name: webinar_registration id; Type: DEFAULT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.webinar_registration ALTER COLUMN id SET DEFAULT nextval('public.webinar_registration_id_seq'::regclass);


--
-- Name: webinar_registration_transaction id; Type: DEFAULT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.webinar_registration_transaction ALTER COLUMN id SET DEFAULT nextval('public.webinar_registration_transaction_id_seq'::regclass);


--
-- Name: webinar_user_actions_log id; Type: DEFAULT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.webinar_user_actions_log ALTER COLUMN id SET DEFAULT nextval('public.webinar_user_actions_log_id_seq'::regclass);


--
-- Name: assets assets_pkey; Type: CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.assets
    ADD CONSTRAINT assets_pkey PRIMARY KEY (id);


--
-- Name: audit_history_log_detail audit_history_log_detail_pkey; Type: CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.audit_history_log_detail
    ADD CONSTRAINT audit_history_log_detail_pkey PRIMARY KEY (id);


--
-- Name: audit_history_log audit_history_log_pkey; Type: CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.audit_history_log
    ADD CONSTRAINT audit_history_log_pkey PRIMARY KEY (id);


--
-- Name: block block_pkey; Type: CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.block
    ADD CONSTRAINT block_pkey PRIMARY KEY (id);


--
-- Name: configuration configuration_pkey; Type: CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.configuration
    ADD CONSTRAINT configuration_pkey PRIMARY KEY (id);


--
-- Name: feature_flag feature_flag_feature_key_key; Type: CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.feature_flag
    ADD CONSTRAINT feature_flag_feature_key_key UNIQUE (feature_key);


--
-- Name: feature_flag feature_flag_pkey; Type: CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.feature_flag
    ADD CONSTRAINT feature_flag_pkey PRIMARY KEY (id);


--
-- Name: floor floor_pkey; Type: CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.floor
    ADD CONSTRAINT floor_pkey PRIMARY KEY (id);


--
-- Name: groups groups_pkey; Type: CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.groups
    ADD CONSTRAINT groups_pkey PRIMARY KEY (id);


--
-- Name: hdb_address hdb_address_pkey; Type: CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_address
    ADD CONSTRAINT hdb_address_pkey PRIMARY KEY (address_id);


--
-- Name: hdb_cancellation_reason hdb_cancellation_reason_pkey; Type: CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_cancellation_reason
    ADD CONSTRAINT hdb_cancellation_reason_pkey PRIMARY KEY (id);


--
-- Name: hdb_cancellation_reason hdb_cancellation_reason_reason_key_key; Type: CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_cancellation_reason
    ADD CONSTRAINT hdb_cancellation_reason_reason_key_key UNIQUE (reason_key);


--
-- Name: hdb_communication_templates hdb_communication_templates_pkey; Type: CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_communication_templates
    ADD CONSTRAINT hdb_communication_templates_pkey PRIMARY KEY (id);


--
-- Name: hdb_communication_track hdb_communication_track_pkey; Type: CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_communication_track
    ADD CONSTRAINT hdb_communication_track_pkey PRIMARY KEY (id);


--
-- Name: hdb_form_section hdb_form_section_pkey; Type: CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_form_section
    ADD CONSTRAINT hdb_form_section_pkey PRIMARY KEY (id);


--
-- Name: hdb_option_category hdb_option_category_pkey; Type: CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_option_category
    ADD CONSTRAINT hdb_option_category_pkey PRIMARY KEY (id);


--
-- Name: hdb_option hdb_option_pkey; Type: CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_option
    ADD CONSTRAINT hdb_option_pkey PRIMARY KEY (id);


--
-- Name: hdb_payment_change_request hdb_payment_change_request_pkey; Type: CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_payment_change_request
    ADD CONSTRAINT hdb_payment_change_request_pkey PRIMARY KEY (id);


--
-- Name: hdb_preference hdb_preference_pkey; Type: CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_preference
    ADD CONSTRAINT hdb_preference_pkey PRIMARY KEY (id);


--
-- Name: hdb_program_question hdb_program_question_pkey; Type: CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_program_question
    ADD CONSTRAINT hdb_program_question_pkey PRIMARY KEY (id);


--
-- Name: hdb_program_registration_goodies hdb_program_registration_goodies_pkey; Type: CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_program_registration_goodies
    ADD CONSTRAINT hdb_program_registration_goodies_pkey PRIMARY KEY (id);


--
-- Name: hdb_program_registration hdb_program_registration_pkey; Type: CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_program_registration
    ADD CONSTRAINT hdb_program_registration_pkey PRIMARY KEY (id);


--
-- Name: hdb_program_registration_recommendations hdb_program_registration_recommendations_pkey; Type: CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_program_registration_recommendations
    ADD CONSTRAINT hdb_program_registration_recommendations_pkey PRIMARY KEY (id);


--
-- Name: hdb_program_registration_rm_rating hdb_program_registration_rm_rating_pkey; Type: CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_program_registration_rm_rating
    ADD CONSTRAINT hdb_program_registration_rm_rating_pkey PRIMARY KEY (id);


--
-- Name: hdb_program_registration_rm_rating_type hdb_program_registration_rm_rating_type_pkey; Type: CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_program_registration_rm_rating_type
    ADD CONSTRAINT hdb_program_registration_rm_rating_type_pkey PRIMARY KEY (id);


--
-- Name: hdb_program_registration_rm_rating_type hdb_program_registration_rm_rating_type_rating_key_key; Type: CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_program_registration_rm_rating_type
    ADD CONSTRAINT hdb_program_registration_rm_rating_type_rating_key_key UNIQUE (rating_key);


--
-- Name: hdb_program_registration_swap hdb_program_registration_swap_pkey; Type: CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_program_registration_swap
    ADD CONSTRAINT hdb_program_registration_swap_pkey PRIMARY KEY (id);


--
-- Name: hdb_question_option_map hdb_question_option_map_pkey; Type: CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_question_option_map
    ADD CONSTRAINT hdb_question_option_map_pkey PRIMARY KEY (id);


--
-- Name: hdb_question hdb_question_pkey; Type: CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_question
    ADD CONSTRAINT hdb_question_pkey PRIMARY KEY (id);


--
-- Name: hdb_registration_approval hdb_registration_approval_pkey; Type: CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_registration_approval
    ADD CONSTRAINT hdb_registration_approval_pkey PRIMARY KEY (id);


--
-- Name: hdb_registration_approval_track hdb_registration_approval_track_pkey; Type: CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_registration_approval_track
    ADD CONSTRAINT hdb_registration_approval_track_pkey PRIMARY KEY (id);


--
-- Name: hdb_registration_custom_response hdb_registration_custom_response_pkey; Type: CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_registration_custom_response
    ADD CONSTRAINT hdb_registration_custom_response_pkey PRIMARY KEY (id);


--
-- Name: hdb_registration_invoice_basic_history hdb_registration_invoice_basic_history_pkey; Type: CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_registration_invoice_basic_history
    ADD CONSTRAINT hdb_registration_invoice_basic_history_pkey PRIMARY KEY (id);


--
-- Name: hdb_registration_invoice_detail hdb_registration_invoice_detail_pkey; Type: CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_registration_invoice_detail
    ADD CONSTRAINT hdb_registration_invoice_detail_pkey PRIMARY KEY (id);


--
-- Name: hdb_registration_invoice_einvoice_history hdb_registration_invoice_einvoice_history_pkey; Type: CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_registration_invoice_einvoice_history
    ADD CONSTRAINT hdb_registration_invoice_einvoice_history_pkey PRIMARY KEY (id);


--
-- Name: hdb_registration_payment_detail hdb_registration_payment_detail_pkey; Type: CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_registration_payment_detail
    ADD CONSTRAINT hdb_registration_payment_detail_pkey PRIMARY KEY (id);


--
-- Name: hdb_registration_payment_details_history hdb_registration_payment_details_history_pkey; Type: CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_registration_payment_details_history
    ADD CONSTRAINT hdb_registration_payment_details_history_pkey PRIMARY KEY (id);


--
-- Name: hdb_registration_question_answer hdb_registration_question_answer_pkey; Type: CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_registration_question_answer
    ADD CONSTRAINT hdb_registration_question_answer_pkey PRIMARY KEY (id);


--
-- Name: hdb_registration_travel_info hdb_registration_travel_info_pkey; Type: CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_registration_travel_info
    ADD CONSTRAINT hdb_registration_travel_info_pkey PRIMARY KEY (id);


--
-- Name: hdb_registration_travel_plan hdb_registration_travel_plan_pkey; Type: CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_registration_travel_plan
    ADD CONSTRAINT hdb_registration_travel_plan_pkey PRIMARY KEY (id);


--
-- Name: hdb_swap_requested_program hdb_swap_requested_program_pkey; Type: CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_swap_requested_program
    ADD CONSTRAINT hdb_swap_requested_program_pkey PRIMARY KEY (id);


--
-- Name: id_proof_export_jobs id_proof_export_jobs_pkey; Type: CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.id_proof_export_jobs
    ADD CONSTRAINT id_proof_export_jobs_pkey PRIMARY KEY (id);


--
-- Name: infini_message_group_mapping infini_message_group_mapping_pkey; Type: CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.infini_message_group_mapping
    ADD CONSTRAINT infini_message_group_mapping_pkey PRIMARY KEY (id);


--
-- Name: infini_message_track infini_message_track_pkey; Type: CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.infini_message_track
    ADD CONSTRAINT infini_message_track_pkey PRIMARY KEY (id);


--
-- Name: infini_message_user_approval infini_message_user_approval_pkey; Type: CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.infini_message_user_approval
    ADD CONSTRAINT infini_message_user_approval_pkey PRIMARY KEY (id);


--
-- Name: infini_message_user_fcm_mapping infini_message_user_fcm_mapping_pkey; Type: CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.infini_message_user_fcm_mapping
    ADD CONSTRAINT infini_message_user_fcm_mapping_pkey PRIMARY KEY (id);


--
-- Name: infini_message_user_group_mapping infini_message_user_group_mapping_pkey; Type: CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.infini_message_user_group_mapping
    ADD CONSTRAINT infini_message_user_group_mapping_pkey PRIMARY KEY (id);


--
-- Name: infini_messages infini_messages_pkey; Type: CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.infini_messages
    ADD CONSTRAINT infini_messages_pkey PRIMARY KEY (id);


--
-- Name: infini_path_bulk_registration infini_path_bulk_registration_pkey; Type: CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.infini_path_bulk_registration
    ADD CONSTRAINT infini_path_bulk_registration_pkey PRIMARY KEY (id);


--
-- Name: infini_path_meeting_attendee infini_path_meeting_attendee_pkey; Type: CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.infini_path_meeting_attendee
    ADD CONSTRAINT infini_path_meeting_attendee_pkey PRIMARY KEY (id);


--
-- Name: infini_path_meeting_member infini_path_meeting_member_pkey; Type: CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.infini_path_meeting_member
    ADD CONSTRAINT infini_path_meeting_member_pkey PRIMARY KEY (id);


--
-- Name: infini_path_meeting infini_path_meeting_pkey; Type: CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.infini_path_meeting
    ADD CONSTRAINT infini_path_meeting_pkey PRIMARY KEY (id);


--
-- Name: infini_path_member infini_path_member_pkey; Type: CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.infini_path_member
    ADD CONSTRAINT infini_path_member_pkey PRIMARY KEY (id);


--
-- Name: infini_path_profile_image infini_path_profile_image_pkey; Type: CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.infini_path_profile_image
    ADD CONSTRAINT infini_path_profile_image_pkey PRIMARY KEY (id);


--
-- Name: infini_path_user_meeting infini_path_user_meeting_pkey; Type: CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.infini_path_user_meeting
    ADD CONSTRAINT infini_path_user_meeting_pkey PRIMARY KEY (id);


--
-- Name: infini_tags infini_tags_pkey; Type: CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.infini_tags
    ADD CONSTRAINT infini_tags_pkey PRIMARY KEY (id);


--
-- Name: infiniminute_messages infiniminute_messages_pkey; Type: CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.infiniminute_messages
    ADD CONSTRAINT infiniminute_messages_pkey PRIMARY KEY (id);


--
-- Name: infinitheism_application infinitheism_application_pkey; Type: CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.infinitheism_application
    ADD CONSTRAINT infinitheism_application_pkey PRIMARY KEY (id);


--
-- Name: lookup_data lookup_data_category_key_unique; Type: CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.lookup_data
    ADD CONSTRAINT lookup_data_category_key_unique UNIQUE (lookup_category, lookup_key);


--
-- Name: lookup_data lookup_data_lookup_category_lookup_key_key; Type: CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.lookup_data
    ADD CONSTRAINT lookup_data_lookup_category_lookup_key_key UNIQUE (lookup_category, lookup_key);


--
-- Name: lookup_data lookup_data_pkey; Type: CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.lookup_data
    ADD CONSTRAINT lookup_data_pkey PRIMARY KEY (id);


--
-- Name: portal_scheduler_logs portal_scheduler_logs_pkey; Type: CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.portal_scheduler_logs
    ADD CONSTRAINT portal_scheduler_logs_pkey PRIMARY KEY (id);


--
-- Name: program_attendance program_attendance_pkey; Type: CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.program_attendance
    ADD CONSTRAINT program_attendance_pkey PRIMARY KEY (program_attendance_id);


--
-- Name: program_message program_message_pkey; Type: CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.program_message
    ADD CONSTRAINT program_message_pkey PRIMARY KEY (id);


--
-- Name: program_occurrence program_occurrence_pkey; Type: CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.program_occurrence
    ADD CONSTRAINT program_occurrence_pkey PRIMARY KEY (program_occurrence_id);


--
-- Name: program program_pkey; Type: CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.program
    ADD CONSTRAINT program_pkey PRIMARY KEY (program_id);


--
-- Name: program_registration_failures program_registration_failures_pkey; Type: CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.program_registration_failures
    ADD CONSTRAINT program_registration_failures_pkey PRIMARY KEY (id);


--
-- Name: program_room_inventory_map program_room_inventory_map_pkey; Type: CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.program_room_inventory_map
    ADD CONSTRAINT program_room_inventory_map_pkey PRIMARY KEY (id);


--
-- Name: program_session program_session_pkey; Type: CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.program_session
    ADD CONSTRAINT program_session_pkey PRIMARY KEY (id);


--
-- Name: program_type program_type_pkey; Type: CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.program_type
    ADD CONSTRAINT program_type_pkey PRIMARY KEY (program_type_id);


--
-- Name: program_type_v1 program_type_v1_key; Type: CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.program_type_v1
    ADD CONSTRAINT program_type_v1_key UNIQUE (key);


--
-- Name: program_type_v1 program_type_v1_pkey; Type: CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.program_type_v1
    ADD CONSTRAINT program_type_v1_pkey PRIMARY KEY (id);


--
-- Name: program_v1 program_v1_pkey; Type: CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.program_v1
    ADD CONSTRAINT program_v1_pkey PRIMARY KEY (id);


--
-- Name: registration_group_map registration_group_map_pkey; Type: CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.registration_group_map
    ADD CONSTRAINT registration_group_map_pkey PRIMARY KEY (id);


--
-- Name: registration_group registration_group_pkey; Type: CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.registration_group
    ADD CONSTRAINT registration_group_pkey PRIMARY KEY (id);


--
-- Name: registration_pair_map registration_pair_map_pkey; Type: CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.registration_pair_map
    ADD CONSTRAINT registration_pair_map_pkey PRIMARY KEY (id);


--
-- Name: registration_pair registration_pair_pkey; Type: CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.registration_pair
    ADD CONSTRAINT registration_pair_pkey PRIMARY KEY (id);


--
-- Name: relation relation_pkey; Type: CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.relation
    ADD CONSTRAINT relation_pkey PRIMARY KEY (id);


--
-- Name: report_status report_status_pkey; Type: CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.report_status
    ADD CONSTRAINT report_status_pkey PRIMARY KEY (id);


--
-- Name: report_status_transaction report_status_transaction_pkey; Type: CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.report_status_transaction
    ADD CONSTRAINT report_status_transaction_pkey PRIMARY KEY (id);


--
-- Name: report_status_type report_status_type_name_key; Type: CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.report_status_type
    ADD CONSTRAINT report_status_type_name_key UNIQUE (name);


--
-- Name: report_status_type report_status_type_pkey; Type: CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.report_status_type
    ADD CONSTRAINT report_status_type_pkey PRIMARY KEY (id);


--
-- Name: room_allocation_history room_allocation_history_pkey; Type: CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.room_allocation_history
    ADD CONSTRAINT room_allocation_history_pkey PRIMARY KEY (id);


--
-- Name: room_allocation room_allocation_pkey; Type: CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.room_allocation
    ADD CONSTRAINT room_allocation_pkey PRIMARY KEY (id);


--
-- Name: room room_pkey; Type: CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.room
    ADD CONSTRAINT room_pkey PRIMARY KEY (id);


--
-- Name: scheduler_times scheduler_times_pkey; Type: CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.scheduler_times
    ADD CONSTRAINT scheduler_times_pkey PRIMARY KEY (scheduler_time_id);


--
-- Name: scheduler_trackers scheduler_trackers_pkey; Type: CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.scheduler_trackers
    ADD CONSTRAINT scheduler_trackers_pkey PRIMARY KEY (scheduler_tracker_id);


--
-- Name: schedulers schedulers_pkey; Type: CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.schedulers
    ADD CONSTRAINT schedulers_pkey PRIMARY KEY (scheduler_id);


--
-- Name: seeker_defaulter seeker_defaulter_pkey; Type: CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.seeker_defaulter
    ADD CONSTRAINT seeker_defaulter_pkey PRIMARY KEY (id);


--
-- Name: seeker_defaulter_track seeker_defaulter_track_pkey; Type: CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.seeker_defaulter_track
    ADD CONSTRAINT seeker_defaulter_track_pkey PRIMARY KEY (id);


--
-- Name: seeker_program_experience seeker_program_experience_pkey; Type: CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.seeker_program_experience
    ADD CONSTRAINT seeker_program_experience_pkey PRIMARY KEY (id);


--
-- Name: hdb_registration_invoice_detail unique_hdb_invoice_sequence; Type: CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_registration_invoice_detail
    ADD CONSTRAINT unique_hdb_invoice_sequence UNIQUE (invoice_sequence_number);


--
-- Name: hdb_registration_question_answer unique_hdb_question_answer; Type: CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_registration_question_answer
    ADD CONSTRAINT unique_hdb_question_answer UNIQUE (registration_id, question_id);


--
-- Name: hdb_registration_custom_response unique_hdb_registration_question; Type: CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_registration_custom_response
    ADD CONSTRAINT unique_hdb_registration_question UNIQUE (registration_id, question_id);


--
-- Name: hdb_program_registration unique_hdb_registration_seq; Type: CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_program_registration
    ADD CONSTRAINT unique_hdb_registration_seq UNIQUE (program_session_id, program_registration_seq_number);


--
-- Name: hdb_program_registration unique_hdb_waitlist_seq; Type: CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_program_registration
    ADD CONSTRAINT unique_hdb_waitlist_seq UNIQUE (program_session_id, waiting_list_seq_number);


--
-- Name: user_role_map uq_user_role_map_user_role; Type: CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.user_role_map
    ADD CONSTRAINT uq_user_role_map_user_role UNIQUE (user_id, role_id);


--
-- Name: user_application_subscription_log user_application_subscription_log_pkey; Type: CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.user_application_subscription_log
    ADD CONSTRAINT user_application_subscription_log_pkey PRIMARY KEY (id);


--
-- Name: user_application_subscription_status user_application_subscription_status_pkey; Type: CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.user_application_subscription_status
    ADD CONSTRAINT user_application_subscription_status_pkey PRIMARY KEY (id);


--
-- Name: user_device_information user_device_information_pkey; Type: CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.user_device_information
    ADD CONSTRAINT user_device_information_pkey PRIMARY KEY (user_device_information_id);


--
-- Name: user_device_information user_device_information_subscription_id_ext_key; Type: CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.user_device_information
    ADD CONSTRAINT user_device_information_subscription_id_ext_key UNIQUE (subscription_id_ext);


--
-- Name: user_participation_summary user_participation_summary_pkey; Type: CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.user_participation_summary
    ADD CONSTRAINT user_participation_summary_pkey PRIMARY KEY (id);


--
-- Name: user_profile_extension user_profile_extension_pkey; Type: CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.user_profile_extension
    ADD CONSTRAINT user_profile_extension_pkey PRIMARY KEY (id);


--
-- Name: user_program_experience user_program_experience_pkey; Type: CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.user_program_experience
    ADD CONSTRAINT user_program_experience_pkey PRIMARY KEY (id);


--
-- Name: user_registration_map user_registration_map_pkey; Type: CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.user_registration_map
    ADD CONSTRAINT user_registration_map_pkey PRIMARY KEY (id);


--
-- Name: user_relationship user_relationship_pkey; Type: CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.user_relationship
    ADD CONSTRAINT user_relationship_pkey PRIMARY KEY (id);


--
-- Name: user_role_map user_role_map_pkey; Type: CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.user_role_map
    ADD CONSTRAINT user_role_map_pkey PRIMARY KEY (id);


--
-- Name: user_role user_role_name_key; Type: CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.user_role
    ADD CONSTRAINT user_role_name_key UNIQUE (name);


--
-- Name: user_role user_role_pkey; Type: CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.user_role
    ADD CONSTRAINT user_role_pkey PRIMARY KEY (id);


--
-- Name: user_session user_session_pkey; Type: CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.user_session
    ADD CONSTRAINT user_session_pkey PRIMARY KEY (id);


--
-- Name: user_temps user_temps_phoneNumber_key; Type: CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.user_temps
    ADD CONSTRAINT "user_temps_phoneNumber_key" UNIQUE ("phoneNumber");


--
-- Name: user_temps user_temps_pkey; Type: CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.user_temps
    ADD CONSTRAINT user_temps_pkey PRIMARY KEY (id);


--
-- Name: users users_phone_number_key; Type: CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.users
    ADD CONSTRAINT users_phone_number_key UNIQUE (phone_number);


--
-- Name: users users_pkey; Type: CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.users
    ADD CONSTRAINT users_pkey PRIMARY KEY (id);


--
-- Name: users_transactions_history users_transactions_history_pkey; Type: CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.users_transactions_history
    ADD CONSTRAINT users_transactions_history_pkey PRIMARY KEY (id);


--
-- Name: venue venue_pkey; Type: CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.venue
    ADD CONSTRAINT venue_pkey PRIMARY KEY (id);


--
-- Name: webinar_absentees webinar_absentees_pkey; Type: CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.webinar_absentees
    ADD CONSTRAINT webinar_absentees_pkey PRIMARY KEY (id);


--
-- Name: webinar_analytics webinar_analytics_pkey; Type: CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.webinar_analytics
    ADD CONSTRAINT webinar_analytics_pkey PRIMARY KEY (id);


--
-- Name: webinar_attendee webinar_attendee_pkey; Type: CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.webinar_attendee
    ADD CONSTRAINT webinar_attendee_pkey PRIMARY KEY (id);


--
-- Name: webinar_participants webinar_participants_pkey; Type: CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.webinar_participants
    ADD CONSTRAINT webinar_participants_pkey PRIMARY KEY (id);


--
-- Name: webinar webinar_pkey; Type: CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.webinar
    ADD CONSTRAINT webinar_pkey PRIMARY KEY (id);


--
-- Name: webinar_registrants webinar_registrants_pkey; Type: CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.webinar_registrants
    ADD CONSTRAINT webinar_registrants_pkey PRIMARY KEY (id);


--
-- Name: webinar_registration webinar_registration_pkey; Type: CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.webinar_registration
    ADD CONSTRAINT webinar_registration_pkey PRIMARY KEY (id);


--
-- Name: webinar_registration_transaction webinar_registration_transaction_pkey; Type: CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.webinar_registration_transaction
    ADD CONSTRAINT webinar_registration_transaction_pkey PRIMARY KEY (id);


--
-- Name: webinar_user_actions_log webinar_user_actions_log_pkey; Type: CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.webinar_user_actions_log
    ADD CONSTRAINT webinar_user_actions_log_pkey PRIMARY KEY (id);


--
-- Name: zz_ref_org_users_list zz_ref_org_users_list_email_key; Type: CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.zz_ref_org_users_list
    ADD CONSTRAINT zz_ref_org_users_list_email_key UNIQUE (email);


--
-- Name: zz_ref_org_users_list zz_ref_org_users_list_mobile_key; Type: CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.zz_ref_org_users_list
    ADD CONSTRAINT zz_ref_org_users_list_mobile_key UNIQUE (mobile);


--
-- Name: idx_allocated_program_id; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_allocated_program_id ON public.hdb_program_registration USING btree (allocated_program_id);


--
-- Name: idx_allocated_session_id; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_allocated_session_id ON public.hdb_program_registration USING btree (allocated_session_id);


--
-- Name: idx_audit_history_log_created_at; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_audit_history_log_created_at ON public.audit_history_log USING btree (created_at);


--
-- Name: idx_audit_history_log_detail_audit_log; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_audit_history_log_detail_audit_log ON public.audit_history_log_detail USING btree (audit_log_id);


--
-- Name: idx_audit_history_log_entity_type_id; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_audit_history_log_entity_type_id ON public.audit_history_log USING btree (entity_type, entity_id);


--
-- Name: idx_audit_history_log_parent_ref_id; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_audit_history_log_parent_ref_id ON public.audit_history_log USING btree (parent_ref_id);


--
-- Name: idx_audit_history_log_user_id; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_audit_history_log_user_id ON public.audit_history_log USING btree (user_id);


--
-- Name: idx_block_deleted; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_block_deleted ON public.block USING btree (deleted_at);


--
-- Name: idx_block_venue; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_block_venue ON public.block USING btree (venue_id);


--
-- Name: idx_floor_block; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_floor_block ON public.floor USING btree (block_id);


--
-- Name: idx_floor_deleted; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_floor_deleted ON public.floor USING btree (deleted_at);


--
-- Name: idx_hdb_approval_approved_by; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_hdb_approval_approved_by ON public.hdb_registration_approval USING btree (approved_by);


--
-- Name: idx_hdb_approval_date; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_hdb_approval_date ON public.hdb_registration_approval USING btree (approval_date);


--
-- Name: idx_hdb_approval_registration; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_hdb_approval_registration ON public.hdb_registration_approval USING btree (registration_id);


--
-- Name: idx_hdb_approval_status; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_hdb_approval_status ON public.hdb_registration_approval USING btree (approval_status);


--
-- Name: idx_hdb_cancelled_by; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_hdb_cancelled_by ON public.hdb_program_registration USING btree (cancelled_by);


--
-- Name: idx_hdb_communication_track_audit_ref_id; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_hdb_communication_track_audit_ref_id ON public.hdb_communication_track USING btree (audit_ref_id);


--
-- Name: idx_hdb_communication_track_parent_ref_id; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_hdb_communication_track_parent_ref_id ON public.hdb_communication_track USING btree (parent_ref_id);


--
-- Name: idx_hdb_created_by; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_hdb_created_by ON public.hdb_program_registration USING btree (created_by);


--
-- Name: idx_hdb_custom_response_question; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_hdb_custom_response_question ON public.hdb_registration_custom_response USING btree (question_id);


--
-- Name: idx_hdb_custom_response_registration; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_hdb_custom_response_registration ON public.hdb_registration_custom_response USING btree (registration_id);


--
-- Name: idx_hdb_invoice_issued_date; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_hdb_invoice_issued_date ON public.hdb_registration_invoice_detail USING btree (invoice_issued_date);


--
-- Name: idx_hdb_invoice_razorpay_id; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_hdb_invoice_razorpay_id ON public.hdb_registration_invoice_detail USING btree (razorpay_id);


--
-- Name: idx_hdb_invoice_registration; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_hdb_invoice_registration ON public.hdb_registration_invoice_detail USING btree (registration_id);


--
-- Name: idx_hdb_invoice_sequence; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_hdb_invoice_sequence ON public.hdb_registration_invoice_detail USING btree (invoice_sequence_number);


--
-- Name: idx_hdb_invoice_type; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_hdb_invoice_type ON public.hdb_registration_invoice_detail USING btree (invoice_type);


--
-- Name: idx_hdb_payment_date; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_hdb_payment_date ON public.hdb_registration_payment_detail USING btree (payment_date);


--
-- Name: idx_hdb_payment_mode; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_hdb_payment_mode ON public.hdb_registration_payment_detail USING btree (payment_mode);


--
-- Name: idx_hdb_payment_program_session; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_hdb_payment_program_session ON public.hdb_registration_payment_detail USING btree (program_session_id);


--
-- Name: idx_hdb_payment_razorpay_id; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_hdb_payment_razorpay_id ON public.hdb_registration_payment_detail USING btree (razorpay_id);


--
-- Name: idx_hdb_payment_registration; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_hdb_payment_registration ON public.hdb_registration_payment_detail USING btree (registration_id);


--
-- Name: idx_hdb_preference_audit_ref_id; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_hdb_preference_audit_ref_id ON public.hdb_preference USING btree (audit_ref_id);


--
-- Name: idx_hdb_preference_parent_ref_id; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_hdb_preference_parent_ref_id ON public.hdb_preference USING btree (parent_ref_id);


--
-- Name: idx_hdb_program_registration_audit_ref_id; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_hdb_program_registration_audit_ref_id ON public.hdb_program_registration USING btree (audit_ref_id);


--
-- Name: idx_hdb_program_registration_goodies_audit_ref_id; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_hdb_program_registration_goodies_audit_ref_id ON public.hdb_program_registration_goodies USING btree (audit_ref_id);


--
-- Name: idx_hdb_program_registration_goodies_parent_ref_id; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_hdb_program_registration_goodies_parent_ref_id ON public.hdb_program_registration_goodies USING btree (parent_ref_id);


--
-- Name: idx_hdb_program_registration_parent_ref_id; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_hdb_program_registration_parent_ref_id ON public.hdb_program_registration USING btree (parent_ref_id);


--
-- Name: idx_hdb_program_registration_recommendations_audit_ref_id; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_hdb_program_registration_recommendations_audit_ref_id ON public.hdb_program_registration_recommendations USING btree (audit_ref_id);


--
-- Name: idx_hdb_program_registration_recommendations_follow_up_count; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_hdb_program_registration_recommendations_follow_up_count ON public.hdb_program_registration_recommendations USING btree (follow_up_count);


--
-- Name: idx_hdb_program_registration_recommendations_parent_ref_id; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_hdb_program_registration_recommendations_parent_ref_id ON public.hdb_program_registration_recommendations USING btree (parent_ref_id);


--
-- Name: idx_hdb_program_registration_rm_rating_audit_ref_id; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_hdb_program_registration_rm_rating_audit_ref_id ON public.hdb_program_registration_rm_rating USING btree (audit_ref_id);


--
-- Name: idx_hdb_program_registration_rm_rating_parent_ref_id; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_hdb_program_registration_rm_rating_parent_ref_id ON public.hdb_program_registration_rm_rating USING btree (parent_ref_id);


--
-- Name: idx_hdb_program_registration_swap_audit_ref_id; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_hdb_program_registration_swap_audit_ref_id ON public.hdb_program_registration_swap USING btree (audit_ref_id);


--
-- Name: idx_hdb_program_registration_swap_parent_ref_id; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_hdb_program_registration_swap_parent_ref_id ON public.hdb_program_registration_swap USING btree (parent_ref_id);


--
-- Name: idx_hdb_program_session; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_hdb_program_session ON public.hdb_program_registration USING btree (program_session_id);


--
-- Name: idx_hdb_registration_approval_audit_ref_id; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_hdb_registration_approval_audit_ref_id ON public.hdb_registration_approval USING btree (audit_ref_id);


--
-- Name: idx_hdb_registration_approval_parent_ref_id; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_hdb_registration_approval_parent_ref_id ON public.hdb_registration_approval USING btree (parent_ref_id);


--
-- Name: idx_hdb_registration_custom_response_audit_ref_id; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_hdb_registration_custom_response_audit_ref_id ON public.hdb_registration_custom_response USING btree (audit_ref_id);


--
-- Name: idx_hdb_registration_custom_response_parent_ref_id; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_hdb_registration_custom_response_parent_ref_id ON public.hdb_registration_custom_response USING btree (parent_ref_id);


--
-- Name: idx_hdb_registration_date; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_hdb_registration_date ON public.hdb_program_registration USING btree (registration_date);


--
-- Name: idx_hdb_registration_invoice_detail_audit_ref_id; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_hdb_registration_invoice_detail_audit_ref_id ON public.hdb_registration_invoice_detail USING btree (audit_ref_id);


--
-- Name: idx_hdb_registration_invoice_detail_parent_ref_id; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_hdb_registration_invoice_detail_parent_ref_id ON public.hdb_registration_invoice_detail USING btree (parent_ref_id);


--
-- Name: idx_hdb_registration_payment_detail_audit_ref_id; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_hdb_registration_payment_detail_audit_ref_id ON public.hdb_registration_payment_detail USING btree (audit_ref_id);


--
-- Name: idx_hdb_registration_payment_detail_parent_ref_id; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_hdb_registration_payment_detail_parent_ref_id ON public.hdb_registration_payment_detail USING btree (parent_ref_id);


--
-- Name: idx_hdb_registration_question_answer_audit_ref_id; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_hdb_registration_question_answer_audit_ref_id ON public.hdb_registration_question_answer USING btree (audit_ref_id);


--
-- Name: idx_hdb_registration_question_answer_parent_ref_id; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_hdb_registration_question_answer_parent_ref_id ON public.hdb_registration_question_answer USING btree (parent_ref_id);


--
-- Name: idx_hdb_registration_travel_info_audit_ref_id; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_hdb_registration_travel_info_audit_ref_id ON public.hdb_registration_travel_info USING btree (audit_ref_id);


--
-- Name: idx_hdb_registration_travel_info_parent_ref_id; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_hdb_registration_travel_info_parent_ref_id ON public.hdb_registration_travel_info USING btree (parent_ref_id);


--
-- Name: idx_hdb_registration_travel_plan_audit_ref_id; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_hdb_registration_travel_plan_audit_ref_id ON public.hdb_registration_travel_plan USING btree (audit_ref_id);


--
-- Name: idx_hdb_registration_travel_plan_parent_ref_id; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_hdb_registration_travel_plan_parent_ref_id ON public.hdb_registration_travel_plan USING btree (parent_ref_id);


--
-- Name: idx_hdb_rm_contact; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_hdb_rm_contact ON public.hdb_program_registration USING btree (rm_contact);


--
-- Name: idx_hdb_travel_info_id_type; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_hdb_travel_info_id_type ON public.hdb_registration_travel_info USING btree (id_type);


--
-- Name: idx_hdb_travel_info_registration; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_hdb_travel_info_registration ON public.hdb_registration_travel_info USING btree (registration_id);


--
-- Name: idx_hdb_travel_plan_arrival; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_hdb_travel_plan_arrival ON public.hdb_registration_travel_plan USING btree (arrival_datetime);


--
-- Name: idx_hdb_travel_plan_registration; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_hdb_travel_plan_registration ON public.hdb_registration_travel_plan USING btree (registration_id);


--
-- Name: idx_hdb_travel_plan_type; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_hdb_travel_plan_type ON public.hdb_registration_travel_plan USING btree (travel_type);


--
-- Name: idx_hdb_updated_by; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_hdb_updated_by ON public.hdb_program_registration USING btree (updated_by);


--
-- Name: idx_hdb_user; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_hdb_user ON public.hdb_program_registration USING btree (user_id);


--
-- Name: idx_id_proof_export_jobs_created_at; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_id_proof_export_jobs_created_at ON public.id_proof_export_jobs USING btree (created_at);


--
-- Name: idx_id_proof_export_jobs_created_by; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_id_proof_export_jobs_created_by ON public.id_proof_export_jobs USING btree (created_by);


--
-- Name: idx_id_proof_export_jobs_deleted_at; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_id_proof_export_jobs_deleted_at ON public.id_proof_export_jobs USING btree (deleted_at);


--
-- Name: idx_id_proof_export_jobs_program_id; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_id_proof_export_jobs_program_id ON public.id_proof_export_jobs USING btree (program_id);


--
-- Name: idx_id_proof_export_jobs_status; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_id_proof_export_jobs_status ON public.id_proof_export_jobs USING btree (status);


--
-- Name: idx_lookup_category_key; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_lookup_category_key ON public.lookup_data USING btree (lookup_category, lookup_key);


--
-- Name: idx_prim_deleted; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_prim_deleted ON public.program_room_inventory_map USING btree (deleted_at);


--
-- Name: idx_prim_program; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_prim_program ON public.program_room_inventory_map USING btree (program_id);


--
-- Name: idx_prim_room; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_prim_room ON public.program_room_inventory_map USING btree (room_id);


--
-- Name: idx_prim_status; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_prim_status ON public.program_room_inventory_map USING btree (room_status);


--
-- Name: idx_prim_subprogram; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_prim_subprogram ON public.program_room_inventory_map USING btree (sub_program_id);


--
-- Name: idx_program_message_audit_ref_id; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_program_message_audit_ref_id ON public.program_message USING btree (audit_ref_id);


--
-- Name: idx_program_message_parent_ref_id; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_program_message_parent_ref_id ON public.program_message USING btree (parent_ref_id);


--
-- Name: idx_program_registration_failures_audit_ref_id; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_program_registration_failures_audit_ref_id ON public.program_registration_failures USING btree (audit_ref_id);


--
-- Name: idx_program_registration_failures_parent_ref_id; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_program_registration_failures_parent_ref_id ON public.program_registration_failures USING btree (parent_ref_id);


--
-- Name: idx_program_session_created_by; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_program_session_created_by ON public.program_session USING btree (created_by);


--
-- Name: idx_program_session_program_id; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_program_session_program_id ON public.program_session USING btree (program_id);


--
-- Name: idx_program_session_updated_by; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_program_session_updated_by ON public.program_session USING btree (updated_by);


--
-- Name: idx_program_type_v1_created_by; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_program_type_v1_created_by ON public.program_type_v1 USING btree (created_by);


--
-- Name: idx_program_type_v1_updated_by; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_program_type_v1_updated_by ON public.program_type_v1 USING btree (updated_by);


--
-- Name: idx_program_v1_active; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_program_v1_active ON public.program_v1 USING btree (is_active, deleted_at) WHERE ((is_active = true) AND (deleted_at IS NULL));


--
-- Name: idx_program_v1_created_by; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_program_v1_created_by ON public.program_v1 USING btree (created_by);


--
-- Name: idx_program_v1_group_id; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_program_v1_group_id ON public.program_v1 USING btree (group_id);


--
-- Name: idx_program_v1_group_primary; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_program_v1_group_primary ON public.program_v1 USING btree (group_id, is_primary_program) WHERE (group_id IS NOT NULL);


--
-- Name: idx_program_v1_primary_program_id; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_program_v1_primary_program_id ON public.program_v1 USING btree (primary_program_id);


--
-- Name: idx_program_v1_primary_programs; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_program_v1_primary_programs ON public.program_v1 USING btree (is_primary_program) WHERE (is_primary_program = true);


--
-- Name: idx_program_v1_sub_program_type; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_program_v1_sub_program_type ON public.program_v1 USING btree (sub_program_type) WHERE (sub_program_type IS NOT NULL);


--
-- Name: idx_program_v1_updated_by; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_program_v1_updated_by ON public.program_v1 USING btree (updated_by);


--
-- Name: idx_ra_deleted; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_ra_deleted ON public.room_allocation USING btree (deleted_at);


--
-- Name: idx_ra_inventory; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_ra_inventory ON public.room_allocation USING btree (program_room_inventory_map_id);


--
-- Name: idx_ra_registration; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_ra_registration ON public.room_allocation USING btree (registration_id);


--
-- Name: idx_rah_allocation; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_rah_allocation ON public.room_allocation_history USING btree (room_allocation_id);


--
-- Name: idx_rah_created; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_rah_created ON public.room_allocation_history USING btree (created_at);


--
-- Name: idx_rg_deleted; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_rg_deleted ON public.registration_group USING btree (deleted_at);


--
-- Name: idx_rg_name; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_rg_name ON public.registration_group USING btree (group_name);


--
-- Name: idx_rg_program; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_rg_program ON public.registration_group USING btree (program_id);


--
-- Name: idx_rg_subprogram; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_rg_subprogram ON public.registration_group USING btree (sub_program_id);


--
-- Name: idx_rgm_deleted; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_rgm_deleted ON public.registration_group_map USING btree (deleted_at);


--
-- Name: idx_rgm_group; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_rgm_group ON public.registration_group_map USING btree (registration_group_id);


--
-- Name: idx_rgm_registration; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_rgm_registration ON public.registration_group_map USING btree (registration_id);


--
-- Name: idx_room_deleted; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_room_deleted ON public.room USING btree (deleted_at);


--
-- Name: idx_room_floor; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_room_floor ON public.room USING btree (floor_id);


--
-- Name: idx_room_status; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_room_status ON public.room USING btree (room_status);


--
-- Name: idx_room_type; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_room_type ON public.room USING btree (room_type);


--
-- Name: idx_rp_code; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_rp_code ON public.registration_pair USING btree (pair_code);


--
-- Name: idx_rp_deleted; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_rp_deleted ON public.registration_pair USING btree (deleted_at);


--
-- Name: idx_rp_program; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_rp_program ON public.registration_pair USING btree (program_id);


--
-- Name: idx_rp_subprogram; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_rp_subprogram ON public.registration_pair USING btree (sub_program_id);


--
-- Name: idx_rpm_deleted; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_rpm_deleted ON public.registration_pair_map USING btree (deleted_at);


--
-- Name: idx_rpm_pair; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_rpm_pair ON public.registration_pair_map USING btree (registration_pair_id);


--
-- Name: idx_rpm_registration; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_rpm_registration ON public.registration_pair_map USING btree (registration_id);


--
-- Name: idx_scheduler_logs_completed_at; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_scheduler_logs_completed_at ON public.portal_scheduler_logs USING btree (completed_at DESC);


--
-- Name: idx_scheduler_logs_created_at; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_scheduler_logs_created_at ON public.portal_scheduler_logs USING btree (created_at DESC);


--
-- Name: idx_scheduler_logs_date_status; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_scheduler_logs_date_status ON public.portal_scheduler_logs USING btree (created_at DESC, execution_status);


--
-- Name: idx_scheduler_logs_execution_status; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_scheduler_logs_execution_status ON public.portal_scheduler_logs USING btree (execution_status);


--
-- Name: idx_scheduler_logs_failed_at; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_scheduler_logs_failed_at ON public.portal_scheduler_logs USING btree (failed_at DESC);


--
-- Name: idx_scheduler_logs_job_name; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_scheduler_logs_job_name ON public.portal_scheduler_logs USING btree (job_name);


--
-- Name: idx_scheduler_logs_job_status; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_scheduler_logs_job_status ON public.portal_scheduler_logs USING btree (job_type, execution_status);


--
-- Name: idx_scheduler_logs_job_type; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_scheduler_logs_job_type ON public.portal_scheduler_logs USING btree (job_type);


--
-- Name: idx_scheduler_logs_program_id; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_scheduler_logs_program_id ON public.portal_scheduler_logs USING btree (program_id);


--
-- Name: idx_scheduler_logs_program_status; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_scheduler_logs_program_status ON public.portal_scheduler_logs USING btree (program_id, execution_status) WHERE (program_id IS NOT NULL);


--
-- Name: idx_scheduler_logs_registration_id; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_scheduler_logs_registration_id ON public.portal_scheduler_logs USING btree (registration_id);


--
-- Name: idx_scheduler_logs_triggered_by_user_id; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_scheduler_logs_triggered_by_user_id ON public.portal_scheduler_logs USING btree (triggered_by_user_id);


--
-- Name: idx_scheduler_logs_triggered_type; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_scheduler_logs_triggered_type ON public.portal_scheduler_logs USING btree (triggered_type);


--
-- Name: idx_seeker_defaulter_created_by; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_seeker_defaulter_created_by ON public.seeker_defaulter USING btree (created_by);


--
-- Name: idx_seeker_defaulter_deleted_at; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_seeker_defaulter_deleted_at ON public.seeker_defaulter USING btree (deleted_at) WHERE (deleted_at IS NULL);


--
-- Name: idx_seeker_defaulter_is_defaulter; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_seeker_defaulter_is_defaulter ON public.seeker_defaulter USING btree (is_defaulter);


--
-- Name: idx_seeker_defaulter_registration_id; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_seeker_defaulter_registration_id ON public.seeker_defaulter USING btree (registration_id);


--
-- Name: idx_seeker_defaulter_track_created_at; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_seeker_defaulter_track_created_at ON public.seeker_defaulter_track USING btree (created_at DESC);


--
-- Name: idx_seeker_defaulter_track_performed_by; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_seeker_defaulter_track_performed_by ON public.seeker_defaulter_track USING btree (performed_by);


--
-- Name: idx_seeker_defaulter_track_registration_id; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_seeker_defaulter_track_registration_id ON public.seeker_defaulter_track USING btree (registration_id);


--
-- Name: idx_seeker_defaulter_track_seeker_defaulter_id; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_seeker_defaulter_track_seeker_defaulter_id ON public.seeker_defaulter_track USING btree (seeker_defaulter_id);


--
-- Name: idx_seeker_defaulter_track_user_id; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_seeker_defaulter_track_user_id ON public.seeker_defaulter_track USING btree (user_id);


--
-- Name: idx_seeker_defaulter_user_id; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_seeker_defaulter_user_id ON public.seeker_defaulter USING btree (user_id);


--
-- Name: idx_seeker_defaulter_user_unique; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE UNIQUE INDEX idx_seeker_defaulter_user_unique ON public.seeker_defaulter USING btree (user_id) WHERE (deleted_at IS NULL);


--
-- Name: idx_user_participation_summary_program_dates; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_user_participation_summary_program_dates ON public.user_participation_summary USING btree (program_starts_at, program_ends_at);


--
-- Name: idx_user_participation_summary_sub_program_type; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_user_participation_summary_sub_program_type ON public.user_participation_summary USING btree (sub_program_type, user_id) WHERE (sub_program_type IS NOT NULL);


--
-- Name: idx_user_participation_summary_user_program; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_user_participation_summary_user_program ON public.user_participation_summary USING btree (user_id, program_id);


--
-- Name: idx_user_profile_extension_id_back_url; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_user_profile_extension_id_back_url ON public.user_profile_extension USING btree (id_back_url) WHERE (id_back_url IS NOT NULL);


--
-- Name: idx_user_profile_extension_id_front_url; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_user_profile_extension_id_front_url ON public.user_profile_extension USING btree (id_front_url) WHERE (id_front_url IS NOT NULL);


--
-- Name: idx_user_program_experience_lookup_data_id; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_user_program_experience_lookup_data_id ON public.user_program_experience USING btree (lookup_data_id);


--
-- Name: idx_user_program_experience_registration_id; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_user_program_experience_registration_id ON public.user_program_experience USING btree (registration_id);


--
-- Name: idx_user_program_experience_user_id; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_user_program_experience_user_id ON public.user_program_experience USING btree (user_id);


--
-- Name: idx_user_registration_map_created_at; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_user_registration_map_created_at ON public.user_registration_map USING btree (created_at);


--
-- Name: idx_user_registration_map_deleted_at; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_user_registration_map_deleted_at ON public.user_registration_map USING btree (deleted_at);


--
-- Name: idx_user_registration_map_registration_id; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_user_registration_map_registration_id ON public.user_registration_map USING btree (registration_id);


--
-- Name: idx_user_registration_map_summary_id; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_user_registration_map_summary_id ON public.user_registration_map USING btree (summary_id);


--
-- Name: idx_user_registration_map_user_id; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_user_registration_map_user_id ON public.user_registration_map USING btree (user_id);


--
-- Name: idx_user_role_map_audit_ref_id; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_user_role_map_audit_ref_id ON public.user_role_map USING btree (audit_ref_id);


--
-- Name: idx_user_role_map_parent_ref_id; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_user_role_map_parent_ref_id ON public.user_role_map USING btree (parent_ref_id);


--
-- Name: idx_user_role_map_user_id; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_user_role_map_user_id ON public.user_role_map USING btree (user_id) WITH (deduplicate_items='true');


--
-- Name: idx_user_session_email; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_user_session_email ON public.user_session USING btree (email) WHERE (email IS NOT NULL);


--
-- Name: idx_user_session_jwt_token; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE UNIQUE INDEX idx_user_session_jwt_token ON public.user_session USING btree (jwt_token) WHERE (jwt_token IS NOT NULL);


--
-- Name: idx_user_session_phone_number; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_user_session_phone_number ON public.user_session USING btree (country_code, phone_number) WHERE ((phone_number IS NOT NULL) AND (country_code IS NOT NULL));


--
-- Name: idx_user_session_user_id; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_user_session_user_id ON public.user_session USING btree (user_id) WHERE (user_id IS NOT NULL);


--
-- Name: idx_users_audit_ref_id; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_users_audit_ref_id ON public.users USING btree (audit_ref_id);


--
-- Name: idx_users_id; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_users_id ON public.users USING btree (id);


--
-- Name: idx_users_parent_ref_id; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_users_parent_ref_id ON public.users USING btree (parent_ref_id);


--
-- Name: idx_venue_address; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_venue_address ON public.venue USING btree (address_id);


--
-- Name: idx_venue_deleted; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_venue_deleted ON public.venue USING btree (deleted_at);


--
-- Name: idx_webinar_id; Type: INDEX; Schema: public; Owner: infini_automation_deploy
--

CREATE INDEX idx_webinar_id ON public.webinar USING btree (id);


--
-- Name: hdb_program_registration fk_allocated_program; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_program_registration
    ADD CONSTRAINT fk_allocated_program FOREIGN KEY (allocated_program_id) REFERENCES public.program_v1(id) ON DELETE SET NULL;


--
-- Name: hdb_program_registration_swap fk_allocated_program; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_program_registration_swap
    ADD CONSTRAINT fk_allocated_program FOREIGN KEY (allocated_program_id) REFERENCES public.program_v1(id);


--
-- Name: hdb_program_registration fk_allocated_session; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_program_registration
    ADD CONSTRAINT fk_allocated_session FOREIGN KEY (allocated_session_id) REFERENCES public.program_session(id) ON DELETE SET NULL;


--
-- Name: audit_history_log_detail fk_audit_history_log_detail_audit_log; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.audit_history_log_detail
    ADD CONSTRAINT fk_audit_history_log_detail_audit_log FOREIGN KEY (audit_log_id) REFERENCES public.audit_history_log(id) ON DELETE CASCADE;


--
-- Name: block fk_block_venue; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.block
    ADD CONSTRAINT fk_block_venue FOREIGN KEY (venue_id) REFERENCES public.venue(id);


--
-- Name: hdb_option fk_category; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_option
    ADD CONSTRAINT fk_category FOREIGN KEY (category_id) REFERENCES public.hdb_option_category(id) ON UPDATE CASCADE ON DELETE CASCADE;


--
-- Name: hdb_payment_change_request fk_completed_by; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_payment_change_request
    ADD CONSTRAINT fk_completed_by FOREIGN KEY (completed_by) REFERENCES public.users(id);


--
-- Name: hdb_form_section fk_created_by; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_form_section
    ADD CONSTRAINT fk_created_by FOREIGN KEY (created_by) REFERENCES public.users(id) ON UPDATE CASCADE ON DELETE SET NULL;


--
-- Name: hdb_option fk_created_by; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_option
    ADD CONSTRAINT fk_created_by FOREIGN KEY (created_by) REFERENCES public.users(id) ON UPDATE CASCADE ON DELETE SET NULL;


--
-- Name: hdb_option_category fk_created_by; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_option_category
    ADD CONSTRAINT fk_created_by FOREIGN KEY (created_by) REFERENCES public.users(id) ON UPDATE CASCADE ON DELETE SET NULL;


--
-- Name: hdb_program_question fk_created_by; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_program_question
    ADD CONSTRAINT fk_created_by FOREIGN KEY (created_by) REFERENCES public.users(id) ON DELETE SET NULL;


--
-- Name: hdb_question fk_created_by; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_question
    ADD CONSTRAINT fk_created_by FOREIGN KEY (created_by) REFERENCES public.users(id) ON UPDATE CASCADE ON DELETE SET NULL;


--
-- Name: hdb_question_option_map fk_created_by; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_question_option_map
    ADD CONSTRAINT fk_created_by FOREIGN KEY (created_by) REFERENCES public.users(id) ON UPDATE CASCADE ON DELETE SET NULL;


--
-- Name: program_registration_failures fk_created_by; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.program_registration_failures
    ADD CONSTRAINT fk_created_by FOREIGN KEY (created_by) REFERENCES public.users(id) ON DELETE SET NULL;


--
-- Name: hdb_program_registration_swap fk_current_program; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_program_registration_swap
    ADD CONSTRAINT fk_current_program FOREIGN KEY (current_program_id) REFERENCES public.program_v1(id);


--
-- Name: hdb_registration_invoice_einvoice_history fk_einvoice_created_by; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_registration_invoice_einvoice_history
    ADD CONSTRAINT fk_einvoice_created_by FOREIGN KEY (created_by) REFERENCES public.users(id);


--
-- Name: hdb_registration_invoice_einvoice_history fk_einvoice_updated_by; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_registration_invoice_einvoice_history
    ADD CONSTRAINT fk_einvoice_updated_by FOREIGN KEY (updated_by) REFERENCES public.users(id);


--
-- Name: floor fk_floor_block; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.floor
    ADD CONSTRAINT fk_floor_block FOREIGN KEY (block_id) REFERENCES public.block(id);


--
-- Name: hdb_question fk_form_section; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_question
    ADD CONSTRAINT fk_form_section FOREIGN KEY (form_section_id) REFERENCES public.hdb_form_section(id) ON UPDATE CASCADE ON DELETE SET NULL;


--
-- Name: hdb_registration_approval fk_hdb_approval_approved_by; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_registration_approval
    ADD CONSTRAINT fk_hdb_approval_approved_by FOREIGN KEY (approved_by) REFERENCES public.users(id) ON DELETE SET NULL;


--
-- Name: hdb_registration_approval fk_hdb_approval_registration; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_registration_approval
    ADD CONSTRAINT fk_hdb_approval_registration FOREIGN KEY (registration_id) REFERENCES public.hdb_program_registration(id) ON DELETE CASCADE;


--
-- Name: hdb_program_registration fk_hdb_cancelled_by; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_program_registration
    ADD CONSTRAINT fk_hdb_cancelled_by FOREIGN KEY (cancelled_by) REFERENCES public.users(id) ON DELETE SET NULL;


--
-- Name: hdb_communication_track fk_hdb_communication_track; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_communication_track
    ADD CONSTRAINT fk_hdb_communication_track FOREIGN KEY (registration_id) REFERENCES public.hdb_program_registration(id) ON DELETE CASCADE;


--
-- Name: hdb_communication_track fk_hdb_communication_track_created_by; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_communication_track
    ADD CONSTRAINT fk_hdb_communication_track_created_by FOREIGN KEY (created_by) REFERENCES public.users(id) ON DELETE SET NULL;


--
-- Name: hdb_communication_track fk_hdb_communication_track_updated_by; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_communication_track
    ADD CONSTRAINT fk_hdb_communication_track_updated_by FOREIGN KEY (updated_by) REFERENCES public.users(id) ON DELETE SET NULL;


--
-- Name: hdb_program_registration fk_hdb_created_by; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_program_registration
    ADD CONSTRAINT fk_hdb_created_by FOREIGN KEY (created_by) REFERENCES public.users(id) ON DELETE SET NULL;


--
-- Name: hdb_registration_custom_response fk_hdb_custom_response_question; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_registration_custom_response
    ADD CONSTRAINT fk_hdb_custom_response_question FOREIGN KEY (question_id) REFERENCES public.hdb_question(id) ON DELETE CASCADE;


--
-- Name: hdb_registration_custom_response fk_hdb_custom_response_registration; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_registration_custom_response
    ADD CONSTRAINT fk_hdb_custom_response_registration FOREIGN KEY (registration_id) REFERENCES public.hdb_program_registration(id) ON DELETE CASCADE;


--
-- Name: hdb_registration_invoice_detail fk_hdb_invoice_registration; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_registration_invoice_detail
    ADD CONSTRAINT fk_hdb_invoice_registration FOREIGN KEY (registration_id) REFERENCES public.hdb_program_registration(id) ON DELETE CASCADE;


--
-- Name: hdb_registration_payment_detail fk_hdb_payment_registration; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_registration_payment_detail
    ADD CONSTRAINT fk_hdb_payment_registration FOREIGN KEY (registration_id) REFERENCES public.hdb_program_registration(id) ON DELETE CASCADE;


--
-- Name: hdb_registration_question_answer fk_hdb_question_answer_question; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_registration_question_answer
    ADD CONSTRAINT fk_hdb_question_answer_question FOREIGN KEY (question_id) REFERENCES public.hdb_question(id) ON DELETE CASCADE;


--
-- Name: hdb_registration_question_answer fk_hdb_question_answer_registration; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_registration_question_answer
    ADD CONSTRAINT fk_hdb_question_answer_registration FOREIGN KEY (registration_id) REFERENCES public.hdb_program_registration(id) ON DELETE CASCADE;


--
-- Name: hdb_program_registration fk_hdb_rm_contact; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_program_registration
    ADD CONSTRAINT fk_hdb_rm_contact FOREIGN KEY (rm_contact) REFERENCES public.users(id) ON DELETE SET NULL;


--
-- Name: hdb_registration_travel_info fk_hdb_travel_info_registration; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_registration_travel_info
    ADD CONSTRAINT fk_hdb_travel_info_registration FOREIGN KEY (registration_id) REFERENCES public.hdb_program_registration(id) ON DELETE CASCADE;


--
-- Name: hdb_registration_travel_plan fk_hdb_travel_plan_registration; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_registration_travel_plan
    ADD CONSTRAINT fk_hdb_travel_plan_registration FOREIGN KEY (registration_id) REFERENCES public.hdb_program_registration(id) ON DELETE CASCADE;


--
-- Name: hdb_program_registration fk_hdb_updated_by; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_program_registration
    ADD CONSTRAINT fk_hdb_updated_by FOREIGN KEY (updated_by) REFERENCES public.users(id) ON DELETE SET NULL;


--
-- Name: hdb_program_registration fk_hdb_user; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_program_registration
    ADD CONSTRAINT fk_hdb_user FOREIGN KEY (user_id) REFERENCES public.users(id) ON DELETE CASCADE;


--
-- Name: hdb_registration_invoice_basic_history fk_history_created_by; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_registration_invoice_basic_history
    ADD CONSTRAINT fk_history_created_by FOREIGN KEY (created_by) REFERENCES public.users(id);


--
-- Name: hdb_registration_invoice_basic_history fk_history_updated_by; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_registration_invoice_basic_history
    ADD CONSTRAINT fk_history_updated_by FOREIGN KEY (updated_by) REFERENCES public.users(id);


--
-- Name: hdb_program_registration_recommendations fk_hprr_recommended_by; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_program_registration_recommendations
    ADD CONSTRAINT fk_hprr_recommended_by FOREIGN KEY (recommended_by) REFERENCES public.users(id);


--
-- Name: hdb_program_registration_recommendations fk_hprr_registration_id; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_program_registration_recommendations
    ADD CONSTRAINT fk_hprr_registration_id FOREIGN KEY (registration_id) REFERENCES public.hdb_program_registration(id);


--
-- Name: hdb_registration_invoice_basic_history fk_invoice; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_registration_invoice_basic_history
    ADD CONSTRAINT fk_invoice FOREIGN KEY (invoice_id) REFERENCES public.hdb_registration_invoice_detail(id);


--
-- Name: hdb_registration_invoice_einvoice_history fk_invoice; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_registration_invoice_einvoice_history
    ADD CONSTRAINT fk_invoice FOREIGN KEY (invoice_id) REFERENCES public.hdb_registration_invoice_detail(id);


--
-- Name: hdb_question_option_map fk_option; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_question_option_map
    ADD CONSTRAINT fk_option FOREIGN KEY (option_id) REFERENCES public.hdb_option(id) ON UPDATE CASCADE ON DELETE CASCADE;


--
-- Name: hdb_payment_change_request fk_payment; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_payment_change_request
    ADD CONSTRAINT fk_payment FOREIGN KEY (payment_id) REFERENCES public.hdb_registration_payment_detail(id);


--
-- Name: hdb_preference fk_preference_created_by; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_preference
    ADD CONSTRAINT fk_preference_created_by FOREIGN KEY (created_by) REFERENCES public.users(id) ON DELETE SET NULL;


--
-- Name: hdb_preference fk_preference_preferred_program; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_preference
    ADD CONSTRAINT fk_preference_preferred_program FOREIGN KEY (preferred_program_id) REFERENCES public.program_v1(id) ON DELETE CASCADE;


--
-- Name: hdb_preference fk_preference_preferred_session; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_preference
    ADD CONSTRAINT fk_preference_preferred_session FOREIGN KEY (preferred_session_id) REFERENCES public.program_session(id) ON DELETE CASCADE;


--
-- Name: hdb_preference fk_preference_registration; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_preference
    ADD CONSTRAINT fk_preference_registration FOREIGN KEY (registration_id) REFERENCES public.hdb_program_registration(id) ON DELETE CASCADE;


--
-- Name: hdb_preference fk_preference_updated_by; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_preference
    ADD CONSTRAINT fk_preference_updated_by FOREIGN KEY (updated_by) REFERENCES public.users(id) ON DELETE SET NULL;


--
-- Name: program_room_inventory_map fk_prim_program; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.program_room_inventory_map
    ADD CONSTRAINT fk_prim_program FOREIGN KEY (program_id) REFERENCES public.program_v1(id);


--
-- Name: program_room_inventory_map fk_prim_room; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.program_room_inventory_map
    ADD CONSTRAINT fk_prim_room FOREIGN KEY (room_id) REFERENCES public.room(id);


--
-- Name: program_room_inventory_map fk_prim_sub_program; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.program_room_inventory_map
    ADD CONSTRAINT fk_prim_sub_program FOREIGN KEY (sub_program_id) REFERENCES public.program_v1(id);


--
-- Name: program_session fk_program; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.program_session
    ADD CONSTRAINT fk_program FOREIGN KEY (program_id) REFERENCES public.program_v1(id);


--
-- Name: hdb_communication_templates fk_program_key; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_communication_templates
    ADD CONSTRAINT fk_program_key FOREIGN KEY (program_key) REFERENCES public.program_type_v1(key);


--
-- Name: hdb_program_question fk_program_question_form_section; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_program_question
    ADD CONSTRAINT fk_program_question_form_section FOREIGN KEY (form_section_id) REFERENCES public.hdb_form_section(id) ON UPDATE CASCADE ON DELETE SET NULL;


--
-- Name: webinar fk_program_session; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.webinar
    ADD CONSTRAINT fk_program_session FOREIGN KEY (program_session_id) REFERENCES public.program_session(id);


--
-- Name: program_session fk_program_session_created_by; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.program_session
    ADD CONSTRAINT fk_program_session_created_by FOREIGN KEY (created_by) REFERENCES public.users(id) ON DELETE SET NULL;


--
-- Name: program_session fk_program_session_program; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.program_session
    ADD CONSTRAINT fk_program_session_program FOREIGN KEY (program_id) REFERENCES public.program_v1(id) ON DELETE SET NULL;


--
-- Name: program_session fk_program_session_updated_by; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.program_session
    ADD CONSTRAINT fk_program_session_updated_by FOREIGN KEY (updated_by) REFERENCES public.users(id) ON DELETE SET NULL;


--
-- Name: program_v1 fk_program_type; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.program_v1
    ADD CONSTRAINT fk_program_type FOREIGN KEY (program_type_id) REFERENCES public.program_type_v1(id);


--
-- Name: program_type_v1 fk_program_type_v1_created_by; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.program_type_v1
    ADD CONSTRAINT fk_program_type_v1_created_by FOREIGN KEY (created_by) REFERENCES public.users(id) ON DELETE SET NULL;


--
-- Name: program_type_v1 fk_program_type_v1_updated_by; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.program_type_v1
    ADD CONSTRAINT fk_program_type_v1_updated_by FOREIGN KEY (updated_by) REFERENCES public.users(id) ON DELETE SET NULL;


--
-- Name: program_v1 fk_program_v1_created_by; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.program_v1
    ADD CONSTRAINT fk_program_v1_created_by FOREIGN KEY (created_by) REFERENCES public.users(id) ON DELETE SET NULL;


--
-- Name: program_v1 fk_program_v1_primary_program; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.program_v1
    ADD CONSTRAINT fk_program_v1_primary_program FOREIGN KEY (primary_program_id) REFERENCES public.program_v1(id) ON DELETE SET NULL;


--
-- Name: program_v1 fk_program_v1_type; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.program_v1
    ADD CONSTRAINT fk_program_v1_type FOREIGN KEY (program_type_id) REFERENCES public.program_type_v1(id) ON DELETE SET NULL;


--
-- Name: program_v1 fk_program_v1_updated_by; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.program_v1
    ADD CONSTRAINT fk_program_v1_updated_by FOREIGN KEY (updated_by) REFERENCES public.users(id) ON DELETE SET NULL;


--
-- Name: program_v1 fk_program_venue_address; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.program_v1
    ADD CONSTRAINT fk_program_venue_address FOREIGN KEY (venue_address_id) REFERENCES public.hdb_address(address_id);


--
-- Name: hdb_program_question fk_question; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_program_question
    ADD CONSTRAINT fk_question FOREIGN KEY (question_id) REFERENCES public.hdb_question(id) ON UPDATE CASCADE ON DELETE CASCADE;


--
-- Name: hdb_question_option_map fk_question; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_question_option_map
    ADD CONSTRAINT fk_question FOREIGN KEY (question_id) REFERENCES public.hdb_question(id) ON UPDATE CASCADE ON DELETE CASCADE;


--
-- Name: room_allocation fk_ra_prim; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.room_allocation
    ADD CONSTRAINT fk_ra_prim FOREIGN KEY (program_room_inventory_map_id) REFERENCES public.program_room_inventory_map(id);


--
-- Name: room_allocation fk_ra_registration; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.room_allocation
    ADD CONSTRAINT fk_ra_registration FOREIGN KEY (registration_id) REFERENCES public.hdb_program_registration(id);


--
-- Name: room_allocation_history fk_rah_allocation; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.room_allocation_history
    ADD CONSTRAINT fk_rah_allocation FOREIGN KEY (room_allocation_id) REFERENCES public.room_allocation(id);


--
-- Name: room_allocation_history fk_rah_inventory; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.room_allocation_history
    ADD CONSTRAINT fk_rah_inventory FOREIGN KEY (program_room_inventory_map_id) REFERENCES public.program_room_inventory_map(id);


--
-- Name: room_allocation_history fk_rah_registration; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.room_allocation_history
    ADD CONSTRAINT fk_rah_registration FOREIGN KEY (registration_id) REFERENCES public.hdb_program_registration(id);


--
-- Name: hdb_registration_approval_track fk_registration_approval_track_allocated_program; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_registration_approval_track
    ADD CONSTRAINT fk_registration_approval_track_allocated_program FOREIGN KEY (allocated_program_id) REFERENCES public.program_v1(id) ON DELETE SET NULL;


--
-- Name: hdb_registration_approval_track fk_registration_approval_track_allocated_session; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_registration_approval_track
    ADD CONSTRAINT fk_registration_approval_track_allocated_session FOREIGN KEY (allocated_session_id) REFERENCES public.program_session(id) ON DELETE SET NULL;


--
-- Name: hdb_payment_change_request fk_requested_by; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_payment_change_request
    ADD CONSTRAINT fk_requested_by FOREIGN KEY (requested_by) REFERENCES public.users(id);


--
-- Name: registration_group fk_rg_program; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.registration_group
    ADD CONSTRAINT fk_rg_program FOREIGN KEY (program_id) REFERENCES public.program_v1(id);


--
-- Name: registration_group fk_rg_sub_program; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.registration_group
    ADD CONSTRAINT fk_rg_sub_program FOREIGN KEY (sub_program_id) REFERENCES public.program_v1(id);


--
-- Name: registration_group_map fk_rgm_group; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.registration_group_map
    ADD CONSTRAINT fk_rgm_group FOREIGN KEY (registration_group_id) REFERENCES public.registration_group(id);


--
-- Name: registration_group_map fk_rgm_registration; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.registration_group_map
    ADD CONSTRAINT fk_rgm_registration FOREIGN KEY (registration_id) REFERENCES public.hdb_program_registration(id);


--
-- Name: registration_pair_map fk_rgm_registration; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.registration_pair_map
    ADD CONSTRAINT fk_rgm_registration FOREIGN KEY (registration_id) REFERENCES public.hdb_program_registration(id);


--
-- Name: room fk_room_floor; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.room
    ADD CONSTRAINT fk_room_floor FOREIGN KEY (floor_id) REFERENCES public.floor(id);


--
-- Name: registration_pair fk_rp_program; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.registration_pair
    ADD CONSTRAINT fk_rp_program FOREIGN KEY (program_id) REFERENCES public.program_v1(id);


--
-- Name: registration_pair fk_rp_subprogram; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.registration_pair
    ADD CONSTRAINT fk_rp_subprogram FOREIGN KEY (sub_program_id) REFERENCES public.program_v1(id);


--
-- Name: registration_pair_map fk_rpm_pair; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.registration_pair_map
    ADD CONSTRAINT fk_rpm_pair FOREIGN KEY (registration_pair_id) REFERENCES public.registration_pair(id);


--
-- Name: program_session fk_session_venue_address; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.program_session
    ADD CONSTRAINT fk_session_venue_address FOREIGN KEY (venue_address_id) REFERENCES public.hdb_address(address_id);


--
-- Name: hdb_form_section fk_updated_by; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_form_section
    ADD CONSTRAINT fk_updated_by FOREIGN KEY (updated_by) REFERENCES public.users(id) ON UPDATE CASCADE ON DELETE SET NULL;


--
-- Name: hdb_option fk_updated_by; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_option
    ADD CONSTRAINT fk_updated_by FOREIGN KEY (updated_by) REFERENCES public.users(id) ON UPDATE CASCADE ON DELETE SET NULL;


--
-- Name: hdb_option_category fk_updated_by; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_option_category
    ADD CONSTRAINT fk_updated_by FOREIGN KEY (updated_by) REFERENCES public.users(id) ON UPDATE CASCADE ON DELETE SET NULL;


--
-- Name: hdb_payment_change_request fk_updated_by; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_payment_change_request
    ADD CONSTRAINT fk_updated_by FOREIGN KEY (updated_by) REFERENCES public.users(id);


--
-- Name: hdb_program_question fk_updated_by; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_program_question
    ADD CONSTRAINT fk_updated_by FOREIGN KEY (updated_by) REFERENCES public.users(id) ON DELETE SET NULL;


--
-- Name: hdb_question fk_updated_by; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_question
    ADD CONSTRAINT fk_updated_by FOREIGN KEY (updated_by) REFERENCES public.users(id) ON UPDATE CASCADE ON DELETE SET NULL;


--
-- Name: hdb_question_option_map fk_updated_by; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_question_option_map
    ADD CONSTRAINT fk_updated_by FOREIGN KEY (updated_by) REFERENCES public.users(id) ON UPDATE CASCADE ON DELETE SET NULL;


--
-- Name: program_registration_failures fk_updated_by; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.program_registration_failures
    ADD CONSTRAINT fk_updated_by FOREIGN KEY (updated_by) REFERENCES public.users(id) ON DELETE SET NULL;


--
-- Name: user_participation_summary fk_user_participation_created_by; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.user_participation_summary
    ADD CONSTRAINT fk_user_participation_created_by FOREIGN KEY (created_by) REFERENCES public.users(id);


--
-- Name: user_participation_summary fk_user_participation_updated_by; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.user_participation_summary
    ADD CONSTRAINT fk_user_participation_updated_by FOREIGN KEY (updated_by) REFERENCES public.users(id);


--
-- Name: user_participation_summary fk_user_participation_user; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.user_participation_summary
    ADD CONSTRAINT fk_user_participation_user FOREIGN KEY (user_id) REFERENCES public.users(id);


--
-- Name: user_profile_extension fk_user_profile_extension_created_by; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.user_profile_extension
    ADD CONSTRAINT fk_user_profile_extension_created_by FOREIGN KEY (created_by) REFERENCES public.users(id);


--
-- Name: user_profile_extension fk_user_profile_extension_updated_by; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.user_profile_extension
    ADD CONSTRAINT fk_user_profile_extension_updated_by FOREIGN KEY (updated_by) REFERENCES public.users(id);


--
-- Name: user_profile_extension fk_user_profile_extension_user; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.user_profile_extension
    ADD CONSTRAINT fk_user_profile_extension_user FOREIGN KEY (user_id) REFERENCES public.users(id);


--
-- Name: user_program_experience fk_user_program_experience_created_by; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.user_program_experience
    ADD CONSTRAINT fk_user_program_experience_created_by FOREIGN KEY (created_by) REFERENCES public.users(id) ON DELETE SET NULL;


--
-- Name: user_program_experience fk_user_program_experience_lookup_data; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.user_program_experience
    ADD CONSTRAINT fk_user_program_experience_lookup_data FOREIGN KEY (lookup_data_id) REFERENCES public.lookup_data(id) ON DELETE CASCADE;


--
-- Name: user_program_experience fk_user_program_experience_registration; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.user_program_experience
    ADD CONSTRAINT fk_user_program_experience_registration FOREIGN KEY (registration_id) REFERENCES public.hdb_program_registration(id) ON DELETE CASCADE;


--
-- Name: user_program_experience fk_user_program_experience_updated_by; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.user_program_experience
    ADD CONSTRAINT fk_user_program_experience_updated_by FOREIGN KEY (updated_by) REFERENCES public.users(id) ON DELETE SET NULL;


--
-- Name: user_program_experience fk_user_program_experience_user; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.user_program_experience
    ADD CONSTRAINT fk_user_program_experience_user FOREIGN KEY (user_id) REFERENCES public.users(id) ON DELETE CASCADE;


--
-- Name: user_registration_map fk_user_registration_map_created_by; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.user_registration_map
    ADD CONSTRAINT fk_user_registration_map_created_by FOREIGN KEY (created_by) REFERENCES public.users(id) ON DELETE SET NULL;


--
-- Name: user_registration_map fk_user_registration_map_registration; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.user_registration_map
    ADD CONSTRAINT fk_user_registration_map_registration FOREIGN KEY (registration_id) REFERENCES public.hdb_program_registration(id) ON DELETE CASCADE;


--
-- Name: user_registration_map fk_user_registration_map_summary; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.user_registration_map
    ADD CONSTRAINT fk_user_registration_map_summary FOREIGN KEY (summary_id) REFERENCES public.user_participation_summary(id) ON DELETE SET NULL;


--
-- Name: user_registration_map fk_user_registration_map_updated_by; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.user_registration_map
    ADD CONSTRAINT fk_user_registration_map_updated_by FOREIGN KEY (updated_by) REFERENCES public.users(id) ON DELETE SET NULL;


--
-- Name: user_registration_map fk_user_registration_map_user; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.user_registration_map
    ADD CONSTRAINT fk_user_registration_map_user FOREIGN KEY (user_id) REFERENCES public.users(id) ON DELETE CASCADE;


--
-- Name: user_session fk_user_session_user; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.user_session
    ADD CONSTRAINT fk_user_session_user FOREIGN KEY (user_id) REFERENCES public.users(id) ON DELETE CASCADE;


--
-- Name: venue fk_venue_address; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.venue
    ADD CONSTRAINT fk_venue_address FOREIGN KEY (address_id) REFERENCES public.hdb_address(address_id);


--
-- Name: webinar_attendee fk_webinar_attendee_related_user; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.webinar_attendee
    ADD CONSTRAINT fk_webinar_attendee_related_user FOREIGN KEY (related_user_id) REFERENCES public.users(id) ON DELETE SET NULL;


--
-- Name: webinar_attendee fk_webinar_attendee_user; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.webinar_attendee
    ADD CONSTRAINT fk_webinar_attendee_user FOREIGN KEY (user_id) REFERENCES public.users(id) ON DELETE CASCADE;


--
-- Name: webinar_attendee fk_webinar_attendee_webinar; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.webinar_attendee
    ADD CONSTRAINT fk_webinar_attendee_webinar FOREIGN KEY (webinar_id) REFERENCES public.webinar(id) ON DELETE CASCADE;


--
-- Name: webinar_registration_transaction fk_webinar_registration_transaction_webinar_registration; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.webinar_registration_transaction
    ADD CONSTRAINT fk_webinar_registration_transaction_webinar_registration FOREIGN KEY (webinar_registration_id) REFERENCES public.webinar_registration(id) ON DELETE CASCADE;


--
-- Name: webinar_registration fk_webinar_registration_user; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.webinar_registration
    ADD CONSTRAINT fk_webinar_registration_user FOREIGN KEY (user_id) REFERENCES public.users(id) ON DELETE CASCADE;


--
-- Name: webinar_registration fk_webinar_registration_webinar; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.webinar_registration
    ADD CONSTRAINT fk_webinar_registration_webinar FOREIGN KEY (webinar_id) REFERENCES public.webinar(id) ON DELETE CASCADE;


--
-- Name: groups groups_created_by_fkey; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.groups
    ADD CONSTRAINT groups_created_by_fkey FOREIGN KEY (created_by) REFERENCES public.users(id);


--
-- Name: groups groups_updated_by_fkey; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.groups
    ADD CONSTRAINT groups_updated_by_fkey FOREIGN KEY (updated_by) REFERENCES public.users(id);


--
-- Name: hdb_program_registration_rm_rating hdb_program_registration_rm_rating_created_by_fkey; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_program_registration_rm_rating
    ADD CONSTRAINT hdb_program_registration_rm_rating_created_by_fkey FOREIGN KEY (created_by) REFERENCES public.users(id);


--
-- Name: hdb_program_registration_rm_rating hdb_program_registration_rm_rating_program_registration_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_program_registration_rm_rating
    ADD CONSTRAINT hdb_program_registration_rm_rating_program_registration_id_fkey FOREIGN KEY (program_registration_id) REFERENCES public.hdb_program_registration(id);


--
-- Name: hdb_program_registration_rm_rating hdb_program_registration_rm_rating_rating_key_fkey; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_program_registration_rm_rating
    ADD CONSTRAINT hdb_program_registration_rm_rating_rating_key_fkey FOREIGN KEY (rating_key) REFERENCES public.hdb_program_registration_rm_rating_type(rating_key);


--
-- Name: hdb_program_registration_rm_rating hdb_program_registration_rm_rating_rm_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_program_registration_rm_rating
    ADD CONSTRAINT hdb_program_registration_rm_rating_rm_id_fkey FOREIGN KEY (rm_id) REFERENCES public.users(id);


--
-- Name: hdb_program_registration_rm_rating_type hdb_program_registration_rm_rating_type_created_by_fkey; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_program_registration_rm_rating_type
    ADD CONSTRAINT hdb_program_registration_rm_rating_type_created_by_fkey FOREIGN KEY (created_by) REFERENCES public.users(id);


--
-- Name: hdb_program_registration_rm_rating_type hdb_program_registration_rm_rating_type_updated_by_fkey; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_program_registration_rm_rating_type
    ADD CONSTRAINT hdb_program_registration_rm_rating_type_updated_by_fkey FOREIGN KEY (updated_by) REFERENCES public.users(id);


--
-- Name: hdb_program_registration_rm_rating hdb_program_registration_rm_rating_updated_by_fkey; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_program_registration_rm_rating
    ADD CONSTRAINT hdb_program_registration_rm_rating_updated_by_fkey FOREIGN KEY (updated_by) REFERENCES public.users(id);


--
-- Name: hdb_program_registration_swap hdb_program_registration_swap_created_by_fkey; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_program_registration_swap
    ADD CONSTRAINT hdb_program_registration_swap_created_by_fkey FOREIGN KEY (created_by) REFERENCES public.users(id);


--
-- Name: hdb_program_registration_swap hdb_program_registration_swap_updated_by_fkey; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_program_registration_swap
    ADD CONSTRAINT hdb_program_registration_swap_updated_by_fkey FOREIGN KEY (updated_by) REFERENCES public.users(id);


--
-- Name: hdb_registration_approval_track hdb_registration_approval_track_approval_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_registration_approval_track
    ADD CONSTRAINT hdb_registration_approval_track_approval_id_fkey FOREIGN KEY (approval_id) REFERENCES public.hdb_registration_approval(id);


--
-- Name: hdb_registration_approval_track hdb_registration_approval_track_approved_by_fkey; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_registration_approval_track
    ADD CONSTRAINT hdb_registration_approval_track_approved_by_fkey FOREIGN KEY (approved_by) REFERENCES public.users(id);


--
-- Name: hdb_registration_approval_track hdb_registration_approval_track_created_by_fkey; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_registration_approval_track
    ADD CONSTRAINT hdb_registration_approval_track_created_by_fkey FOREIGN KEY (created_by) REFERENCES public.users(id) ON DELETE SET NULL;


--
-- Name: hdb_registration_approval_track hdb_registration_approval_track_registration_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_registration_approval_track
    ADD CONSTRAINT hdb_registration_approval_track_registration_id_fkey FOREIGN KEY (registration_id) REFERENCES public.hdb_program_registration(id);


--
-- Name: hdb_registration_approval_track hdb_registration_approval_track_updated_by_fkey; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_registration_approval_track
    ADD CONSTRAINT hdb_registration_approval_track_updated_by_fkey FOREIGN KEY (updated_by) REFERENCES public.users(id) ON DELETE SET NULL;


--
-- Name: hdb_registration_payment_details_history hdb_registration_payment_details_histor_payment_details_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_registration_payment_details_history
    ADD CONSTRAINT hdb_registration_payment_details_histor_payment_details_id_fkey FOREIGN KEY (payment_details_id) REFERENCES public.hdb_registration_payment_detail(id);


--
-- Name: hdb_swap_requested_program hdb_swap_requested_program_created_by_fkey; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_swap_requested_program
    ADD CONSTRAINT hdb_swap_requested_program_created_by_fkey FOREIGN KEY (created_by) REFERENCES public.users(id);


--
-- Name: hdb_swap_requested_program hdb_swap_requested_program_program_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_swap_requested_program
    ADD CONSTRAINT hdb_swap_requested_program_program_id_fkey FOREIGN KEY (program_id) REFERENCES public.program_v1(id);


--
-- Name: hdb_swap_requested_program hdb_swap_requested_program_swap_request_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_swap_requested_program
    ADD CONSTRAINT hdb_swap_requested_program_swap_request_id_fkey FOREIGN KEY (swap_request_id) REFERENCES public.hdb_program_registration_swap(id);


--
-- Name: hdb_swap_requested_program hdb_swap_requested_program_updated_by_fkey; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.hdb_swap_requested_program
    ADD CONSTRAINT hdb_swap_requested_program_updated_by_fkey FOREIGN KEY (updated_by) REFERENCES public.users(id);


--
-- Name: infini_message_group_mapping infini_message_group_mapping_group_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.infini_message_group_mapping
    ADD CONSTRAINT infini_message_group_mapping_group_id_fkey FOREIGN KEY (group_id) REFERENCES public.groups(id);


--
-- Name: infini_message_group_mapping infini_message_group_mapping_message_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.infini_message_group_mapping
    ADD CONSTRAINT infini_message_group_mapping_message_id_fkey FOREIGN KEY (message_id) REFERENCES public.infini_messages(id);


--
-- Name: infini_message_user_approval infini_message_user_approval_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.infini_message_user_approval
    ADD CONSTRAINT infini_message_user_approval_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.users(id);


--
-- Name: infini_message_user_fcm_mapping infini_message_user_fcm_mapping_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.infini_message_user_fcm_mapping
    ADD CONSTRAINT infini_message_user_fcm_mapping_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.users(phone_number);


--
-- Name: infini_message_user_group_mapping infini_message_user_group_mapping_created_by_fkey; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.infini_message_user_group_mapping
    ADD CONSTRAINT infini_message_user_group_mapping_created_by_fkey FOREIGN KEY (created_by) REFERENCES public.users(id);


--
-- Name: infini_message_user_group_mapping infini_message_user_group_mapping_group_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.infini_message_user_group_mapping
    ADD CONSTRAINT infini_message_user_group_mapping_group_id_fkey FOREIGN KEY (group_id) REFERENCES public.groups(id);


--
-- Name: infini_message_user_group_mapping infini_message_user_group_mapping_updated_by_fkey; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.infini_message_user_group_mapping
    ADD CONSTRAINT infini_message_user_group_mapping_updated_by_fkey FOREIGN KEY (updated_by) REFERENCES public.users(id);


--
-- Name: infini_message_user_group_mapping infini_message_user_group_mapping_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.infini_message_user_group_mapping
    ADD CONSTRAINT infini_message_user_group_mapping_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.users(id);


--
-- Name: infini_path_bulk_registration infini_path_bulk_registration_created_by_fkey; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.infini_path_bulk_registration
    ADD CONSTRAINT infini_path_bulk_registration_created_by_fkey FOREIGN KEY (created_by) REFERENCES public.users(id);


--
-- Name: infini_path_meeting infini_path_meeting_created_by_fkey; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.infini_path_meeting
    ADD CONSTRAINT infini_path_meeting_created_by_fkey FOREIGN KEY (created_by) REFERENCES public.users(id);


--
-- Name: infini_path_meeting_member infini_path_meeting_member_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.infini_path_meeting_member
    ADD CONSTRAINT infini_path_meeting_member_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.users(id);


--
-- Name: infini_path_meeting infini_path_meeting_started_by_fkey; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.infini_path_meeting
    ADD CONSTRAINT infini_path_meeting_started_by_fkey FOREIGN KEY (started_by) REFERENCES public.users(id);


--
-- Name: infini_path_member infini_path_member_member_related_with_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.infini_path_member
    ADD CONSTRAINT infini_path_member_member_related_with_user_id_fkey FOREIGN KEY (member_related_with_user_id) REFERENCES public.users(id);


--
-- Name: infini_path_member infini_path_member_member_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.infini_path_member
    ADD CONSTRAINT infini_path_member_member_user_id_fkey FOREIGN KEY (member_user_id) REFERENCES public.users(id);


--
-- Name: infini_path_user_meeting infini_path_user_meeting_infini_path_meeting_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.infini_path_user_meeting
    ADD CONSTRAINT infini_path_user_meeting_infini_path_meeting_id_fkey FOREIGN KEY (infini_path_meeting_id) REFERENCES public.infini_path_meeting(id);


--
-- Name: program_attendance program_attendance_program_occurrence_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.program_attendance
    ADD CONSTRAINT program_attendance_program_occurrence_id_fkey FOREIGN KEY (program_occurrence_id) REFERENCES public.program_occurrence(program_occurrence_id);


--
-- Name: program_attendance program_attendance_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.program_attendance
    ADD CONSTRAINT program_attendance_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.users(id);


--
-- Name: program_message program_message_cc_role_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.program_message
    ADD CONSTRAINT program_message_cc_role_id_fkey FOREIGN KEY (cc_role_id) REFERENCES public.user_role(id);


--
-- Name: program_message program_message_program_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.program_message
    ADD CONSTRAINT program_message_program_id_fkey FOREIGN KEY (program_id) REFERENCES public.program_v1(id);


--
-- Name: program_message program_message_receiver_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.program_message
    ADD CONSTRAINT program_message_receiver_id_fkey FOREIGN KEY (receiver_id) REFERENCES public.users(id);


--
-- Name: program_message program_message_seeker_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.program_message
    ADD CONSTRAINT program_message_seeker_id_fkey FOREIGN KEY (seeker_id) REFERENCES public.users(id);


--
-- Name: program_message program_message_sender_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.program_message
    ADD CONSTRAINT program_message_sender_id_fkey FOREIGN KEY (sender_id) REFERENCES public.users(id);


--
-- Name: program_occurrence program_occurrence_program_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.program_occurrence
    ADD CONSTRAINT program_occurrence_program_id_fkey FOREIGN KEY (program_id) REFERENCES public.program(program_id);


--
-- Name: program program_program_type_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.program
    ADD CONSTRAINT program_program_type_id_fkey FOREIGN KEY (program_type_id) REFERENCES public.program_type(program_type_id);


--
-- Name: report_status report_status_program_session_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.report_status
    ADD CONSTRAINT report_status_program_session_id_fkey FOREIGN KEY (program_session_id) REFERENCES public.program_session(id);


--
-- Name: report_status report_status_status_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.report_status
    ADD CONSTRAINT report_status_status_id_fkey FOREIGN KEY (status_id) REFERENCES public.report_status_type(id);


--
-- Name: report_status_transaction report_status_transaction_new_status_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.report_status_transaction
    ADD CONSTRAINT report_status_transaction_new_status_id_fkey FOREIGN KEY (new_status_id) REFERENCES public.report_status_type(id);


--
-- Name: report_status_transaction report_status_transaction_previous_status_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.report_status_transaction
    ADD CONSTRAINT report_status_transaction_previous_status_id_fkey FOREIGN KEY (previous_status_id) REFERENCES public.report_status_type(id);


--
-- Name: report_status_transaction report_status_transaction_report_status_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.report_status_transaction
    ADD CONSTRAINT report_status_transaction_report_status_id_fkey FOREIGN KEY (report_status_id) REFERENCES public.report_status(id);


--
-- Name: scheduler_times scheduler_times_scheduler_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.scheduler_times
    ADD CONSTRAINT scheduler_times_scheduler_id_fkey FOREIGN KEY (scheduler_id) REFERENCES public.schedulers(scheduler_id) ON UPDATE CASCADE ON DELETE CASCADE;


--
-- Name: scheduler_trackers scheduler_trackers_scheduler_time_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.scheduler_trackers
    ADD CONSTRAINT scheduler_trackers_scheduler_time_id_fkey FOREIGN KEY (scheduler_time_id) REFERENCES public.scheduler_times(scheduler_time_id) ON UPDATE CASCADE ON DELETE CASCADE;


--
-- Name: seeker_defaulter seeker_defaulter_created_by_fkey; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.seeker_defaulter
    ADD CONSTRAINT seeker_defaulter_created_by_fkey FOREIGN KEY (created_by) REFERENCES public.users(id);


--
-- Name: seeker_defaulter seeker_defaulter_registration_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.seeker_defaulter
    ADD CONSTRAINT seeker_defaulter_registration_id_fkey FOREIGN KEY (registration_id) REFERENCES public.hdb_program_registration(id);


--
-- Name: seeker_defaulter_track seeker_defaulter_track_performed_by_fkey; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.seeker_defaulter_track
    ADD CONSTRAINT seeker_defaulter_track_performed_by_fkey FOREIGN KEY (performed_by) REFERENCES public.users(id);


--
-- Name: seeker_defaulter_track seeker_defaulter_track_registration_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.seeker_defaulter_track
    ADD CONSTRAINT seeker_defaulter_track_registration_id_fkey FOREIGN KEY (registration_id) REFERENCES public.hdb_program_registration(id);


--
-- Name: seeker_defaulter_track seeker_defaulter_track_seeker_defaulter_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.seeker_defaulter_track
    ADD CONSTRAINT seeker_defaulter_track_seeker_defaulter_id_fkey FOREIGN KEY (seeker_defaulter_id) REFERENCES public.seeker_defaulter(id);


--
-- Name: seeker_defaulter_track seeker_defaulter_track_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.seeker_defaulter_track
    ADD CONSTRAINT seeker_defaulter_track_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.users(id);


--
-- Name: seeker_defaulter seeker_defaulter_updated_by_fkey; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.seeker_defaulter
    ADD CONSTRAINT seeker_defaulter_updated_by_fkey FOREIGN KEY (updated_by) REFERENCES public.users(id);


--
-- Name: seeker_defaulter seeker_defaulter_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.seeker_defaulter
    ADD CONSTRAINT seeker_defaulter_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.users(id);


--
-- Name: seeker_program_experience seeker_program_experience_created_by_fkey; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.seeker_program_experience
    ADD CONSTRAINT seeker_program_experience_created_by_fkey FOREIGN KEY (created_by) REFERENCES public.users(id) ON DELETE SET NULL;


--
-- Name: seeker_program_experience seeker_program_experience_deleted_by_fkey; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.seeker_program_experience
    ADD CONSTRAINT seeker_program_experience_deleted_by_fkey FOREIGN KEY (deleted_by) REFERENCES public.users(id) ON DELETE SET NULL;


--
-- Name: seeker_program_experience seeker_program_experience_registration_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.seeker_program_experience
    ADD CONSTRAINT seeker_program_experience_registration_id_fkey FOREIGN KEY (registration_id) REFERENCES public.hdb_program_registration(id) ON DELETE SET NULL;


--
-- Name: seeker_program_experience seeker_program_experience_updated_by_fkey; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.seeker_program_experience
    ADD CONSTRAINT seeker_program_experience_updated_by_fkey FOREIGN KEY (updated_by) REFERENCES public.users(id) ON DELETE SET NULL;


--
-- Name: seeker_program_experience seeker_program_experience_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.seeker_program_experience
    ADD CONSTRAINT seeker_program_experience_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.users(id) ON DELETE SET NULL;


--
-- Name: user_application_subscription_log user_application_subscription_log_application_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.user_application_subscription_log
    ADD CONSTRAINT user_application_subscription_log_application_id_fkey FOREIGN KEY (application_id) REFERENCES public.infinitheism_application(id);


--
-- Name: user_application_subscription_log user_application_subscription_log_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.user_application_subscription_log
    ADD CONSTRAINT user_application_subscription_log_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.users(id);


--
-- Name: user_application_subscription_status user_application_subscription_status_application_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.user_application_subscription_status
    ADD CONSTRAINT user_application_subscription_status_application_id_fkey FOREIGN KEY (application_id) REFERENCES public.infinitheism_application(id);


--
-- Name: user_application_subscription_status user_application_subscription_status_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.user_application_subscription_status
    ADD CONSTRAINT user_application_subscription_status_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.users(id);


--
-- Name: user_profile_extension user_profile_extension_infinitheism_contact_fkey; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.user_profile_extension
    ADD CONSTRAINT user_profile_extension_infinitheism_contact_fkey FOREIGN KEY (infinitheism_contact) REFERENCES public.users(id);


--
-- Name: user_relationship user_relationship_relation_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.user_relationship
    ADD CONSTRAINT user_relationship_relation_id_fkey FOREIGN KEY (relation_id) REFERENCES public.relation(id) ON DELETE CASCADE;


--
-- Name: user_role_map user_role_map_role_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.user_role_map
    ADD CONSTRAINT user_role_map_role_id_fkey FOREIGN KEY (role_id) REFERENCES public.user_role(id) ON DELETE CASCADE;


--
-- Name: user_role_map user_role_map_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.user_role_map
    ADD CONSTRAINT user_role_map_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.users(id) ON DELETE CASCADE;


--
-- Name: webinar_user_actions_log webinar_user_actions_log_action_performed_by_fkey; Type: FK CONSTRAINT; Schema: public; Owner: infini_automation_deploy
--

ALTER TABLE ONLY public.webinar_user_actions_log
    ADD CONSTRAINT webinar_user_actions_log_action_performed_by_fkey FOREIGN KEY (action_performed_by) REFERENCES public.users(id);


--
-- Name: SCHEMA public; Type: ACL; Schema: -; Owner: pg_database_owner
--

GRANT USAGE ON SCHEMA public TO infini_portal_automation_support_team;


--
-- Name: TABLE assets; Type: ACL; Schema: public; Owner: infini_automation_deploy
--

GRANT SELECT ON TABLE public.assets TO infini_portal_automation_support_team;


--
-- Name: TABLE audit_history_log; Type: ACL; Schema: public; Owner: infini_automation_deploy
--

GRANT SELECT ON TABLE public.audit_history_log TO infini_portal_automation_support_team;


--
-- Name: TABLE audit_history_log_detail; Type: ACL; Schema: public; Owner: infini_automation_deploy
--

GRANT SELECT ON TABLE public.audit_history_log_detail TO infini_portal_automation_support_team;


--
-- Name: TABLE block; Type: ACL; Schema: public; Owner: infini_automation_deploy
--

GRANT SELECT ON TABLE public.block TO infini_portal_automation_support_team;


--
-- Name: TABLE configuration; Type: ACL; Schema: public; Owner: infini_automation_deploy
--

GRANT SELECT ON TABLE public.configuration TO infini_portal_automation_support_team;


--
-- Name: TABLE feature_flag; Type: ACL; Schema: public; Owner: infini_automation_deploy
--

GRANT SELECT ON TABLE public.feature_flag TO infini_portal_automation_support_team;


--
-- Name: TABLE floor; Type: ACL; Schema: public; Owner: infini_automation_deploy
--

GRANT SELECT ON TABLE public.floor TO infini_portal_automation_support_team;


--
-- Name: TABLE groups; Type: ACL; Schema: public; Owner: infini_automation_deploy
--

GRANT SELECT ON TABLE public.groups TO infini_portal_automation_support_team;


--
-- Name: TABLE hdb_address; Type: ACL; Schema: public; Owner: infini_automation_deploy
--

GRANT SELECT ON TABLE public.hdb_address TO infini_portal_automation_support_team;


--
-- Name: TABLE hdb_cancellation_reason; Type: ACL; Schema: public; Owner: infini_automation_deploy
--

GRANT SELECT ON TABLE public.hdb_cancellation_reason TO infini_portal_automation_support_team;


--
-- Name: TABLE hdb_communication_templates; Type: ACL; Schema: public; Owner: infini_automation_deploy
--

GRANT SELECT ON TABLE public.hdb_communication_templates TO infini_portal_automation_support_team;


--
-- Name: TABLE hdb_communication_track; Type: ACL; Schema: public; Owner: infini_automation_deploy
--

GRANT SELECT ON TABLE public.hdb_communication_track TO infini_portal_automation_support_team;


--
-- Name: TABLE hdb_form_section; Type: ACL; Schema: public; Owner: infini_automation_deploy
--

GRANT SELECT ON TABLE public.hdb_form_section TO infini_portal_automation_support_team;


--
-- Name: TABLE hdb_option; Type: ACL; Schema: public; Owner: infini_automation_deploy
--

GRANT SELECT ON TABLE public.hdb_option TO infini_portal_automation_support_team;


--
-- Name: TABLE hdb_option_category; Type: ACL; Schema: public; Owner: infini_automation_deploy
--

GRANT SELECT ON TABLE public.hdb_option_category TO infini_portal_automation_support_team;


--
-- Name: TABLE hdb_payment_change_request; Type: ACL; Schema: public; Owner: infini_automation_deploy
--

GRANT SELECT ON TABLE public.hdb_payment_change_request TO infini_portal_automation_support_team;


--
-- Name: TABLE hdb_preference; Type: ACL; Schema: public; Owner: infini_automation_deploy
--

GRANT SELECT ON TABLE public.hdb_preference TO infini_portal_automation_support_team;


--
-- Name: TABLE hdb_program_question; Type: ACL; Schema: public; Owner: infini_automation_deploy
--

GRANT SELECT ON TABLE public.hdb_program_question TO infini_portal_automation_support_team;


--
-- Name: TABLE hdb_program_registration; Type: ACL; Schema: public; Owner: infini_automation_deploy
--

GRANT SELECT ON TABLE public.hdb_program_registration TO infini_portal_automation_support_team;


--
-- Name: TABLE hdb_program_registration_goodies; Type: ACL; Schema: public; Owner: infini_automation_deploy
--

GRANT SELECT ON TABLE public.hdb_program_registration_goodies TO infini_portal_automation_support_team;


--
-- Name: TABLE hdb_program_registration_recommendations; Type: ACL; Schema: public; Owner: infini_automation_deploy
--

GRANT SELECT ON TABLE public.hdb_program_registration_recommendations TO infini_portal_automation_support_team;


--
-- Name: TABLE hdb_program_registration_rm_rating; Type: ACL; Schema: public; Owner: infini_automation_deploy
--

GRANT SELECT ON TABLE public.hdb_program_registration_rm_rating TO infini_portal_automation_support_team;


--
-- Name: TABLE hdb_program_registration_rm_rating_type; Type: ACL; Schema: public; Owner: infini_automation_deploy
--

GRANT SELECT ON TABLE public.hdb_program_registration_rm_rating_type TO infini_portal_automation_support_team;


--
-- Name: TABLE hdb_program_registration_swap; Type: ACL; Schema: public; Owner: infini_automation_deploy
--

GRANT SELECT ON TABLE public.hdb_program_registration_swap TO infini_portal_automation_support_team;


--
-- Name: TABLE hdb_question; Type: ACL; Schema: public; Owner: infini_automation_deploy
--

GRANT SELECT ON TABLE public.hdb_question TO infini_portal_automation_support_team;


--
-- Name: TABLE hdb_question_option_map; Type: ACL; Schema: public; Owner: infini_automation_deploy
--

GRANT SELECT ON TABLE public.hdb_question_option_map TO infini_portal_automation_support_team;


--
-- Name: TABLE hdb_registration_approval; Type: ACL; Schema: public; Owner: infini_automation_deploy
--

GRANT SELECT ON TABLE public.hdb_registration_approval TO infini_portal_automation_support_team;


--
-- Name: TABLE hdb_registration_approval_track; Type: ACL; Schema: public; Owner: infini_automation_deploy
--

GRANT SELECT ON TABLE public.hdb_registration_approval_track TO infini_portal_automation_support_team;


--
-- Name: TABLE hdb_registration_custom_response; Type: ACL; Schema: public; Owner: infini_automation_deploy
--

GRANT SELECT ON TABLE public.hdb_registration_custom_response TO infini_portal_automation_support_team;


--
-- Name: TABLE hdb_registration_invoice_basic_history; Type: ACL; Schema: public; Owner: infini_automation_deploy
--

GRANT SELECT ON TABLE public.hdb_registration_invoice_basic_history TO infini_portal_automation_support_team;


--
-- Name: TABLE hdb_registration_invoice_detail; Type: ACL; Schema: public; Owner: infini_automation_deploy
--

GRANT SELECT ON TABLE public.hdb_registration_invoice_detail TO infini_portal_automation_support_team;


--
-- Name: TABLE hdb_registration_invoice_einvoice_history; Type: ACL; Schema: public; Owner: infini_automation_deploy
--

GRANT SELECT ON TABLE public.hdb_registration_invoice_einvoice_history TO infini_portal_automation_support_team;


--
-- Name: TABLE hdb_registration_payment_detail; Type: ACL; Schema: public; Owner: infini_automation_deploy
--

GRANT SELECT ON TABLE public.hdb_registration_payment_detail TO infini_portal_automation_support_team;


--
-- Name: TABLE hdb_registration_payment_details_history; Type: ACL; Schema: public; Owner: infini_automation_deploy
--

GRANT SELECT ON TABLE public.hdb_registration_payment_details_history TO infini_portal_automation_support_team;


--
-- Name: TABLE hdb_registration_question_answer; Type: ACL; Schema: public; Owner: infini_automation_deploy
--

GRANT SELECT ON TABLE public.hdb_registration_question_answer TO infini_portal_automation_support_team;


--
-- Name: TABLE hdb_registration_travel_info; Type: ACL; Schema: public; Owner: infini_automation_deploy
--

GRANT SELECT ON TABLE public.hdb_registration_travel_info TO infini_portal_automation_support_team;


--
-- Name: TABLE hdb_registration_travel_plan; Type: ACL; Schema: public; Owner: infini_automation_deploy
--

GRANT SELECT ON TABLE public.hdb_registration_travel_plan TO infini_portal_automation_support_team;


--
-- Name: TABLE hdb_swap_requested_program; Type: ACL; Schema: public; Owner: infini_automation_deploy
--

GRANT SELECT ON TABLE public.hdb_swap_requested_program TO infini_portal_automation_support_team;


--
-- Name: TABLE id_proof_export_jobs; Type: ACL; Schema: public; Owner: infini_automation_deploy
--

GRANT SELECT ON TABLE public.id_proof_export_jobs TO infini_portal_automation_support_team;


--
-- Name: TABLE infini_message_group_mapping; Type: ACL; Schema: public; Owner: infini_automation_deploy
--

GRANT SELECT ON TABLE public.infini_message_group_mapping TO infini_portal_automation_support_team;


--
-- Name: TABLE infini_message_track; Type: ACL; Schema: public; Owner: infini_automation_deploy
--

GRANT SELECT ON TABLE public.infini_message_track TO infini_portal_automation_support_team;


--
-- Name: TABLE infini_message_user_approval; Type: ACL; Schema: public; Owner: infini_automation_deploy
--

GRANT SELECT ON TABLE public.infini_message_user_approval TO infini_portal_automation_support_team;


--
-- Name: TABLE infini_message_user_fcm_mapping; Type: ACL; Schema: public; Owner: infini_automation_deploy
--

GRANT SELECT ON TABLE public.infini_message_user_fcm_mapping TO infini_portal_automation_support_team;


--
-- Name: TABLE infini_message_user_group_mapping; Type: ACL; Schema: public; Owner: infini_automation_deploy
--

GRANT SELECT ON TABLE public.infini_message_user_group_mapping TO infini_portal_automation_support_team;


--
-- Name: TABLE infini_messages; Type: ACL; Schema: public; Owner: infini_automation_deploy
--

GRANT SELECT ON TABLE public.infini_messages TO infini_portal_automation_support_team;


--
-- Name: TABLE infini_path_bulk_registration; Type: ACL; Schema: public; Owner: infini_automation_deploy
--

GRANT SELECT ON TABLE public.infini_path_bulk_registration TO infini_portal_automation_support_team;


--
-- Name: TABLE infini_path_meeting; Type: ACL; Schema: public; Owner: infini_automation_deploy
--

GRANT SELECT ON TABLE public.infini_path_meeting TO infini_portal_automation_support_team;


--
-- Name: TABLE infini_path_meeting_attendee; Type: ACL; Schema: public; Owner: infini_automation_deploy
--

GRANT SELECT ON TABLE public.infini_path_meeting_attendee TO infini_portal_automation_support_team;


--
-- Name: TABLE infini_path_meeting_member; Type: ACL; Schema: public; Owner: infini_automation_deploy
--

GRANT SELECT ON TABLE public.infini_path_meeting_member TO infini_portal_automation_support_team;


--
-- Name: TABLE infini_path_member; Type: ACL; Schema: public; Owner: infini_automation_deploy
--

GRANT SELECT ON TABLE public.infini_path_member TO infini_portal_automation_support_team;


--
-- Name: TABLE infini_path_profile_image; Type: ACL; Schema: public; Owner: infini_automation_deploy
--

GRANT SELECT ON TABLE public.infini_path_profile_image TO infini_portal_automation_support_team;


--
-- Name: TABLE infini_path_user_meeting; Type: ACL; Schema: public; Owner: infini_automation_deploy
--

GRANT SELECT ON TABLE public.infini_path_user_meeting TO infini_portal_automation_support_team;


--
-- Name: TABLE infini_tags; Type: ACL; Schema: public; Owner: infini_automation_deploy
--

GRANT SELECT ON TABLE public.infini_tags TO infini_portal_automation_support_team;


--
-- Name: TABLE infiniminute_messages; Type: ACL; Schema: public; Owner: infini_automation_deploy
--

GRANT SELECT ON TABLE public.infiniminute_messages TO infini_portal_automation_support_team;


--
-- Name: TABLE infinitheism_application; Type: ACL; Schema: public; Owner: infini_automation_deploy
--

GRANT SELECT ON TABLE public.infinitheism_application TO infini_portal_automation_support_team;


--
-- Name: TABLE lookup_data; Type: ACL; Schema: public; Owner: infini_automation_deploy
--

GRANT SELECT ON TABLE public.lookup_data TO infini_portal_automation_support_team;


--
-- Name: TABLE portal_scheduler_logs; Type: ACL; Schema: public; Owner: infini_automation_deploy
--

GRANT SELECT ON TABLE public.portal_scheduler_logs TO infini_portal_automation_support_team;


--
-- Name: TABLE program; Type: ACL; Schema: public; Owner: infini_automation_deploy
--

GRANT SELECT ON TABLE public.program TO infini_portal_automation_support_team;


--
-- Name: TABLE program_attendance; Type: ACL; Schema: public; Owner: infini_automation_deploy
--

GRANT SELECT ON TABLE public.program_attendance TO infini_portal_automation_support_team;


--
-- Name: TABLE program_message; Type: ACL; Schema: public; Owner: infini_automation_deploy
--

GRANT SELECT ON TABLE public.program_message TO infini_portal_automation_support_team;


--
-- Name: TABLE program_occurrence; Type: ACL; Schema: public; Owner: infini_automation_deploy
--

GRANT SELECT ON TABLE public.program_occurrence TO infini_portal_automation_support_team;


--
-- Name: TABLE program_registration_failures; Type: ACL; Schema: public; Owner: infini_automation_deploy
--

GRANT SELECT ON TABLE public.program_registration_failures TO infini_portal_automation_support_team;


--
-- Name: TABLE program_room_inventory_map; Type: ACL; Schema: public; Owner: infini_automation_deploy
--

GRANT SELECT ON TABLE public.program_room_inventory_map TO infini_portal_automation_support_team;


--
-- Name: TABLE program_session; Type: ACL; Schema: public; Owner: infini_automation_deploy
--

GRANT SELECT ON TABLE public.program_session TO infini_portal_automation_support_team;


--
-- Name: TABLE program_type; Type: ACL; Schema: public; Owner: infini_automation_deploy
--

GRANT SELECT ON TABLE public.program_type TO infini_portal_automation_support_team;


--
-- Name: TABLE program_type_v1; Type: ACL; Schema: public; Owner: infini_automation_deploy
--

GRANT SELECT ON TABLE public.program_type_v1 TO infini_portal_automation_support_team;


--
-- Name: TABLE program_v1; Type: ACL; Schema: public; Owner: infini_automation_deploy
--

GRANT SELECT ON TABLE public.program_v1 TO infini_portal_automation_support_team;


--
-- Name: TABLE registration_group; Type: ACL; Schema: public; Owner: infini_automation_deploy
--

GRANT SELECT ON TABLE public.registration_group TO infini_portal_automation_support_team;


--
-- Name: TABLE registration_group_map; Type: ACL; Schema: public; Owner: infini_automation_deploy
--

GRANT SELECT ON TABLE public.registration_group_map TO infini_portal_automation_support_team;


--
-- Name: TABLE registration_pair; Type: ACL; Schema: public; Owner: infini_automation_deploy
--

GRANT SELECT ON TABLE public.registration_pair TO infini_portal_automation_support_team;


--
-- Name: TABLE registration_pair_map; Type: ACL; Schema: public; Owner: infini_automation_deploy
--

GRANT SELECT ON TABLE public.registration_pair_map TO infini_portal_automation_support_team;


--
-- Name: TABLE relation; Type: ACL; Schema: public; Owner: infini_automation_deploy
--

GRANT SELECT ON TABLE public.relation TO infini_portal_automation_support_team;


--
-- Name: TABLE report_status; Type: ACL; Schema: public; Owner: infini_automation_deploy
--

GRANT SELECT ON TABLE public.report_status TO infini_portal_automation_support_team;


--
-- Name: TABLE report_status_transaction; Type: ACL; Schema: public; Owner: infini_automation_deploy
--

GRANT SELECT ON TABLE public.report_status_transaction TO infini_portal_automation_support_team;


--
-- Name: TABLE report_status_type; Type: ACL; Schema: public; Owner: infini_automation_deploy
--

GRANT SELECT ON TABLE public.report_status_type TO infini_portal_automation_support_team;


--
-- Name: TABLE room; Type: ACL; Schema: public; Owner: infini_automation_deploy
--

GRANT SELECT ON TABLE public.room TO infini_portal_automation_support_team;


--
-- Name: TABLE room_allocation; Type: ACL; Schema: public; Owner: infini_automation_deploy
--

GRANT SELECT ON TABLE public.room_allocation TO infini_portal_automation_support_team;


--
-- Name: TABLE room_allocation_history; Type: ACL; Schema: public; Owner: infini_automation_deploy
--

GRANT SELECT ON TABLE public.room_allocation_history TO infini_portal_automation_support_team;


--
-- Name: TABLE scheduler_times; Type: ACL; Schema: public; Owner: infini_automation_deploy
--

GRANT SELECT ON TABLE public.scheduler_times TO infini_portal_automation_support_team;


--
-- Name: TABLE scheduler_trackers; Type: ACL; Schema: public; Owner: infini_automation_deploy
--

GRANT SELECT ON TABLE public.scheduler_trackers TO infini_portal_automation_support_team;


--
-- Name: TABLE schedulers; Type: ACL; Schema: public; Owner: infini_automation_deploy
--

GRANT SELECT ON TABLE public.schedulers TO infini_portal_automation_support_team;


--
-- Name: TABLE seeker_defaulter; Type: ACL; Schema: public; Owner: infini_automation_deploy
--

GRANT SELECT ON TABLE public.seeker_defaulter TO infini_portal_automation_support_team;


--
-- Name: TABLE seeker_defaulter_track; Type: ACL; Schema: public; Owner: infini_automation_deploy
--

GRANT SELECT ON TABLE public.seeker_defaulter_track TO infini_portal_automation_support_team;


--
-- Name: TABLE seeker_program_experience; Type: ACL; Schema: public; Owner: infini_automation_deploy
--

GRANT SELECT ON TABLE public.seeker_program_experience TO infini_portal_automation_support_team;


--
-- Name: TABLE temp_mesg_183; Type: ACL; Schema: public; Owner: infini_automation_deploy
--

GRANT SELECT ON TABLE public.temp_mesg_183 TO infini_portal_automation_support_team;


--
-- Name: TABLE user_application_subscription_log; Type: ACL; Schema: public; Owner: infini_automation_deploy
--

GRANT SELECT ON TABLE public.user_application_subscription_log TO infini_portal_automation_support_team;


--
-- Name: TABLE user_application_subscription_status; Type: ACL; Schema: public; Owner: infini_automation_deploy
--

GRANT SELECT ON TABLE public.user_application_subscription_status TO infini_portal_automation_support_team;


--
-- Name: TABLE user_device_information; Type: ACL; Schema: public; Owner: infini_automation_deploy
--

GRANT SELECT ON TABLE public.user_device_information TO infini_portal_automation_support_team;


--
-- Name: TABLE user_device_information_bkp_20241112; Type: ACL; Schema: public; Owner: infini_automation_deploy
--

GRANT SELECT ON TABLE public.user_device_information_bkp_20241112 TO infini_portal_automation_support_team;


--
-- Name: TABLE user_participation_summary; Type: ACL; Schema: public; Owner: infini_automation_deploy
--

GRANT SELECT ON TABLE public.user_participation_summary TO infini_portal_automation_support_team;


--
-- Name: TABLE user_profile_extension; Type: ACL; Schema: public; Owner: infini_automation_deploy
--

GRANT SELECT ON TABLE public.user_profile_extension TO infini_portal_automation_support_team;


--
-- Name: TABLE user_program_experience; Type: ACL; Schema: public; Owner: infini_automation_deploy
--

GRANT SELECT ON TABLE public.user_program_experience TO infini_portal_automation_support_team;


--
-- Name: TABLE user_registration_map; Type: ACL; Schema: public; Owner: infini_automation_deploy
--

GRANT SELECT ON TABLE public.user_registration_map TO infini_portal_automation_support_team;


--
-- Name: TABLE user_relationship; Type: ACL; Schema: public; Owner: infini_automation_deploy
--

GRANT SELECT ON TABLE public.user_relationship TO infini_portal_automation_support_team;


--
-- Name: TABLE user_role; Type: ACL; Schema: public; Owner: infini_automation_deploy
--

GRANT SELECT ON TABLE public.user_role TO infini_portal_automation_support_team;


--
-- Name: TABLE user_role_map; Type: ACL; Schema: public; Owner: infini_automation_deploy
--

GRANT SELECT ON TABLE public.user_role_map TO infini_portal_automation_support_team;


--
-- Name: TABLE user_session; Type: ACL; Schema: public; Owner: infini_automation_deploy
--

GRANT SELECT ON TABLE public.user_session TO infini_portal_automation_support_team;


--
-- Name: TABLE user_temps; Type: ACL; Schema: public; Owner: infini_automation_deploy
--

GRANT SELECT ON TABLE public.user_temps TO infini_portal_automation_support_team;


--
-- Name: TABLE users; Type: ACL; Schema: public; Owner: infini_automation_deploy
--

GRANT SELECT ON TABLE public.users TO infini_portal_automation_support_team;


--
-- Name: TABLE users_transactions_history; Type: ACL; Schema: public; Owner: infini_automation_deploy
--

GRANT SELECT ON TABLE public.users_transactions_history TO infini_portal_automation_support_team;


--
-- Name: TABLE venue; Type: ACL; Schema: public; Owner: infini_automation_deploy
--

GRANT SELECT ON TABLE public.venue TO infini_portal_automation_support_team;


--
-- Name: TABLE webinar; Type: ACL; Schema: public; Owner: infini_automation_deploy
--

GRANT SELECT ON TABLE public.webinar TO infini_portal_automation_support_team;


--
-- Name: TABLE webinar_absentees; Type: ACL; Schema: public; Owner: infini_automation_deploy
--

GRANT SELECT ON TABLE public.webinar_absentees TO infini_portal_automation_support_team;


--
-- Name: TABLE webinar_analytics; Type: ACL; Schema: public; Owner: infini_automation_deploy
--

GRANT SELECT ON TABLE public.webinar_analytics TO infini_portal_automation_support_team;


--
-- Name: TABLE webinar_attendee; Type: ACL; Schema: public; Owner: infini_automation_deploy
--

GRANT SELECT ON TABLE public.webinar_attendee TO infini_portal_automation_support_team;


--
-- Name: TABLE webinar_participants; Type: ACL; Schema: public; Owner: infini_automation_deploy
--

GRANT SELECT ON TABLE public.webinar_participants TO infini_portal_automation_support_team;


--
-- Name: TABLE webinar_registrants; Type: ACL; Schema: public; Owner: infini_automation_deploy
--

GRANT SELECT ON TABLE public.webinar_registrants TO infini_portal_automation_support_team;


--
-- Name: TABLE webinar_registration; Type: ACL; Schema: public; Owner: infini_automation_deploy
--

GRANT SELECT ON TABLE public.webinar_registration TO infini_portal_automation_support_team;


--
-- Name: TABLE webinar_registration_transaction; Type: ACL; Schema: public; Owner: infini_automation_deploy
--

GRANT SELECT ON TABLE public.webinar_registration_transaction TO infini_portal_automation_support_team;


--
-- Name: TABLE webinar_user_actions_log; Type: ACL; Schema: public; Owner: infini_automation_deploy
--

GRANT SELECT ON TABLE public.webinar_user_actions_log TO infini_portal_automation_support_team;


--
-- Name: TABLE zz_backup_20250718_post_migration_users; Type: ACL; Schema: public; Owner: infini_automation_deploy
--

GRANT SELECT ON TABLE public.zz_backup_20250718_post_migration_users TO infini_portal_automation_support_team;


--
-- Name: TABLE zz_backup_20250718_pre_migration_users; Type: ACL; Schema: public; Owner: infini_automation_deploy
--

GRANT SELECT ON TABLE public.zz_backup_20250718_pre_migration_users TO infini_portal_automation_support_team;


--
-- Name: TABLE zz_backup_20250720_1030_post_migration_users; Type: ACL; Schema: public; Owner: infini_automation_deploy
--

GRANT SELECT ON TABLE public.zz_backup_20250720_1030_post_migration_users TO infini_portal_automation_support_team;


--
-- Name: TABLE zz_backup_20250720_1030_pre_migration_users; Type: ACL; Schema: public; Owner: infini_automation_deploy
--

GRANT SELECT ON TABLE public.zz_backup_20250720_1030_pre_migration_users TO infini_portal_automation_support_team;


--
-- Name: TABLE zz_backup_hdb_question_20250920; Type: ACL; Schema: public; Owner: infini_automation_deploy
--

GRANT SELECT ON TABLE public.zz_backup_hdb_question_20250920 TO infini_portal_automation_support_team;


--
-- Name: TABLE zz_load_tat_2025_data_20250902; Type: ACL; Schema: public; Owner: infini_automation_deploy
--

GRANT SELECT ON TABLE public.zz_load_tat_2025_data_20250902 TO infini_portal_automation_support_team;


--
-- Name: TABLE zz_load_tat_2025_data_20250902_clean; Type: ACL; Schema: public; Owner: infini_automation_deploy
--

GRANT SELECT ON TABLE public.zz_load_tat_2025_data_20250902_clean TO infini_portal_automation_support_team;


--
-- Name: TABLE zz_ref_20250714_hdb_info_asis_trimmed; Type: ACL; Schema: public; Owner: infini_automation_deploy
--

GRANT SELECT ON TABLE public.zz_ref_20250714_hdb_info_asis_trimmed TO infini_portal_automation_support_team;


--
-- Name: TABLE zz_ref_20250717_hdb_2021_2022_info_asis_trimmed; Type: ACL; Schema: public; Owner: infini_automation_deploy
--

GRANT SELECT ON TABLE public.zz_ref_20250717_hdb_2021_2022_info_asis_trimmed TO infini_portal_automation_support_team;


--
-- Name: TABLE zz_ref_20250717_hdb_2022_2023_info_asis_trimmed; Type: ACL; Schema: public; Owner: infini_automation_deploy
--

GRANT SELECT ON TABLE public.zz_ref_20250717_hdb_2022_2023_info_asis_trimmed TO infini_portal_automation_support_team;


--
-- Name: TABLE zz_ref_20250717_hdb_2023_2024_info_asis_trimmed; Type: ACL; Schema: public; Owner: infini_automation_deploy
--

GRANT SELECT ON TABLE public.zz_ref_20250717_hdb_2023_2024_info_asis_trimmed TO infini_portal_automation_support_team;


--
-- Name: TABLE zz_ref_20250920_hdb_2022_2023_info_asis_trimmed; Type: ACL; Schema: public; Owner: infini_automation_deploy
--

GRANT SELECT ON TABLE public.zz_ref_20250920_hdb_2022_2023_info_asis_trimmed TO infini_portal_automation_support_team;


--
-- Name: TABLE zz_ref_20250920_hdb_2023_2024_info_asis_trimmed; Type: ACL; Schema: public; Owner: infini_automation_deploy
--

GRANT SELECT ON TABLE public.zz_ref_20250920_hdb_2023_2024_info_asis_trimmed TO infini_portal_automation_support_team;


--
-- Name: TABLE zz_ref_ent_user_migration_v1; Type: ACL; Schema: public; Owner: infini_automation_deploy
--

GRANT SELECT ON TABLE public.zz_ref_ent_user_migration_v1 TO infini_portal_automation_support_team;


--
-- Name: TABLE zz_ref_entrainment_program_registration_info; Type: ACL; Schema: public; Owner: infini_automation_deploy
--

GRANT SELECT ON TABLE public.zz_ref_entrainment_program_registration_info TO infini_portal_automation_support_team;


--
-- Name: TABLE zz_ref_org_users_list; Type: ACL; Schema: public; Owner: infini_automation_deploy
--

GRANT SELECT ON TABLE public.zz_ref_org_users_list TO infini_portal_automation_support_team;


--
-- Name: TABLE zz_ref_temp_unified_hdb_info; Type: ACL; Schema: public; Owner: infini_automation_deploy
--

GRANT SELECT ON TABLE public.zz_ref_temp_unified_hdb_info TO infini_portal_automation_support_team;


--
-- Name: DEFAULT PRIVILEGES FOR TABLES; Type: DEFAULT ACL; Schema: public; Owner: infini_automation_deploy
--

ALTER DEFAULT PRIVILEGES FOR ROLE infini_automation_deploy IN SCHEMA public GRANT SELECT ON TABLES TO infini_portal_automation_support_team;


--
--


