= """ --\n -- PostgreSQL database dump\n --\n \n -- Dumped from database version 16.2\n -- Dumped by pg_dump version 16.2\n \n SET statement_timeout = 0;\n SET lock_timeout = 0;\n SET idle_in_transaction_session_timeout = 0;\n SET client_encoding = 'UTF8';\n SET standard_conforming_strings = on;\n SELECT pg_catalog.set_config('search_path', '', false);\n SET check_function_bodies = false;\n SET xmloption = content;\n SET client_min_messages = warning;\n SET row_security = off;\n \n --\n -- Name: invoice_log_action; Type: TYPE; Schema: public; Owner: -\n --\n \n CREATE TYPE public.invoice_log_action AS ENUM (\n  'created',\n  'updated',\n  'deleted'\n );\n \n \n --\n -- Name: order_status; Type: TYPE; Schema: public; Owner: -\n --\n \n CREATE TYPE public.order_status AS ENUM (\n  'pending',\n  'completed',\n  'cancelled',\n  'hold',\n  'moktob_amal'\n );\n \n \n --\n -- Name: payment_method_enum; Type: TYPE; Schema: public; Owner: -\n --\n \n CREATE TYPE public.payment_method_enum AS ENUM (\n  'cash_sr',\n  'al_rajhi',\n  'snb',\n  'stc',\n  'cash_tk',\n  'bank_bmt',\n  'ibbl_bmt',\n  'bkash_bmt'\n );\n \n \n --\n -- Name: transaction_type; Type: TYPE; Schema: public; Owner: -\n --\n \n CREATE TYPE public.transaction_type AS ENUM (\n  'agent_commission',\n  'customer_payment',\n  'due_collection',\n  'refund',\n  'service_charge_deduction'\n );\n \n \n --\n -- Name: user_role; Type: TYPE; Schema: public; Owner: -\n --\n \n CREATE TYPE public.user_role AS ENUM (\n  'super_admin',\n  'co_admin',\n  'branch_admin',\n  'staff'\n );\n \n \n --\n -- Name: voucher_type; Type: TYPE; Schema: public; Owner: -\n --\n \n CREATE TYPE public.voucher_type AS ENUM (\n  'debit',\n  'credit'\n );\n \n \n SET default_tablespace = '';\n \n SET default_table_access_method = heap;\n \n --\n -- Name: agents; Type: TABLE; Schema: public; Owner: -\n --\n \n CREATE TABLE public.agents (\n  id integer NOT NULL,\n  name text NOT NULL,\n  mobile_no text NOT NULL,\n  created_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP,\n  updated_at timestamp with time zone\n );\n \n \n --\n -- Name: agents_id_seq; Type: SEQUENCE; Schema: public; Owner: -\n --\n \n CREATE SEQUENCE public.agents_id_seq\n  AS integer\n  START WITH 1\n  INCREMENT BY 1\n  NO MINVALUE\n  NO MAXVALUE\n  CACHE 1;\n \n \n --\n -- Name: agents_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -\n --\n \n ALTER SEQUENCE public.agents_id_seq OWNED BY public.agents.id;\n \n \n --\n -- Name: branches; Type: TABLE; Schema: public; Owner: -\n --\n \n CREATE TABLE public.branches (\n  id integer NOT NULL,\n  name text NOT NULL,\n  created_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP,\n  updated_at timestamp with time zone,\n  phone text,\n  address text\n );\n \n \n --\n -- Name: branches_id_seq; Type: SEQUENCE; Schema: public; Owner: -\n --\n \n CREATE SEQUENCE public.branches_id_seq\n  AS integer\n  START WITH 1\n  INCREMENT BY 1\n  NO MINVALUE\n  NO MAXVALUE\n  CACHE 1;\n \n \n --\n -- Name: branches_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -\n --\n \n ALTER SEQUENCE public.branches_id_seq OWNED BY public.branches.id;\n \n \n --\n -- Name: cache; Type: TABLE; Schema: public; Owner: -\n --\n \n CREATE TABLE public.cache (\n  key character varying(255) NOT NULL,\n  value text NOT NULL,\n  expiration integer NOT NULL\n );\n \n \n --\n -- Name: cache_locks; Type: TABLE; Schema: public; Owner: -\n --\n \n CREATE TABLE public.cache_locks (\n  key character varying(255) NOT NULL,\n  owner character varying(255) NOT NULL,\n  expiration integer NOT NULL\n );\n \n \n --\n -- Name: currency_rates; Type: TABLE; Schema: public; Owner: -\n --\n \n CREATE TABLE public.currency_rates (\n  id bigint NOT NULL,\n  rate numeric(10,2) NOT NULL,\n  effective_from timestamp(0) without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL,\n  changed_by_user_id bigint,\n  created_at timestamp(0) without time zone,\n  updated_at timestamp(0) without time zone\n );\n \n \n --\n -- Name: currency_rates_id_seq; Type: SEQUENCE; Schema: public; Owner: -\n --\n \n CREATE SEQUENCE public.currency_rates_id_seq\n  START WITH 1\n  INCREMENT BY 1\n  NO MINVALUE\n  NO MAXVALUE\n  CACHE 1;\n \n \n --\n -- Name: currency_rates_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -\n --\n \n ALTER SEQUENCE public.currency_rates_id_seq OWNED BY public.currency_rates.id;\n \n \n --\n -- Name: customers; Type: TABLE; Schema: public; Owner: -\n --\n \n CREATE TABLE public.customers (\n  id integer NOT NULL,\n  name text NOT NULL,\n  mobile_no text NOT NULL,\n  identity_no text NOT NULL,\n  created_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP,\n  updated_at timestamp with time zone\n );\n \n \n --\n -- Name: customers_id_seq; Type: SEQUENCE; Schema: public; Owner: -\n --\n \n CREATE SEQUENCE public.customers_id_seq\n  AS integer\n  START WITH 1\n  INCREMENT BY 1\n  NO MINVALUE\n  NO MAXVALUE\n  CACHE 1;\n \n \n --\n -- Name: customers_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -\n --\n \n ALTER SEQUENCE public.customers_id_seq OWNED BY public.customers.id;\n \n \n --\n -- Name: failed_jobs; Type: TABLE; Schema: public; Owner: -\n --\n \n CREATE TABLE public.failed_jobs (\n  id integer NOT NULL,\n  uuid character varying(255) NOT NULL,\n  connection text NOT NULL,\n  queue text NOT NULL,\n  payload text NOT NULL,\n  exception text NOT NULL,\n  failed_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL\n );\n \n \n --\n -- Name: failed_jobs_id_seq; Type: SEQUENCE; Schema: public; Owner: -\n --\n \n CREATE SEQUENCE public.failed_jobs_id_seq\n  AS integer\n  START WITH 1\n  INCREMENT BY 1\n  NO MINVALUE\n  NO MAXVALUE\n  CACHE 1;\n \n \n --\n -- Name: failed_jobs_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -\n --\n \n ALTER SEQUENCE public.failed_jobs_id_seq OWNED BY public.failed_jobs.id;\n \n \n --\n -- Name: invoice_logs; Type: TABLE; Schema: public; Owner: -\n --\n \n CREATE TABLE public.invoice_logs (\n  id integer NOT NULL,\n  invoice_id text NOT NULL,\n  user_id bigint NOT NULL,\n  branch_id bigint NOT NULL,\n  action public.invoice_log_action NOT NULL,\n  details text,\n  created_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP,\n  updated_at timestamp with time zone\n );\n \n \n --\n -- Name: invoice_logs_id_seq; Type: SEQUENCE; Schema: public; Owner: -\n --\n \n CREATE SEQUENCE public.invoice_logs_id_seq\n  AS integer\n  START WITH 1\n  INCREMENT BY 1\n  NO MINVALUE\n  NO MAXVALUE\n  CACHE 1;\n \n \n --\n -- Name: invoice_logs_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -\n --\n \n ALTER SEQUENCE public.invoice_logs_id_seq OWNED BY public.invoice_logs.id;\n \n \n --\n -- Name: invoices; Type: TABLE; Schema: public; Owner: -\n --\n \n CREATE TABLE public.invoices (\n  invoice_id text NOT NULL,\n  customer_id bigint NOT NULL,\n  branch_id bigint NOT NULL,\n  user_id bigint NOT NULL,\n  created_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP,\n  updated_at timestamp with time zone\n );\n \n \n --\n -- Name: job_batches; Type: TABLE; Schema: public; Owner: -\n --\n \n CREATE TABLE public.job_batches (\n  id character varying(255) NOT NULL,\n  name character varying(255) NOT NULL,\n  total_jobs integer NOT NULL,\n  pending_jobs integer NOT NULL,\n  failed_jobs integer NOT NULL,\n  failed_job_ids text NOT NULL,\n  options text,\n  cancelled_at integer,\n  created_at integer NOT NULL,\n  finished_at integer\n );\n \n \n --\n -- Name: jobs; Type: TABLE; Schema: public; Owner: -\n --\n \n CREATE TABLE public.jobs (\n  id integer NOT NULL,\n  queue character varying(255) NOT NULL,\n  payload text NOT NULL,\n  attempts smallint NOT NULL,\n  reserved_at integer,\n  available_at integer NOT NULL,\n  created_at integer NOT NULL\n );\n \n \n --\n -- Name: jobs_id_seq; Type: SEQUENCE; Schema: public; Owner: -\n --\n \n CREATE SEQUENCE public.jobs_id_seq\n  AS integer\n  START WITH 1\n  INCREMENT BY 1\n  NO MINVALUE\n  NO MAXVALUE\n  CACHE 1;\n \n \n --\n -- Name: jobs_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -\n --\n \n ALTER SEQUENCE public.jobs_id_seq OWNED BY public.jobs.id;\n \n \n --\n -- Name: migrations; Type: TABLE; Schema: public; Owner: -\n --\n \n CREATE TABLE public.migrations (\n  id integer NOT NULL,\n  migration character varying(255) NOT NULL,\n  batch integer NOT NULL\n );\n \n \n --\n -- Name: migrations_id_seq; Type: SEQUENCE; Schema: public; Owner: -\n --\n \n CREATE SEQUENCE public.migrations_id_seq\n  AS integer\n  START WITH 1\n  INCREMENT BY 1\n  NO MINVALUE\n  NO MAXVALUE\n  CACHE 1;\n \n \n --\n -- Name: migrations_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -\n --\n \n ALTER SEQUENCE public.migrations_id_seq OWNED BY public.migrations.id;\n \n \n --\n -- Name: payments; Type: TABLE; Schema: public; Owner: -\n --\n \n CREATE TABLE public.payments (\n  id integer NOT NULL,\n  invoice_id text,\n  branch_id bigint NOT NULL,\n  amount numeric NOT NULL,\n  payment_method public.payment_method_enum NOT NULL,\n  trx_id text,\n  payment_date timestamp with time zone DEFAULT CURRENT_TIMESTAMP,\n  user_id bigint NOT NULL,\n  created_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP,\n  updated_at timestamp with time zone,\n  agent_id bigint,\n  bdt_amount numeric(10,2),\n  currency_rate_id bigint\n );\n \n \n --\n -- Name: payments_id_seq; Type: SEQUENCE; Schema: public; Owner: -\n --\n \n CREATE SEQUENCE public.payments_id_seq\n  AS integer\n  START WITH 1\n  INCREMENT BY 1\n  NO MINVALUE\n  NO MAXVALUE\n  CACHE 1;\n \n \n --\n -- Name: payments_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -\n --\n \n ALTER SEQUENCE public.payments_id_seq OWNED BY public.payments.id;\n \n \n --\n -- Name: service_orders; Type: TABLE; Schema: public; Owner: -\n --\n \n CREATE TABLE public.service_orders (\n  id integer NOT NULL,\n  service_id bigint NOT NULL,\n  customer_id bigint NOT NULL,\n  agent_id bigint,\n  branch_id bigint NOT NULL,\n  invoice_id text NOT NULL,\n  deadline timestamp with time zone,\n  total_cost numeric NOT NULL,\n  agent_commission numeric DEFAULT '0'::numeric NOT NULL,\n  agent_commission_paid numeric DEFAULT 0,\n  status public.order_status DEFAULT 'pending'::public.order_status,\n  user_id bigint NOT NULL,\n  created_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP,\n  updated_at timestamp with time zone,\n  is_cancel boolean,\n  remarks text,\n  remarks_updated_by bigint\n );\n \n \n --\n -- Name: service_orders_id_seq; Type: SEQUENCE; Schema: public; Owner: -\n --\n \n CREATE SEQUENCE public.service_orders_id_seq\n  AS integer\n  START WITH 1\n  INCREMENT BY 1\n  NO MINVALUE\n  NO MAXVALUE\n  CACHE 1;\n \n \n --\n -- Name: service_orders_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -\n --\n \n ALTER SEQUENCE public.service_orders_id_seq OWNED BY public.service_orders.id;\n \n \n --\n -- Name: services; Type: TABLE; Schema: public; Owner: -\n --\n \n CREATE TABLE public.services (\n  id integer NOT NULL,\n  name text NOT NULL,\n  description text,\n  need_days integer NOT NULL,\n  created_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP,\n  updated_at timestamp with time zone,\n  cost numrange NOT NULL\n );\n \n \n --\n -- Name: services_id_seq; Type: SEQUENCE; Schema: public; Owner: -\n --\n \n CREATE SEQUENCE public.services_id_seq\n  AS integer\n  START WITH 1\n  INCREMENT BY 1\n  NO MINVALUE\n  NO MAXVALUE\n  CACHE 1;\n \n \n --\n -- Name: services_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -\n --\n \n ALTER SEQUENCE public.services_id_seq OWNED BY public.services.id;\n \n \n --\n -- Name: sessions; Type: TABLE; Schema: public; Owner: -\n --\n \n CREATE TABLE public.sessions (\n  id character varying(255) NOT NULL,\n  user_id bigint,\n  ip_address character varying(45),\n  user_agent text,\n  payload text NOT NULL,\n  last_activity integer NOT NULL\n );\n \n \n --\n -- Name: users; Type: TABLE; Schema: public; Owner: -\n --\n \n CREATE TABLE public.users (\n  id integer NOT NULL,\n  name text NOT NULL,\n  email text NOT NULL,\n  password text NOT NULL,\n  role public.user_role NOT NULL,\n  branch_id bigint,\n  created_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP,\n  updated_at timestamp with time zone,\n  email_verified_at timestamp without time zone,\n  remember_token character varying(100)\n );\n \n \n --\n -- Name: users_id_seq; Type: SEQUENCE; Schema: public; Owner: -\n --\n \n CREATE SEQUENCE public.users_id_seq\n  AS integer\n  START WITH 1\n  INCREMENT BY 1\n  NO MINVALUE\n  NO MAXVALUE\n  CACHE 1;\n \n \n --\n -- Name: users_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -\n --\n \n ALTER SEQUENCE public.users_id_seq OWNED BY public.users.id;\n \n \n --\n -- Name: vouchers; Type: TABLE; Schema: public; Owner: -\n --\n \n CREATE TABLE public.vouchers (\n  id integer NOT NULL,\n  voucher_id text NOT NULL,\n  transaction_type public.transaction_type NOT NULL,\n  type public.voucher_type NOT NULL,\n  invoice_id text,\n  payment_id bigint,\n  amount numeric NOT NULL,\n  branch_id bigint NOT NULL,\n  payment_method public.payment_method_enum,\n  trx_id text,\n  user_id bigint NOT NULL,\n  created_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP,\n  updated_at timestamp with time zone,\n  bdt_amount numeric(10,2),\n  currency_rate_id bigint\n );\n \n \n --\n -- Name: vouchers_id_seq; Type: SEQUENCE; Schema: public; Owner: -\n --\n \n CREATE SEQUENCE public.vouchers_id_seq\n  AS integer\n  START WITH 1\n  INCREMENT BY 1\n  NO MINVALUE\n  NO MAXVALUE\n  CACHE 1;\n \n \n --\n -- Name: vouchers_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -\n --\n \n ALTER SEQUENCE public.vouchers_id_seq OWNED BY public.vouchers.id;\n \n \n --\n -- Name: agents id; Type: DEFAULT; Schema: public; Owner: -\n --\n \n ALTER TABLE ONLY public.agents ALTER COLUMN id SET DEFAULT nextval('public.agents_id_seq'::regclass);\n \n \n --\n -- Name: branches id; Type: DEFAULT; Schema: public; Owner: -\n --\n \n ALTER TABLE ONLY public.branches ALTER COLUMN id SET DEFAULT nextval('public.branches_id_seq'::regclass);\n \n \n --\n -- Name: currency_rates id; Type: DEFAULT; Schema: public; Owner: -\n --\n \n ALTER TABLE ONLY public.currency_rates ALTER COLUMN id SET DEFAULT nextval('public.currency_rates_id_seq'::regclass);\n \n \n --\n -- Name: customers id; Type: DEFAULT; Schema: public; Owner: -\n --\n \n ALTER TABLE ONLY public.customers ALTER COLUMN id SET DEFAULT nextval('public.customers_id_seq'::regclass);\n \n \n --\n -- Name: failed_jobs id; Type: DEFAULT; Schema: public; Owner: -\n --\n \n ALTER TABLE ONLY public.failed_jobs ALTER COLUMN id SET DEFAULT nextval('public.failed_jobs_id_seq'::regclass);\n \n \n --\n -- Name: invoice_logs id; Type: DEFAULT; Schema: public; Owner: -\n --\n \n ALTER TABLE ONLY public.invoice_logs ALTER COLUMN id SET DEFAULT nextval('public.invoice_logs_id_seq'::regclass);\n \n \n --\n -- Name: jobs id; Type: DEFAULT; Schema: public; Owner: -\n --\n \n ALTER TABLE ONLY public.jobs ALTER COLUMN id SET DEFAULT nextval('public.jobs_id_seq'::regclass);\n \n \n --\n -- Name: migrations id; Type: DEFAULT; Schema: public; Owner: -\n --\n \n ALTER TABLE ONLY public.migrations ALTER COLUMN id SET DEFAULT nextval('public.migrations_id_seq'::regclass);\n \n \n --\n -- Name: payments id; Type: DEFAULT; Schema: public; Owner: -\n --\n \n ALTER TABLE ONLY public.payments ALTER COLUMN id SET DEFAULT nextval('public.payments_id_seq'::regclass);\n \n \n --\n -- Name: service_orders id; Type: DEFAULT; Schema: public; Owner: -\n --\n \n ALTER TABLE ONLY public.service_orders ALTER COLUMN id SET DEFAULT nextval('public.service_orders_id_seq'::regclass);\n \n \n --\n -- Name: services id; Type: DEFAULT; Schema: public; Owner: -\n --\n \n ALTER TABLE ONLY public.services ALTER COLUMN id SET DEFAULT nextval('public.services_id_seq'::regclass);\n \n \n --\n -- Name: users id; Type: DEFAULT; Schema: public; Owner: -\n --\n \n ALTER TABLE ONLY public.users ALTER COLUMN id SET DEFAULT nextval('public.users_id_seq'::regclass);\n \n \n --\n -- Name: vouchers id; Type: DEFAULT; Schema: public; Owner: -\n --\n \n ALTER TABLE ONLY public.vouchers ALTER COLUMN id SET DEFAULT nextval('public.vouchers_id_seq'::regclass);\n \n \n --\n -- Name: agents agents_pkey; Type: CONSTRAINT; Schema: public; Owner: -\n --\n \n ALTER TABLE ONLY public.agents\n  ADD CONSTRAINT agents_pkey PRIMARY KEY (id);\n \n \n --\n -- Name: branches branches_pkey; Type: CONSTRAINT; Schema: public; Owner: -\n --\n \n ALTER TABLE ONLY public.branches\n  ADD CONSTRAINT branches_pkey PRIMARY KEY (id);\n \n \n --\n -- Name: cache_locks cache_locks_pkey; Type: CONSTRAINT; Schema: public; Owner: -\n --\n \n ALTER TABLE ONLY public.cache_locks\n  ADD CONSTRAINT cache_locks_pkey PRIMARY KEY (key);\n \n \n --\n -- Name: cache cache_pkey; Type: CONSTRAINT; Schema: public; Owner: -\n --\n \n ALTER TABLE ONLY public.cache\n  ADD CONSTRAINT cache_pkey PRIMARY KEY (key);\n \n \n --\n -- Name: currency_rates currency_rates_pkey; Type: CONSTRAINT; Schema: public; Owner: -\n --\n \n ALTER TABLE ONLY public.currency_rates\n  ADD CONSTRAINT currency_rates_pkey PRIMARY KEY (id);\n \n \n --\n -- Name: customers customers_mobile_no_unique; Type: CONSTRAINT; Schema: public; Owner: -\n --\n \n ALTER TABLE ONLY public.customers\n  ADD CONSTRAINT customers_mobile_no_unique UNIQUE (mobile_no);\n \n \n --\n -- Name: customers customers_pkey; Type: CONSTRAINT; Schema: public; Owner: -\n --\n \n ALTER TABLE ONLY public.customers\n  ADD CONSTRAINT customers_pkey PRIMARY KEY (id);\n \n \n --\n -- Name: failed_jobs failed_jobs_pkey; Type: CONSTRAINT; Schema: public; Owner: -\n --\n \n ALTER TABLE ONLY public.failed_jobs\n  ADD CONSTRAINT failed_jobs_pkey PRIMARY KEY (id);\n \n \n --\n -- Name: failed_jobs failed_jobs_uuid_unique; Type: CONSTRAINT; Schema: public; Owner: -\n --\n \n ALTER TABLE ONLY public.failed_jobs\n  ADD CONSTRAINT failed_jobs_uuid_unique UNIQUE (uuid);\n \n \n --\n -- Name: invoice_logs invoice_logs_pkey; Type: CONSTRAINT; Schema: public; Owner: -\n --\n \n ALTER TABLE ONLY public.invoice_logs\n  ADD CONSTRAINT invoice_logs_pkey PRIMARY KEY (id);\n \n \n --\n -- Name: invoices invoices_pkey; Type: CONSTRAINT; Schema: public; Owner: -\n --\n \n ALTER TABLE ONLY public.invoices\n  ADD CONSTRAINT invoices_pkey PRIMARY KEY (invoice_id);\n \n \n --\n -- Name: job_batches job_batches_pkey; Type: CONSTRAINT; Schema: public; Owner: -\n --\n \n ALTER TABLE ONLY public.job_batches\n  ADD CONSTRAINT job_batches_pkey PRIMARY KEY (id);\n \n \n --\n -- Name: jobs jobs_pkey; Type: CONSTRAINT; Schema: public; Owner: -\n --\n \n ALTER TABLE ONLY public.jobs\n  ADD CONSTRAINT jobs_pkey PRIMARY KEY (id);\n \n \n --\n -- Name: migrations migrations_pkey; Type: CONSTRAINT; Schema: public; Owner: -\n --\n \n ALTER TABLE ONLY public.migrations\n  ADD CONSTRAINT migrations_pkey PRIMARY KEY (id);\n \n \n --\n -- Name: payments payments_pkey; Type: CONSTRAINT; Schema: public; Owner: -\n --\n \n ALTER TABLE ONLY public.payments\n  ADD CONSTRAINT payments_pkey PRIMARY KEY (id);\n \n \n --\n -- Name: service_orders service_orders_invoice_id_key; Type: CONSTRAINT; Schema: public; Owner: -\n --\n \n ALTER TABLE ONLY public.service_orders\n  ADD CONSTRAINT service_orders_invoice_id_key UNIQUE (invoice_id);\n \n \n --\n -- Name: service_orders service_orders_pkey; Type: CONSTRAINT; Schema: public; Owner: -\n --\n \n ALTER TABLE ONLY public.service_orders\n  ADD CONSTRAINT service_orders_pkey PRIMARY KEY (id);\n \n \n --\n -- Name: services services_pkey; Type: CONSTRAINT; Schema: public; Owner: -\n --\n \n ALTER TABLE ONLY public.services\n  ADD CONSTRAINT services_pkey PRIMARY KEY (id);\n \n \n --\n -- Name: sessions sessions_pkey; Type: CONSTRAINT; Schema: public; Owner: -\n --\n \n ALTER TABLE ONLY public.sessions\n  ADD CONSTRAINT sessions_pkey PRIMARY KEY (id);\n \n \n --\n -- Name: users users_email_key; Type: CONSTRAINT; Schema: public; Owner: -\n --\n \n ALTER TABLE ONLY public.users\n  ADD CONSTRAINT users_email_key UNIQUE (email);\n \n \n --\n -- Name: users users_pkey; Type: CONSTRAINT; Schema: public; Owner: -\n --\n \n ALTER TABLE ONLY public.users\n  ADD CONSTRAINT users_pkey PRIMARY KEY (id);\n \n \n --\n -- Name: vouchers vouchers_pkey; Type: CONSTRAINT; Schema: public; Owner: -\n --\n \n ALTER TABLE ONLY public.vouchers\n  ADD CONSTRAINT vouchers_pkey PRIMARY KEY (id);\n \n \n --\n -- Name: vouchers vouchers_voucher_id_key; Type: CONSTRAINT; Schema: public; Owner: -\n --\n \n ALTER TABLE ONLY public.vouchers\n  ADD CONSTRAINT vouchers_voucher_id_key UNIQUE (voucher_id);\n \n \n --\n -- Name: currency_rates currency_rates_changed_by_user_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: -\n --\n \n ALTER TABLE ONLY public.currency_rates\n  ADD CONSTRAINT currency_rates_changed_by_user_id_foreign FOREIGN KEY (changed_by_user_id) REFERENCES public.users(id) ON DELETE SET NULL;\n \n \n --\n -- Name: invoice_logs invoice_logs_branch_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -\n --\n \n ALTER TABLE ONLY public.invoice_logs\n  ADD CONSTRAINT invoice_logs_branch_id_fkey FOREIGN KEY (branch_id) REFERENCES public.branches(id);\n \n \n --\n -- Name: invoice_logs invoice_logs_invoice_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -\n --\n \n ALTER TABLE ONLY public.invoice_logs\n  ADD CONSTRAINT invoice_logs_invoice_id_fkey FOREIGN KEY (invoice_id) REFERENCES public.invoices(invoice_id);\n \n \n --\n -- Name: invoice_logs invoice_logs_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -\n --\n \n ALTER TABLE ONLY public.invoice_logs\n  ADD CONSTRAINT invoice_logs_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.users(id);\n \n \n --\n -- Name: invoices invoices_branch_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -\n --\n \n ALTER TABLE ONLY public.invoices\n  ADD CONSTRAINT invoices_branch_id_fkey FOREIGN KEY (branch_id) REFERENCES public.branches(id);\n \n \n --\n -- Name: invoices invoices_customer_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -\n --\n \n ALTER TABLE ONLY public.invoices\n  ADD CONSTRAINT invoices_customer_id_fkey FOREIGN KEY (customer_id) REFERENCES public.customers(id);\n \n \n --\n -- Name: invoices invoices_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -\n --\n \n ALTER TABLE ONLY public.invoices\n  ADD CONSTRAINT invoices_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.users(id);\n \n \n --\n -- Name: payments payments_agent_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -\n --\n \n ALTER TABLE ONLY public.payments\n  ADD CONSTRAINT payments_agent_id_fkey FOREIGN KEY (agent_id) REFERENCES public.agents(id);\n \n \n --\n -- Name: payments payments_branch_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -\n --\n \n ALTER TABLE ONLY public.payments\n  ADD CONSTRAINT payments_branch_id_fkey FOREIGN KEY (branch_id) REFERENCES public.branches(id);\n \n \n --\n -- Name: payments payments_currency_rate_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: -\n --\n \n ALTER TABLE ONLY public.payments\n  ADD CONSTRAINT payments_currency_rate_id_foreign FOREIGN KEY (currency_rate_id) REFERENCES public.currency_rates(id) ON DELETE SET NULL;\n \n \n --\n -- Name: payments payments_invoice_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -\n --\n \n ALTER TABLE ONLY public.payments\n  ADD CONSTRAINT payments_invoice_id_fkey FOREIGN KEY (invoice_id) REFERENCES public.invoices(invoice_id);\n \n \n --\n -- Name: payments payments_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -\n --\n \n ALTER TABLE ONLY public.payments\n  ADD CONSTRAINT payments_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.users(id);\n \n \n --\n -- Name: service_orders service_orders_agent_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -\n --\n \n ALTER TABLE ONLY public.service_orders\n  ADD CONSTRAINT service_orders_agent_id_fkey FOREIGN KEY (agent_id) REFERENCES public.agents(id);\n \n \n --\n -- Name: service_orders service_orders_branch_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -\n --\n \n ALTER TABLE ONLY public.service_orders\n  ADD CONSTRAINT service_orders_branch_id_fkey FOREIGN KEY (branch_id) REFERENCES public.branches(id);\n \n \n --\n -- Name: service_orders service_orders_customer_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -\n --\n \n ALTER TABLE ONLY public.service_orders\n  ADD CONSTRAINT service_orders_customer_id_fkey FOREIGN KEY (customer_id) REFERENCES public.customers(id);\n \n \n --\n -- Name: service_orders service_orders_invoice_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -\n --\n \n ALTER TABLE ONLY public.service_orders\n  ADD CONSTRAINT service_orders_invoice_id_fkey FOREIGN KEY (invoice_id) REFERENCES public.invoices(invoice_id);\n \n \n --\n -- Name: service_orders service_orders_remarks_updated_by_foreign; Type: FK CONSTRAINT; Schema: public; Owner: -\n --\n \n ALTER TABLE ONLY public.service_orders\n  ADD CONSTRAINT service_orders_remarks_updated_by_foreign FOREIGN KEY (remarks_updated_by) REFERENCES public.users(id) ON DELETE SET NULL;\n \n \n --\n -- Name: service_orders service_orders_service_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -\n --\n \n ALTER TABLE ONLY public.service_orders\n  ADD CONSTRAINT service_orders_service_id_fkey FOREIGN KEY (service_id) REFERENCES public.services(id);\n \n \n --\n -- Name: service_orders service_orders_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -\n --\n \n ALTER TABLE ONLY public.service_orders\n  ADD CONSTRAINT service_orders_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.users(id);\n \n \n --\n -- Name: users users_branch_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -\n --\n \n ALTER TABLE ONLY public.users\n  ADD CONSTRAINT users_branch_id_fkey FOREIGN KEY (branch_id) REFERENCES public.branches(id);\n \n \n --\n -- Name: vouchers vouchers_branch_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -\n --\n \n ALTER TABLE ONLY public.vouchers\n  ADD CONSTRAINT vouchers_branch_id_fkey FOREIGN KEY (branch_id) REFERENCES public.branches(id);\n \n \n --\n -- Name: vouchers vouchers_currency_rate_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: -\n --\n \n ALTER TABLE ONLY public.vouchers\n  ADD CONSTRAINT vouchers_currency_rate_id_foreign FOREIGN KEY (currency_rate_id) REFERENCES public.currency_rates(id) ON DELETE SET NULL;\n \n \n --\n -- Name: vouchers vouchers_invoice_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -\n --\n \n ALTER TABLE ONLY public.vouchers\n  ADD CONSTRAINT vouchers_invoice_id_fkey FOREIGN KEY (invoice_id) REFERENCES public.invoices(invoice_id);\n \n \n --\n -- Name: vouchers vouchers_payment_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -\n --\n \n ALTER TABLE ONLY public.vouchers\n  ADD CONSTRAINT vouchers_payment_id_fkey FOREIGN KEY (payment_id) REFERENCES public.payments(id) ON DELETE SET NULL;\n \n \n --\n -- Name: vouchers vouchers_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -\n --\n \n ALTER TABLE ONLY public.vouchers\n  ADD CONSTRAINT vouchers_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.users(id);\n \n \n --\n -- PostgreSQL database dump complete\n --\n \n --\n -- PostgreSQL database dump\n --\n \n -- Dumped from database version 16.2\n -- Dumped by pg_dump version 16.2\n \n SET statement_timeout = 0;\n SET lock_timeout = 0;\n SET idle_in_transaction_session_timeout = 0;\n SET client_encoding = 'UTF8';\n SET standard_conforming_strings = on;\n SELECT pg_catalog.set_config('search_path', '', false);\n SET check_function_bodies = false;\n SET xmloption = content;\n SET client_min_messages = warning;\n SET row_security = off;\n \n --\n -- Data for Name: migrations; Type: TABLE DATA; Schema: public; Owner: -\n --\n \n COPY public.migrations (id, migration, batch) FROM stdin;\n 1\t2025_09_01_032457_create_customers_table\t1\n 2\t2025_09_01_032457_create_branches_table\t1\n 3\t2025_09_01_032457_create_users_table\t1\n 4\t2025_09_01_032457_create_invoices_table\t1\n 5\t2025_09_01_032457_create_services_table\t1\n 6\t2025_09_01_032458_create_agents_table\t1\n 7\t2025_09_01_032458_create_service_orders_table\t1\n 8\t2025_09_01_032458_create_payments_table\t1\n 9\t2025_09_01_032458_create_invoice_logs_table\t1\n 10\t2025_09_01_032459_create_vouchers_table\t1\n 11\t2025_09_01_032459_create_failed_jobs_table\t1\n 12\t2025_09_01_032459_create_sessions_table\t1\n 13\t2025_09_01_032459_create_migrations_table\t1\n 14\t2025_09_01_032500_create_cache_table\t1\n 15\t2025_09_01_032500_create_cache_locks_table\t1\n 16\t2025_09_01_032500_create_jobs_table\t1\n 17\t2025_09_01_032500_create_job_batches_table\t1\n 18\t2025_09_01_010949_create_users_table\t1\n 19\t2025_09_05_025003_alter_services_table_change_cost_to_numrange\t2\n 20\t2025_09_19_081115_create_currency_rates_table\t3\n 21\t2025_09_19_081313_add_currency_fields_to_payments_table\t3\n 22\t2025_09_19_081417_add_currency_fields_to_vouchers_table\t3\n 23\t2025_09_20_053726_alter_payment_method_enum\t4\n 24\t2025_09_20_165134_fix_service_orders_status_enum_replace_cancel_with_cancelled\t5\n 25\t2025_09_21_012902_add_phone_to_branches_table\t6\n 26\t2025_09_21_020934_add_address_to_branches_table\t7\n 27\t2025_09_30_124820_add_is_cancel_toso_def_null\t8\n 28\t2025_10_11_201609_add_remarks_to_service_orders_table\t9\n 29\t2025_10_11_212035_add_remarks_updated_by_to_service_orders_table\t9\n \.\n \n \n --\n -- Name: migrations_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -\n --\n \n SELECT pg_catalog.setval('public.migrations_id_seq', 29, true);\n \n \n --\n -- PostgreSQL database dump complete\n --\n \n """