-- Name: _UPDATE; Type: RULE; Schema: api; Owner: admin
--

CREATE RULE "_UPDATE" AS ON UPDATE TO purchaselinechar DO INSTEAD SELECT DISTINCT public.updatecharassignment('PI'::text, poitem.poitem_id, charass.charass_char_id, new.value) AS updatecharassignment FROM public.pohead, public.poitem, public.itemsite, public.item, public.charass, public."char" WHERE (((((((((pohead.pohead_number = (old.order_number)::text) AND (pohead.pohead_id = poitem.poitem_pohead_id)) AND (poitem.poitem_linenumber = old.line_number)) AND (poitem.poitem_itemsite_id = itemsite.itemsite_id)) AND (item.item_id = itemsite.itemsite_item_id)) AND (charass.charass_target_type = 'I'::text)) AND (charass.charass_target_id = item.item_id)) AND ("char".char_id = charass.charass_char_id)) AND ("char".char_name = old.characteristic));


--
-- TOC entry 8862 (class 2618 OID 146572112)
-- Dependencies: 362 362 362 8894
-- Name: _UPDATE; Type: RULE; Schema: api; Owner: admin
--

CREATE RULE "_UPDATE" AS ON UPDATE TO purchaselinecomment DO INSTEAD NOTHING;


--
-- TOC entry 8863 (class 2618 OID 146572113)
-- Dependencies: 365 365 365 365 365 365 365 365 365 365 365 365 365 365 365 365 365 365 365 365 365 365 365 365 365 365 365 365 365 365 365 365 365 365 365 365 365 365 365 365 365 365 365 365 365 365 365 365 365 365 197 1780 1777 1769 1768 1681 1672 1670 1658 365 8894
-- Name: _UPDATE; Type: RULE; Schema: api; Owner: admin
--

CREATE RULE "_UPDATE" AS ON UPDATE TO purchaseorder DO INSTEAD UPDATE public.pohead SET pohead_terms_id = public.gettermsid(new.terms), pohead_taxzone_id = public.gettaxzoneid(new.tax_zone), pohead_warehous_id = public.getwarehousid(new.receiving_site, 'ALL'::text), pohead_agent_username = new.purchasing_agent, pohead_vendaddr_id = CASE WHEN (new.alt_address = 'MAIN'::text) THEN NULL::integer ELSE public.getvendaddrid(old.vendor_number, new.alt_address) END, pohead_fob = new.fob, pohead_shipvia = new.ship_via, pohead_curr_id = public.getcurrid((new.currency)::text), pohead_freight = new.freight, pohead_comments = new.notes, pohead_dropship = new.dropship, pohead_vend_cntct_id = public.getcntctid(new.vend_contact_number), pohead_vend_cntct_honorific = new.vend_cntct_honorific, pohead_vend_cntct_first_name = new.vend_cntct_first_name, pohead_vend_cntct_middle = new.vend_cntct_middle, pohead_vend_cntct_last_name = new.vend_cntct_last_name, pohead_vend_cntct_suffix = new.vend_cntct_suffix, pohead_vend_cntct_phone = new.vend_cntct_phone, pohead_vend_cntct_title = new.vend_cntct_title, pohead_vend_cntct_fax = new.vend_cntct_fax, pohead_vend_cntct_email = new.vend_cntct_email, pohead_vendaddress1 = new.vendaddress1, pohead_vendaddress2 = new.vendaddress2, pohead_vendaddress3 = new.vendaddress3, pohead_vendcity = new.vendcity, pohead_vendstate = new.vendstate, pohead_vendzipcode = new.vendzipcode, pohead_vendcountry = new.vendcountry, pohead_shipto_cntct_id = public.getcntctid(new.shipto_contact_number), pohead_shipto_cntct_honorific = new.shipto_cntct_honorific, pohead_shipto_cntct_first_name = new.shipto_cntct_first_name, pohead_shipto_cntct_middle = new.shipto_cntct_middle, pohead_shipto_cntct_last_name = new.shipto_cntct_last_name, pohead_shipto_cntct_suffix = new.shipto_cntct_suffix, pohead_shipto_cntct_phone = new.shipto_cntct_phone, pohead_shipto_cntct_title = new.shipto_cntct_title, pohead_shipto_cntct_fax = new.shipto_cntct_fax, pohead_shipto_cntct_email = new.shipto_cntct_email, pohead_shiptoaddress_id = public.getaddrid(new.shiptoaddress_number), pohead_shiptoaddress1 = new.shiptoaddress1, pohead_shiptoaddress2 = new.shiptoaddress2, pohead_shiptoaddress3 = new.shiptoaddress3, pohead_shiptocity = new.shiptocity, pohead_shiptostate = new.shiptostate, pohead_shiptozipcode = new.shiptozipcode, pohead_shiptocountry = new.shiptocountry, pohead_cohead_id = public.getcoheadid(new.sales_order_number) WHERE (pohead.pohead_number = (old.order_number)::text);


--
-- TOC entry 8864 (class 2618 OID 146572115)
-- Dependencies: 366 366 366 8894
-- Name: _UPDATE; Type: RULE; Schema: api; Owner: admin
--

CREATE RULE "_UPDATE" AS ON UPDATE TO purchaseordercomment DO INSTEAD NOTHING;


--
-- TOC entry 8865 (class 2618 OID 146572116)
-- Dependencies: 368 368 368 368 368 368 368 368 368 368 368 368 368 368 368 368 368 368 368 368 368 368 368 368 368 368 368 368 368 368 368 368 368 368 368 368 368 368 368 368 368 368 368 367 1780 1769 1768 1767 1759 1756 1751 1749 1736 1700 1683 1681 368 8894
-- Name: _UPDATE; Type: RULE; Schema: api; Owner: admin
--

CREATE RULE "_UPDATE" AS ON UPDATE TO quote DO INSTEAD UPDATE public.quhead SET quhead_number = old.quote_number, quhead_cust_id = public.getcustid(new.customer_number, true), quhead_custponumber = new.cust_po_number, quhead_quotedate = new.quote_date, quhead_warehous_id = public.getwarehousid(new.site, 'SHIPPING'::text), quhead_shipto_id = public.getshiptoid(new.customer_number, new.shipto_number), quhead_shiptoname = new.shipto_name, quhead_shiptoaddress1 = new.shipto_address1, quhead_shiptoaddress2 = new.shipto_address2, quhead_shiptoaddress3 = new.shipto_address3, quhead_salesrep_id = public.getsalesrepid(new.sales_rep), quhead_terms_id = public.gettermsid(new.terms), quhead_fob = new.fob, quhead_shipvia = new.ship_via, quhead_shiptocity = new.shipto_city, quhead_shiptostate = new.shipto_state, quhead_shiptozipcode = new.shipto_postal_code, quhead_freight = new.freight, quhead_misc = new.misc_charge, quhead_ordercomments = new.order_notes, quhead_shipcomments = new.shipping_notes, quhead_shiptophone = new.shipto_phone, quhead_billtoname = new.billto_name, quhead_billtoaddress1 = new.billto_address1, quhead_billtoaddress2 = new.billto_address2, quhead_billtoaddress3 = new.billto_address3, quhead_billtocity = new.billto_city, quhead_billtostate = new.billto_state, quhead_billtozip = new.billto_postal_code, quhead_misc_accnt_id = public.getglaccntid(new.misc_account_number), quhead_misc_descrip = new.misc_charge_description, quhead_commission = new.commission, quhead_packdate = new.pack_date, quhead_prj_id = public.getprjid(new.project_number), quhead_billtocountry = new.billto_country, quhead_shiptocountry = new.shipto_country, quhead_curr_id = public.getcurrid((new.currency)::text), quhead_taxzone_id = public.gettaxzoneid(new.tax_zone), quhead_taxtype_id = public.gettaxtypeid(new.tax_type), quhead_expire = new.expire_date, quhead_saletype_id = public.getsaletypeid(new.sale_type), quhead_shipzone_id = public.getshipzoneid(new.shipto_shipzone) WHERE (quhead.quhead_number = (old.quote_number)::text);


--
-- TOC entry 8866 (class 2618 OID 146572118)
-- Dependencies: 369 369 369 8894
-- Name: _UPDATE; Type: RULE; Schema: api; Owner: admin
--

CREATE RULE "_UPDATE" AS ON UPDATE TO quotecomment DO INSTEAD NOTHING;


--
-- TOC entry 8867 (class 2618 OID 146572119)
-- Dependencies: 371 371 371 371 371 371 371 371 371 371 371 371 371 370 370 191 191 1902 1780 1771 1767 1720 371 8894
-- Name: _UPDATE; Type: RULE; Schema: api; Owner: admin
--

CREATE RULE "_UPDATE" AS ON UPDATE TO quoteline DO INSTEAD UPDATE public.quitem SET quitem_scheddate = new.scheduled_date, quitem_qtyord = new.qty_ordered, quitem_qty_uom_id = public.getuomid(new.qty_uom), quitem_qty_invuomratio = public.itemuomtouomratio(item.item_id, COALESCE(public.getuomid(new.qty_uom), item.item_inv_uom_id), item.item_inv_uom_id), quitem_price = new.net_unit_price, quitem_price_uom_id = public.getuomid(new.price_uom), quitem_price_invuomratio = public.itemuomtouomratio(item.item_id, COALESCE(public.getuomid(new.price_uom), item.item_inv_uom_id), item.item_inv_uom_id), quitem_memo = new.notes, quitem_createorder = new.create_order, quitem_order_warehous_id = public.getwarehousid(new.supplying_site, 'SHIPPING'::text), quitem_prcost = new.overwrite_po_price, quitem_taxtype_id = public.gettaxtypeid(new.tax_type) FROM public.item WHERE ((quitem.quitem_quhead_id = public.getquoteid(old.quote_number)) AND (quitem.quitem_linenumber = old.line_number));


--
-- TOC entry 8868 (class 2618 OID 146572121)
-- Dependencies: 372 372 372 372 372 370 370 370 370 367 367 237 237 237 236 236 192 192 191 2281 372 8894
-- Name: _UPDATE; Type: RULE; Schema: api; Owner: admin
--

CREATE RULE "_UPDATE" AS ON UPDATE TO quotelinechar DO INSTEAD SELECT DISTINCT public.updatecharassignment('QI'::text, quitem.quitem_id, charass.charass_char_id, new.value) AS updatecharassignment FROM public.quhead, public.quitem, public.itemsite, public.item, public.charass, public."char" WHERE (((((((((quhead.quhead_number = old.quote_number) AND (quhead.quhead_id = quitem.quitem_quhead_id)) AND (quitem.quitem_linenumber = old.line_number)) AND (quitem.quitem_itemsite_id = itemsite.itemsite_id)) AND (item.item_id = itemsite.itemsite_item_id)) AND (charass.charass_target_type = 'I'::text)) AND (charass.charass_target_id = item.item_id)) AND ("char".char_id = charass.charass_char_id)) AND ("char".char_name = old.characteristic));


--
-- TOC entry 8869 (class 2618 OID 146572123)
-- Dependencies: 373 373 373 8894
-- Name: _UPDATE; Type: RULE; Schema: api; Owner: admin
--

CREATE RULE "_UPDATE" AS ON UPDATE TO quotelinecomment DO INSTEAD NOTHING;


--
-- TOC entry 8870 (class 2618 OID 146572124)
-- Dependencies: 380 380 380 8894
-- Name: _UPDATE; Type: RULE; Schema: api; Owner: admin
--

CREATE RULE "_UPDATE" AS ON UPDATE TO saleshistory DO INSTEAD NOTHING;


--
-- TOC entry 8871 (class 2618 OID 146572125)
-- Dependencies: 381 381 381 381 381 237 237 237 236 236 196 196 196 196 195 195 195 195 195 195 192 192 191 2282 1876 1674 381 8894
-- Name: _UPDATE; Type: RULE; Schema: api; Owner: admin
--

CREATE RULE "_UPDATE" AS ON UPDATE TO saleslinechar DO INSTEAD SELECT DISTINCT public.updatecharassignment('SI'::text, coitem.coitem_id, charass.charass_char_id, new.value, public.itemcharprice(item.item_id, "char".char_id, new.value, cohead.cohead_cust_id, cohead.cohead_shipto_id, coitem.coitem_qtyord, cohead.cohead_curr_id, cohead.cohead_orderdate)) AS updatecharassignment FROM public.cohead, public.coitem, public.itemsite, public.item, public.charass, public."char" WHERE (((((((((cohead.cohead_number = (old.order_number)::text) AND (cohead.cohead_id = coitem.coitem_cohead_id)) AND (coitem.coitem_id = public.getcoitemid((old.order_number)::text, old.line_number))) AND (coitem.coitem_itemsite_id = itemsite.itemsite_id)) AND (item.item_id = itemsite.itemsite_item_id)) AND (charass.charass_target_type = 'I'::text)) AND (charass.charass_target_id = item.item_id)) AND ("char".char_id = charass.charass_char_id)) AND ("char".char_name = old.characteristic));


--
-- TOC entry 8872 (class 2618 OID 146572127)
-- Dependencies: 382 382 382 8894
-- Name: _UPDATE; Type: RULE; Schema: api; Owner: admin
--

CREATE RULE "_UPDATE" AS ON UPDATE TO saleslinecomment DO INSTEAD NOTHING;


--
-- TOC entry 8873 (class 2618 OID 146572128)
-- Dependencies: 383 383 383 383 383 383 383 383 383 383 383 383 383 383 383 383 383 383 383 383 383 383 383 383 383 383 383 383 383 383 383 383 383 383 383 383 383 383 383 383 383 383 383 383 383 383 383 383 383 383 383 383 383 383 383 383 383 383 383 383 383 383 383 383 383 383 195 1780 1769 1768 1759 1756 1754 1753 1751 1749 1736 1700 1682 1681 1672 1670 1652 383 8894
-- Name: _UPDATE; Type: RULE; Schema: api; Owner: admin
--

CREATE RULE "_UPDATE" AS ON UPDATE TO salesorder DO INSTEAD UPDATE public.cohead SET cohead_number = old.order_number, cohead_cust_id = public.getcustid(new.customer_number), cohead_custponumber = new.cust_po_number, cohead_orderdate = new.order_date, cohead_warehous_id = public.getwarehousid(new.site, 'SHIPPING'::text), cohead_shipto_id = public.getshiptoid(new.customer_number, new.shipto_number), cohead_shiptoname = new.shipto_name, cohead_shiptoaddress1 = new.shipto_address1, cohead_shiptoaddress2 = new.shipto_address2, cohead_shiptoaddress3 = new.shipto_address3, cohead_salesrep_id = public.getsalesrepid(new.sales_rep), cohead_terms_id = public.gettermsid(new.terms), cohead_fob = new.fob, cohead_shipvia = new.ship_via, cohead_shiptocity = new.shipto_city, cohead_shiptostate = new.shipto_state, cohead_shiptozipcode = new.shipto_postal_code, cohead_freight = CASE WHEN new.calculate_freight THEN COALESCE((SELECT sum(freightdetail.freightdata_total) AS sum FROM public.freightdetail('SO'::text, public.getcoheadid((old.order_number)::text), public.getcustid(new.customer_number), public.getshiptoid(new.customer_number, new.shipto_number), new.order_date, new.ship_via, public.getcurrid((new.currency)::text)) freightdetail(freightdata_schedule, freightdata_from, freightdata_to, freightdata_shipvia, freightdata_freightclass, freightdata_weight, freightdata_uom, freightdata_price, freightdata_type, freightdata_total, freightdata_currency)), (0)::numeric) ELSE new.freight END, cohead_calcfreight = new.calculate_freight, cohead_misc = new.misc_charge, cohead_ordercomments = new.order_notes, cohead_shipcomments = new.shipping_notes, cohead_shiptophone = new.shipto_phone, cohead_shipchrg_id = public.getshipchrgid(new.shipping_chgs), cohead_shipform_id = public.getshipformid(new.shipping_form), cohead_billtoname = new.billto_name, cohead_billtoaddress1 = new.billto_address1, cohead_billtoaddress2 = new.billto_address2, cohead_billtoaddress3 = new.billto_address3, cohead_billtocity = new.billto_city, cohead_billtostate = new.billto_state, cohead_billtozipcode = new.billto_postal_code, cohead_misc_accnt_id = public.getglaccntid(new.misc_account_number), cohead_misc_descrip = new.misc_charge_description, cohead_commission = new.commission, cohead_holdtype = CASE WHEN (new.hold_type = 'Credit'::text) THEN 'C'::text WHEN (new.hold_type = 'Shipping'::text) THEN 'S'::text WHEN (new.hold_type = 'Packing'::text) THEN 'P'::text ELSE 'N'::text END, cohead_packdate = new.pack_date, cohead_prj_id = public.getprjid(new.project_number), cohead_shipcomplete = new.ship_complete, cohead_billtocountry = new.billto_country, cohead_shiptocountry = new.shipto_country, cohead_curr_id = public.getcurrid((new.currency)::text), cohead_taxzone_id = public.gettaxzoneid(new.tax_zone), cohead_lastupdated = ('now'::text)::timestamp(6) with time zone, cohead_shipto_cntct_id = public.getcntctid(new.shipto_contact_number), cohead_shipto_cntct_honorific = new.shipto_contact_honorific, cohead_shipto_cntct_first_name = new.shipto_contact_first, cohead_shipto_cntct_middle = new.shipto_contact_middle, cohead_shipto_cntct_last_name = new.shipto_contact_last, cohead_shipto_cntct_suffix = new.shipto_contact_suffix, cohead_shipto_cntct_phone = new.shipto_contact_phone, cohead_shipto_cntct_title = new.shipto_contact_title, cohead_shipto_cntct_fax = new.shipto_contact_fax, cohead_shipto_cntct_email = new.shipto_contact_email, cohead_billto_cntct_id = public.getcntctid(new.billto_contact_number), cohead_billto_cntct_honorific = new.billto_contact_name, cohead_billto_cntct_first_name = new.billto_contact_first, cohead_billto_cntct_middle = new.billto_contact_middle, cohead_billto_cntct_last_name = new.billto_contact_last, cohead_billto_cntct_suffix = new.billto_contact_suffix, cohead_billto_cntct_phone = new.billto_contact_phone, cohead_billto_cntct_title = new.billto_contact_title, cohead_billto_cntct_fax = new.billto_contct_fax, cohead_billto_cntct_email = new.billto_contact_email, cohead_saletype_id = public.getsaletypeid(new.sale_type), cohead_shipzone_id = public.getshipzoneid(new.shipto_shipzone) WHERE (cohead.cohead_number = (old.order_number)::text);


--
-- TOC entry 8874 (class 2618 OID 146572130)
-- Dependencies: 384 384 384 8894
-- Name: _UPDATE; Type: RULE; Schema: api; Owner: admin
--

CREATE RULE "_UPDATE" AS ON UPDATE TO salesordercomment DO INSTEAD NOTHING;


--
-- TOC entry 8875 (class 2618 OID 146572131)
-- Dependencies: 385 385 385 385 385 385 216 1690 385 8894
-- Name: _UPDATE; Type: RULE; Schema: api; Owner: admin
--

CREATE RULE "_UPDATE" AS ON UPDATE TO salesrep DO INSTEAD UPDATE public.salesrep SET salesrep_active = new.active, salesrep_number = new.number, salesrep_name = new.name, salesrep_commission = (new.commission_percent * 0.01), salesrep_emp_id = public.getempid(new.employee) WHERE (salesrep.salesrep_number = (old.number)::text);


--
-- TOC entry 8876 (class 2618 OID 146572132)
-- Dependencies: 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 193 2162 2158 1780 1768 1760 1758 1754 1700 1678 1670 1658 388 8894
-- Name: _UPDATE; Type: RULE; Schema: api; Owner: admin
--

CREATE RULE "_UPDATE" AS ON UPDATE TO site DO INSTEAD UPDATE public.whsinfo SET warehous_descrip = new.description, warehous_fob = CASE WHEN new.inventory_type THEN new.default_fob ELSE NULL::text END, warehous_active = new.active, warehous_counttag_prefix = CASE WHEN new.inventory_type THEN new.next_count_tag_prefix ELSE NULL::text END, warehous_counttag_number = CASE WHEN new.inventory_type THEN new.next_count_tag_number ELSE NULL::integer END, warehous_bol_prefix = CASE WHEN new.inventory_type THEN new.next_bill_of_lading_prefix ELSE NULL::text END, warehous_bol_number = CASE WHEN new.inventory_type THEN new.next_bill_of_lading_number ELSE NULL::integer END, warehous_shipping = CASE WHEN new.inventory_type THEN new.shipping_site ELSE NULL::boolean END, warehous_useslips = CASE WHEN new.inventory_type THEN new.force_the_use_of_count_slips ELSE NULL::boolean END, warehous_usezones = CASE WHEN new.inventory_type THEN new.force_the_use_of_zones ELSE NULL::boolean END, warehous_aislesize = CASE WHEN new.inventory_type THEN new.aisle_size ELSE NULL::integer END, warehous_aislealpha = CASE WHEN new.inventory_type THEN new.aisle_allow_alpha_characters ELSE NULL::boolean END, warehous_racksize = CASE WHEN new.inventory_type THEN new.rack_size ELSE NULL::integer END, warehous_rackalpha = CASE WHEN new.inventory_type THEN new.rack_allow_alpha_characters ELSE NULL::boolean END, warehous_binsize = CASE WHEN new.inventory_type THEN new.bin_size ELSE NULL::integer END, warehous_binalpha = CASE WHEN new.inventory_type THEN new.bin_allow_alpha_characters ELSE NULL::boolean END, warehous_locationsize = CASE WHEN new.inventory_type THEN new.location_size ELSE NULL::integer END, warehous_locationalpha = CASE WHEN new.inventory_type THEN new.location_allow_alpha_characters ELSE NULL::boolean END, warehous_enforcearbl = CASE WHEN new.inventory_type THEN new.enforce_arbl_naming_convention ELSE NULL::boolean END, warehous_default_accnt_id = public.getglaccntid(new.post_unassigned_transactions_to), warehous_shipping_commission = CASE WHEN new.inventory_type THEN (new.shipping_commission * 0.01) ELSE NULL::numeric END, warehous_cntct_id = public.savecntct(public.getcntctid(new.contact_number), new.contact_number, NULL::integer, new.honorific, new.first, new.middle, new.last, new.suffix, new.phone, NULL::text, new.fax, new.email, NULL::text, new.job_title, new.contact_change), warehous_addr_id = public.saveaddr(public.getaddrid(new.address_number), new.address_number, new.address1, new.address2, new.address3, new.city, new.state, new.postal_code, new.country, new.address_change), warehous_taxzone_id = CASE WHEN new.inventory_type THEN public.gettaxzoneid(new.tax_zone) ELSE NULL::integer END, warehous_transit = CASE WHEN new.inventory_type THEN false WHEN new.transit_type THEN true ELSE NULL::boolean END, warehous_shipform_id = CASE WHEN new.transit_type THEN public.getshipformid(new.default_shipping_form) ELSE NULL::integer END, warehous_shipvia_id = CASE WHEN new.transit_type THEN public.getshipviaid(new.default_ship_via) ELSE NULL::integer END, warehous_shipcomments = CASE WHEN new.transit_type THEN new.shipping_comments ELSE NULL::text END, warehous_costcat_id = CASE WHEN new.transit_type THEN public.getcostcatid(new.default_cost_category) ELSE NULL::integer END, warehous_sitetype_id = public.getsitetypeid(new.type), warehous_sequence = new.scheduling_sequence WHERE (whsinfo.warehous_id = public.getwarehousid((old.code)::text, 'ALL'::text));


--
-- TOC entry 8877 (class 2618 OID 146572134)
-- Dependencies: 389 389 389 389 343 343 1780 389 8894
-- Name: _UPDATE; Type: RULE; Schema: api; Owner: admin
--

CREATE RULE "_UPDATE" AS ON UPDATE TO sitezone DO INSTEAD UPDATE public.whsezone SET whsezone_descrip = new.description WHERE ((whsezone.whsezone_warehous_id = public.getwarehousid((old.site)::text, 'ACTIVE'::text)) AND (whsezone.whsezone_name = (old.name)::text));


--
-- TOC entry 8878 (class 2618 OID 146572135)
-- Dependencies: 390 390 390 390 390 390 390 390 390 390 390 390 390 390 390 390 232 232 1736 390 8894
-- Name: _UPDATE; Type: RULE; Schema: api; Owner: admin
--

CREATE RULE "_UPDATE" AS ON UPDATE TO task DO INSTEAD UPDATE public.prjtask SET prjtask_name = new.name, prjtask_descrip = new.description, prjtask_owner_username = new.owner, prjtask_username = new.assigned_to, prjtask_hours_budget = new.hours_budgeted, prjtask_hours_actual = new.hours_actual, prjtask_exp_budget = new.expenses_budgeted, prjtask_exp_actual = new.expenses_actual, prjtask_status = CASE WHEN (new.status = 'In-Process'::text) THEN 'O'::text WHEN (new.status = 'Completed'::text) THEN 'C'::text ELSE 'P'::text END, prjtask_due_date = new.due, prjtask_assigned_date = new.assigned, prjtask_start_date = new.started, prjtask_completed_date = new.completed WHERE ((prjtask.prjtask_prj_id = public.getprjid(old.project_number)) AND (prjtask.prjtask_number = old.number));


--
-- TOC entry 8879 (class 2618 OID 146572137)
-- Dependencies: 391 391 391 8894
-- Name: _UPDATE; Type: RULE; Schema: api; Owner: admin
--

CREATE RULE "_UPDATE" AS ON UPDATE TO taskcomment DO INSTEAD NOTHING;


--
-- TOC entry 8880 (class 2618 OID 146572138)
-- Dependencies: 392 392 392 392 392 392 392 392 392 392 392 392 392 392 392 392 392 2310 1724 1708 1705 1704 1680 392 8894
-- Name: _UPDATE; Type: RULE; Schema: api; Owner: admin
--

CREATE RULE "_UPDATE" AS ON UPDATE TO todo DO INSTEAD SELECT public.updatetodoitem(old.task_number, old.assigned_to, new.task_name, new.description, public.getincidentid(new.incident), COALESCE(public.getincdtcrmacctid(new.incident), public.getcrmacctid(new.account)), public.getopheadid(new.opportunity), CASE WHEN (new.date_started > ''::text) THEN (new.date_started)::date ELSE NULL::date END, CASE WHEN (new.date_due > ''::text) THEN (new.date_due)::date ELSE NULL::date END, (CASE WHEN (new.status = 'Pending Input'::text) THEN 'P'::text WHEN (new.status = 'Deferred'::text) THEN 'D'::text WHEN (new.status = 'Neither'::text) THEN 'N'::text ELSE NULL::text END)::bpchar, CASE WHEN (new.date_assigned > ''::text) THEN (new.date_assigned)::date ELSE NULL::date END, CASE WHEN (new.date_completed > ''::text) THEN (new.date_completed)::date ELSE NULL::date END, public.getincdtpriorityid(new.priority), new.notes, new.active, new.owner) AS updatetodoitem;


--
-- TOC entry 8881 (class 2618 OID 146572140)
-- Dependencies: 394 394 394 394 394 394 394 394 394 394 394 394 394 394 394 394 394 394 394 394 394 394 394 394 394 394 394 394 394 394 394 394 394 394 394 394 394 394 394 394 394 394 394 394 394 394 394 394 394 394 394 394 394 394 394 394 394 394 394 394 394 394 210 2162 2158 1779 1778 1769 1768 1766 1700 1691 1681 1670 1658 394 8894
-- Name: _UPDATE; Type: RULE; Schema: api; Owner: admin
--

CREATE RULE "_UPDATE" AS ON UPDATE TO vendor DO INSTEAD UPDATE public.vendinfo SET vend_name = new.vendor_name, vend_active = new.active, vend_po = new.sells_purchase_order_items, vend_comments = new.notes, vend_pocomments = new.po_comments, vend_1099 = new.receives_1099, vend_fobsource = CASE WHEN (new.default_fob IS NULL) THEN NULL::text WHEN (new.default_fob = 'Receiving Site'::text) THEN 'W'::text ELSE 'V'::text END, vend_fob = CASE WHEN (new.default_fob IS NULL) THEN NULL::text WHEN (new.default_fob = 'Receiving Site'::text) THEN ''::text ELSE new.default_fob END, vend_terms_id = public.gettermsid(new.default_terms), vend_shipvia = new.ship_via, vend_vendtype_id = public.getvendtypeid(new.vendor_type), vend_qualified = new.qualified, vend_ediemail = new.po_edi_email, vend_ediemailbody = new.po_edi_emailbody, vend_edisubject = new.po_edi_subject, vend_edifilename = new.po_edi_filename, vend_accntnum = new.account_number, vend_emailpodelivery = new.allow_email_po_delivery, vend_restrictpurch = new.may_only_sell_item_source, vend_edicc = new.po_edi_cc, vend_curr_id = public.getcurrid((new.default_currency)::text), vend_cntct1_id = public.savecntct(public.getcntctid(new.contact1_number), new.contact1_number, NULL::integer, new.contact1_honorific, new.contact1_first, new.contact1_middle, new.contact1_last, new.contact1_suffix, new.contact1_voice, new.contact1_alternate, new.contact1_fax, new.contact1_email, new.contact1_web, new.contact1_job_title, new.contact1_change), vend_cntct2_id = public.savecntct(public.getcntctid(new.contact2_number), new.contact2_number, NULL::integer, new.contact2_honorific, new.contact2_first, new.contact2_middle, new.contact2_last, new.contact2_suffix, new.contact2_voice, new.contact2_alternate, new.contact2_fax, new.contact2_email, new.contact2_web, new.contact2_job_title, new.contact2_change), vend_addr_id = public.saveaddr(public.getaddrid(new.address_number), new.address_number, new.address1, new.address2, new.address3, new.city, new.state, new.postalcode, new.country, new.address_change), vend_match = new.matching_vo_po_amounts, vend_taxzone_id = public.gettaxzoneid(new.default_tax_zone), vend_accnt_id = COALESCE(public.getglaccntid(NULLIF(new.default_dist_gl_account, 'N/A'::text)), (-1)), vend_expcat_id = COALESCE(public.getexpcatid(NULLIF(new.default_dist_expense_category, 'N/A'::text)), (-1)), vend_tax_id = COALESCE(public.gettaxid(NULLIF(new.default_dist_tax_code, 'N/A'::text)), (-1)) WHERE (vendinfo.vend_id = public.getvendid((old.vendor_number)::text));


--
-- TOC entry 8882 (class 2618 OID 146572142)
-- Dependencies: 395 395 395 395 395 395 395 395 395 395 395 395 395 395 395 395 395 395 395 395 395 395 395 395 395 395 395 364 2162 2158 1778 1777 1670 1658 395 8894
-- Name: _UPDATE; Type: RULE; Schema: api; Owner: admin
--

CREATE RULE "_UPDATE" AS ON UPDATE TO vendoraddress DO INSTEAD UPDATE public.vendaddrinfo SET vendaddr_vend_id = public.getvendid((new.vendor_number)::text), vendaddr_code = new.vendor_address_number, vendaddr_name = new.vendor_address_name, vendaddr_comments = new.notes, vendaddr_cntct_id = public.savecntct(public.getcntctid(new.contact_number), new.contact_number, public.saveaddr(public.getaddrid(new.address_number), new.address_number, new.address1, new.address2, new.address3, new.city, new.state, new.postalcode, new.country, new.address_change), new.contact_honorific, new.contact_first, new.contact_middle, new.contact_last, new.contact_suffix, new.contact_voice, new.contact_alternate, new.contact_fax, new.contact_email, new.contact_web, new.contact_job_title, new.contact_change), vendaddr_addr_id = public.saveaddr(public.getaddrid(new.address_number), new.address_number, new.address1, new.address2, new.address3, new.city, new.state, new.postalcode, new.country, new.address_change) WHERE (vendaddrinfo.vendaddr_id = public.getvendaddrid((old.vendor_number)::text, (old.vendor_address_number)::text));


--
-- TOC entry 8883 (class 2618 OID 146572144)
-- Dependencies: 396 396 396 393 396 8894
-- Name: _UPDATE; Type: RULE; Schema: api; Owner: admin
--

CREATE RULE "_UPDATE" AS ON UPDATE TO vendortype DO INSTEAD UPDATE public.vendtype SET vendtype_code = new.code, vendtype_descrip = new.description WHERE (vendtype.vendtype_code = (old.code)::text);



--
-- TOC entry 8884 (class 2618 OID 146572145)
-- Dependencies: 245 245 245 8894
-- Name: _DELETE; Type: RULE; Schema: public; Owner: admin
--

CREATE RULE "_DELETE" AS ON DELETE TO url DO INSTEAD NOTHING;


--
-- TOC entry 8885 (class 2618 OID 146572146)
-- Dependencies: 245 245 245 1397 245 8894
-- Name: _DELETE_FILE; Type: RULE; Schema: public; Owner: admin
--

CREATE RULE "_DELETE_FILE" AS ON DELETE TO url WHERE (old.url_stream IS NOT NULL) DO INSTEAD SELECT deletefile(old.url_id) AS deletefile;


--
-- TOC entry 8886 (class 2618 OID 146572147)
-- Dependencies: 245 245 245 1474 245 8894
-- Name: _DELETE_URL; Type: RULE; Schema: public; Owner: admin
--

CREATE RULE "_DELETE_URL" AS ON DELETE TO url WHERE (old.url_stream IS NULL) DO INSTEAD SELECT deleteurl(old.url_id) AS deleteurl;


--
-- TOC entry 8887 (class 2618 OID 146572148)
-- Dependencies: 245 245 245 8894
-- Name: _INSERT; Type: RULE; Schema: public; Owner: admin
--

CREATE RULE "_INSERT" AS ON INSERT TO url DO INSTEAD NOTHING;


--
-- TOC entry 8888 (class 2618 OID 146572149)
-- Dependencies: 245 245 247 245 245 245 245 245 245 242 1331 245 8894
-- Name: _INSERT_FILE; Type: RULE; Schema: public; Owner: admin
--

CREATE RULE "_INSERT_FILE" AS ON INSERT TO url WHERE (new.url_stream IS NOT NULL) DO INSTEAD INSERT INTO docass (docass_id, docass_source_id, docass_source_type, docass_target_id, docass_target_type, docass_purpose) VALUES (COALESCE((new.url_id)::bigint, nextval('docass_docass_id_seq'::regclass)), new.url_source_id, new.url_source, createfile(new.url_title, new.url_url, new.url_stream), 'FILE'::text, 'S'::bpchar);


--
-- TOC entry 8889 (class 2618 OID 146572150)
-- Dependencies: 245 245 247 245 245 245 245 245 242 1353 245 8894
-- Name: _INSERT_URL; Type: RULE; Schema: public; Owner: admin
--

CREATE RULE "_INSERT_URL" AS ON INSERT TO url WHERE (new.url_stream IS NULL) DO INSTEAD INSERT INTO docass (docass_id, docass_source_id, docass_source_type, docass_target_id, docass_target_type, docass_purpose) VALUES (COALESCE((new.url_id)::bigint, nextval('docass_docass_id_seq'::regclass)), new.url_source_id, new.url_source, createurl(new.url_title, new.url_url), 'URL'::text, 'S'::bpchar);


--
-- TOC entry 8890 (class 2618 OID 146572151)
-- Dependencies: 245 245 245 8894
-- Name: _UPDATE; Type: RULE; Schema: public; Owner: admin
--

CREATE RULE "_UPDATE" AS ON UPDATE TO url DO INSTEAD NOTHING;


--
-- TOC entry 8891 (class 2618 OID 146572152)
-- Dependencies: 245 245 245 245 245 243 242 242 242 245 8894
-- Name: _UPDATE_FILE; Type: RULE; Schema: public; Owner: admin
--

CREATE RULE "_UPDATE_FILE" AS ON UPDATE TO url WHERE (new.url_stream IS NOT NULL) DO INSTEAD UPDATE file SET file_title = new.url_title, file_stream = new.url_stream FROM docass WHERE (((docass.docass_id = old.url_id) AND (docass.docass_target_id = file.file_id)) AND (docass.docass_target_type = 'FILE'::text));


--
-- TOC entry 8892 (class 2618 OID 146572153)
-- Dependencies: 245 245 245 245 245 244 242 242 242 245 8894
-- Name: _UPDATE_URL; Type: RULE; Schema: public; Owner: admin
--

CREATE RULE "_UPDATE_URL" AS ON UPDATE TO url WHERE (new.url_stream IS NULL) DO INSTEAD UPDATE urlinfo SET url_title = new.url_title, url_url = new.url_url FROM docass WHERE (((docass.docass_id = old.url_id) AND (docass.docass_target_id = urlinfo.url_id)) AND (docass.docass_target_type = 'URL'::text));



--
-- TOC entry 8256 (class 2620 OID 146572154)
-- Dependencies: 399 1008 8894
-- Name: pkgcmdaftertrigger; Type: TRIGGER; Schema: fixcountry; Owner: admin
--

CREATE TRIGGER pkgcmdaftertrigger AFTER INSERT OR DELETE OR UPDATE ON pkgcmd FOR EACH ROW EXECUTE PROCEDURE public._pkgcmdaftertrigger();


--
-- TOC entry 8257 (class 2620 OID 146572155)
-- Dependencies: 399 1009 8894
-- Name: pkgcmdaltertrigger; Type: TRIGGER; Schema: fixcountry; Owner: admin
--

CREATE TRIGGER pkgcmdaltertrigger BEFORE INSERT OR DELETE OR UPDATE ON pkgcmd FOR EACH ROW EXECUTE PROCEDURE public._pkgcmdaltertrigger();


--
-- TOC entry 8259 (class 2620 OID 146572156)
-- Dependencies: 402 1010 8894
-- Name: pkgcmdargaftertrigger; Type: TRIGGER; Schema: fixcountry; Owner: admin
--

CREATE TRIGGER pkgcmdargaftertrigger AFTER INSERT OR DELETE OR UPDATE ON pkgcmdarg FOR EACH ROW EXECUTE PROCEDURE public._pkgcmdargaftertrigger();


--
-- TOC entry 8260 (class 2620 OID 146572157)
-- Dependencies: 402 1012 8894
-- Name: pkgcmdargaltertrigger; Type: TRIGGER; Schema: fixcountry; Owner: admin
--

CREATE TRIGGER pkgcmdargaltertrigger BEFORE INSERT OR DELETE OR UPDATE ON pkgcmdarg FOR EACH ROW EXECUTE PROCEDURE public._pkgcmdargaltertrigger();


--
-- TOC entry 8261 (class 2620 OID 146572158)
-- Dependencies: 402 1013 8894
-- Name: pkgcmdargbeforetrigger; Type: TRIGGER; Schema: fixcountry; Owner: admin
--

CREATE TRIGGER pkgcmdargbeforetrigger BEFORE INSERT OR DELETE OR UPDATE ON pkgcmdarg FOR EACH ROW EXECUTE PROCEDURE public._pkgcmdargbeforetrigger();


--
-- TOC entry 8258 (class 2620 OID 146572159)
-- Dependencies: 399 1014 8894
-- Name: pkgcmdbeforetrigger; Type: TRIGGER; Schema: fixcountry; Owner: admin
--

CREATE TRIGGER pkgcmdbeforetrigger BEFORE INSERT OR DELETE OR UPDATE ON pkgcmd FOR EACH ROW EXECUTE PROCEDURE public._pkgcmdbeforetrigger();


--
-- TOC entry 8262 (class 2620 OID 146572160)
-- Dependencies: 404 1016 8894
-- Name: pkgimageaftertrigger; Type: TRIGGER; Schema: fixcountry; Owner: admin
--

CREATE TRIGGER pkgimageaftertrigger AFTER INSERT OR DELETE OR UPDATE ON pkgimage FOR EACH ROW EXECUTE PROCEDURE public._pkgimageaftertrigger();


--
-- TOC entry 8263 (class 2620 OID 146572161)
-- Dependencies: 404 1017 8894
-- Name: pkgimagealtertrigger; Type: TRIGGER; Schema: fixcountry; Owner: admin
--

CREATE TRIGGER pkgimagealtertrigger BEFORE INSERT OR DELETE OR UPDATE ON pkgimage FOR EACH ROW EXECUTE PROCEDURE public._pkgimagealtertrigger();


--
-- TOC entry 8264 (class 2620 OID 146572162)
-- Dependencies: 404 1018 8894
-- Name: pkgimagebeforetrigger; Type: TRIGGER; Schema: fixcountry; Owner: admin
--

CREATE TRIGGER pkgimagebeforetrigger BEFORE INSERT OR DELETE OR UPDATE ON pkgimage FOR EACH ROW EXECUTE PROCEDURE public._pkgimagebeforetrigger();


--
-- TOC entry 8267 (class 2620 OID 146572163)
-- Dependencies: 407 1020 8894
-- Name: pkgmetasqlaftertrigger; Type: TRIGGER; Schema: fixcountry; Owner: admin
--

CREATE TRIGGER pkgmetasqlaftertrigger AFTER INSERT OR DELETE OR UPDATE ON pkgmetasql FOR EACH ROW EXECUTE PROCEDURE public._pkgmetasqlaftertrigger();


--
-- TOC entry 8268 (class 2620 OID 146572164)
-- Dependencies: 407 1022 8894
-- Name: pkgmetasqlaltertrigger; Type: TRIGGER; Schema: fixcountry; Owner: admin
--

CREATE TRIGGER pkgmetasqlaltertrigger BEFORE INSERT OR DELETE OR UPDATE ON pkgmetasql FOR EACH ROW EXECUTE PROCEDURE public._pkgmetasqlaltertrigger();


--
-- TOC entry 8269 (class 2620 OID 146572165)
-- Dependencies: 407 1023 8894
-- Name: pkgmetasqlbeforetrigger; Type: TRIGGER; Schema: fixcountry; Owner: admin
--

CREATE TRIGGER pkgmetasqlbeforetrigger BEFORE INSERT OR DELETE OR UPDATE ON pkgmetasql FOR EACH ROW EXECUTE PROCEDURE public._pkgmetasqlbeforetrigger();


--
-- TOC entry 8270 (class 2620 OID 146572166)
-- Dependencies: 410 1024 8894
-- Name: pkgprivaftertrigger; Type: TRIGGER; Schema: fixcountry; Owner: admin
--

CREATE TRIGGER pkgprivaftertrigger AFTER INSERT OR DELETE OR UPDATE ON pkgpriv FOR EACH ROW EXECUTE PROCEDURE public._pkgprivaftertrigger();


--
-- TOC entry 8271 (class 2620 OID 146572167)
-- Dependencies: 410 1025 8894
-- Name: pkgprivaltertrigger; Type: TRIGGER; Schema: fixcountry; Owner: admin
--

CREATE TRIGGER pkgprivaltertrigger BEFORE INSERT OR DELETE OR UPDATE ON pkgpriv FOR EACH ROW EXECUTE PROCEDURE public._pkgprivaltertrigger();


--
-- TOC entry 8272 (class 2620 OID 146572168)
-- Dependencies: 410 1026 8894
-- Name: pkgprivbeforetrigger; Type: TRIGGER; Schema: fixcountry; Owner: admin
--

CREATE TRIGGER pkgprivbeforetrigger BEFORE INSERT OR DELETE OR UPDATE ON pkgpriv FOR EACH ROW EXECUTE PROCEDURE public._pkgprivbeforetrigger();


--
-- TOC entry 8274 (class 2620 OID 146572169)
-- Dependencies: 413 1027 8894
-- Name: pkgreportaftertrigger; Type: TRIGGER; Schema: fixcountry; Owner: admin
--

CREATE TRIGGER pkgreportaftertrigger AFTER INSERT OR DELETE OR UPDATE ON pkgreport FOR EACH ROW EXECUTE PROCEDURE public._pkgreportaftertrigger();


--
-- TOC entry 8275 (class 2620 OID 146572170)
-- Dependencies: 413 1028 8894
-- Name: pkgreportaltertrigger; Type: TRIGGER; Schema: fixcountry; Owner: admin
--

CREATE TRIGGER pkgreportaltertrigger BEFORE INSERT OR DELETE OR UPDATE ON pkgreport FOR EACH ROW EXECUTE PROCEDURE public._pkgreportaltertrigger();


--
-- TOC entry 8276 (class 2620 OID 146572171)
-- Dependencies: 413 1029 8894
-- Name: pkgreportbeforetrigger; Type: TRIGGER; Schema: fixcountry; Owner: admin
--

CREATE TRIGGER pkgreportbeforetrigger BEFORE INSERT OR DELETE OR UPDATE ON pkgreport FOR EACH ROW EXECUTE PROCEDURE public._pkgreportbeforetrigger();


--
-- TOC entry 8277 (class 2620 OID 146572172)
-- Dependencies: 416 959 8894
-- Name: pkgscriptaftertrigger; Type: TRIGGER; Schema: fixcountry; Owner: admin
--

CREATE TRIGGER pkgscriptaftertrigger AFTER INSERT OR DELETE OR UPDATE ON pkgscript FOR EACH ROW EXECUTE PROCEDURE public._pkgscriptaftertrigger();


--
-- TOC entry 8278 (class 2620 OID 146572173)
-- Dependencies: 416 983 8894
-- Name: pkgscriptaltertrigger; Type: TRIGGER; Schema: fixcountry; Owner: admin
--

CREATE TRIGGER pkgscriptaltertrigger BEFORE INSERT OR DELETE OR UPDATE ON pkgscript FOR EACH ROW EXECUTE PROCEDURE public._pkgscriptaltertrigger();


--
-- TOC entry 8279 (class 2620 OID 146572174)
-- Dependencies: 416 1003 8894
-- Name: pkgscriptbeforetrigger; Type: TRIGGER; Schema: fixcountry; Owner: admin
--

CREATE TRIGGER pkgscriptbeforetrigger BEFORE INSERT OR DELETE OR UPDATE ON pkgscript FOR EACH ROW EXECUTE PROCEDURE public._pkgscriptbeforetrigger();


--
-- TOC entry 8280 (class 2620 OID 146572175)
-- Dependencies: 419 1011 8894
-- Name: pkguiformaftertrigger; Type: TRIGGER; Schema: fixcountry; Owner: admin
--

CREATE TRIGGER pkguiformaftertrigger AFTER INSERT OR DELETE OR UPDATE ON pkguiform FOR EACH ROW EXECUTE PROCEDURE public._pkguiformaftertrigger();


--
-- TOC entry 8281 (class 2620 OID 146572176)
-- Dependencies: 419 1021 8894
-- Name: pkguiformaltertrigger; Type: TRIGGER; Schema: fixcountry; Owner: admin
--

CREATE TRIGGER pkguiformaltertrigger BEFORE INSERT OR DELETE OR UPDATE ON pkguiform FOR EACH ROW EXECUTE PROCEDURE public._pkguiformaltertrigger();


--
-- TOC entry 8282 (class 2620 OID 146572177)
-- Dependencies: 419 945 8894
-- Name: pkguiformbeforetrigger; Type: TRIGGER; Schema: fixcountry; Owner: admin
--

CREATE TRIGGER pkguiformbeforetrigger BEFORE INSERT OR DELETE OR UPDATE ON pkguiform FOR EACH ROW EXECUTE PROCEDURE public._pkguiformbeforetrigger();



--
-- TOC entry 8206 (class 2620 OID 146572178)
-- Dependencies: 262 914 8894
-- Name: accntdeletetrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER accntdeletetrigger BEFORE DELETE ON accnt FOR EACH ROW EXECUTE PROCEDURE _accntdeletetrigger();


--
-- TOC entry 8207 (class 2620 OID 146572179)
-- Dependencies: 262 915 8894
-- Name: accnttrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER accnttrigger BEFORE INSERT OR UPDATE ON accnt FOR EACH ROW EXECUTE PROCEDURE _accnttrigger();


--
-- TOC entry 8208 (class 2620 OID 146572180)
-- Dependencies: 262 916 8894
-- Name: accntuniquetrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER accntuniquetrigger BEFORE INSERT ON accnt FOR EACH ROW EXECUTE PROCEDURE _accntuniquetrigger();


--
-- TOC entry 8197 (class 2620 OID 146572181)
-- Dependencies: 234 917 8894
-- Name: addrtrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER addrtrigger BEFORE INSERT OR DELETE OR UPDATE ON addr FOR EACH ROW EXECUTE PROCEDURE _addrtrigger();


--
-- TOC entry 8283 (class 2620 OID 146572182)
-- Dependencies: 424 918 8894
-- Name: alarmbeforetrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER alarmbeforetrigger BEFORE INSERT ON alarm FOR EACH ROW EXECUTE PROCEDURE _alarmbeforetrigger();


--
-- TOC entry 8284 (class 2620 OID 146572183)
-- Dependencies: 428 919 8894
-- Name: apapplytrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER apapplytrigger BEFORE INSERT OR UPDATE ON apapply FOR EACH ROW EXECUTE PROCEDURE _apapplytrigger();


--
-- TOC entry 8163 (class 2620 OID 146572184)
-- Dependencies: 207 920 8894
-- Name: apopentrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER apopentrigger BEFORE INSERT OR UPDATE ON apopen FOR EACH ROW EXECUTE PROCEDURE _apopentrigger();


--
-- TOC entry 8286 (class 2620 OID 146572185)
-- Dependencies: 443 913 8894
-- Name: arapplytrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER arapplytrigger BEFORE INSERT OR UPDATE ON arapply FOR EACH ROW EXECUTE PROCEDURE _arapplytrigger();


--
-- TOC entry 8170 (class 2620 OID 146572186)
-- Dependencies: 212 903 8894
-- Name: aropenaftertrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER aropenaftertrigger AFTER INSERT OR UPDATE ON aropen FOR EACH ROW EXECUTE PROCEDURE _aropenaftertrigger();


--
-- TOC entry 8171 (class 2620 OID 146572187)
-- Dependencies: 212 904 8894
-- Name: aropentrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER aropentrigger BEFORE INSERT OR UPDATE ON aropen FOR EACH ROW EXECUTE PROCEDURE _aropentrigger();


--
-- TOC entry 8204 (class 2620 OID 146572188)
-- Dependencies: 254 921 8894
-- Name: bomheadtrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER bomheadtrigger AFTER INSERT OR DELETE OR UPDATE ON bomhead FOR EACH ROW EXECUTE PROCEDURE _bomheadtrigger();


--
-- TOC entry 8152 (class 2620 OID 146572189)
-- Dependencies: 203 922 8894
-- Name: bomitemaftertrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER bomitemaftertrigger AFTER INSERT OR UPDATE ON bomitem FOR EACH ROW EXECUTE PROCEDURE _bomitemaftertrigger();


--
-- TOC entry 8153 (class 2620 OID 146572190)
-- Dependencies: 203 923 8894
-- Name: bomitembeforedeletetrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER bomitembeforedeletetrigger BEFORE DELETE ON bomitem FOR EACH ROW EXECUTE PROCEDURE _bomitembeforedeletetrigger();


--
-- TOC entry 8154 (class 2620 OID 146572191)
-- Dependencies: 203 924 8894
-- Name: bomitembeforetrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER bomitembeforetrigger BEFORE INSERT OR UPDATE ON bomitem FOR EACH ROW EXECUTE PROCEDURE _bomitembeforetrigger();


--
-- TOC entry 8205 (class 2620 OID 146572192)
-- Dependencies: 258 925 8894
-- Name: bomitemsubtrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER bomitemsubtrigger BEFORE INSERT OR DELETE OR UPDATE ON bomitemsub FOR EACH ROW EXECUTE PROCEDURE _bomitemsubtrigger();


--
-- TOC entry 8211 (class 2620 OID 146572193)
-- Dependencies: 269 926 8894
-- Name: cashrcptitemaftertrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER cashrcptitemaftertrigger AFTER INSERT OR UPDATE ON cashrcptitem FOR EACH ROW EXECUTE PROCEDURE _cashrcptitemaftertrigger();


--
-- TOC entry 8212 (class 2620 OID 146572194)
-- Dependencies: 269 927 8894
-- Name: cashrcptitemtrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER cashrcptitemtrigger BEFORE INSERT OR UPDATE ON cashrcptitem FOR EACH ROW EXECUTE PROCEDURE _cashrcptitemtrigger();


--
-- TOC entry 8213 (class 2620 OID 146572195)
-- Dependencies: 271 928 8894
-- Name: cashrcptmisctrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER cashrcptmisctrigger BEFORE INSERT OR UPDATE ON cashrcptmisc FOR EACH ROW EXECUTE PROCEDURE _cashrcptmisctrigger();


--
-- TOC entry 8210 (class 2620 OID 146572196)
-- Dependencies: 267 929 8894
-- Name: cashrcpttrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER cashrcpttrigger BEFORE INSERT OR UPDATE ON cashrcpt FOR EACH ROW EXECUTE PROCEDURE _cashrcpttrigger();


--
-- TOC entry 8214 (class 2620 OID 146572197)
-- Dependencies: 278 931 8894
-- Name: ccardtrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER ccardtrigger BEFORE INSERT OR UPDATE ON ccard FOR EACH ROW EXECUTE PROCEDURE _ccardtrigger();


--
-- TOC entry 8199 (class 2620 OID 146572198)
-- Dependencies: 237 932 8894
-- Name: charasshistorytrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER charasshistorytrigger BEFORE INSERT OR DELETE OR UPDATE ON charass FOR EACH ROW EXECUTE PROCEDURE _charasshistorytrigger();


--
-- TOC entry 8200 (class 2620 OID 146572199)
-- Dependencies: 237 933 8894
-- Name: charasstrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER charasstrigger AFTER INSERT OR UPDATE ON charass FOR EACH ROW EXECUTE PROCEDURE _charasstrigger();


--
-- TOC entry 8198 (class 2620 OID 146572200)
-- Dependencies: 236 934 8894
-- Name: charbeforetrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER charbeforetrigger BEFORE INSERT OR UPDATE ON "char" FOR EACH ROW EXECUTE PROCEDURE _charbeforetrigger();


--
-- TOC entry 8287 (class 2620 OID 146572201)
-- Dependencies: 490 935 8894
-- Name: charopttrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER charopttrigger AFTER DELETE OR UPDATE ON charopt FOR EACH ROW EXECUTE PROCEDURE _charopttrigger();


--
-- TOC entry 8285 (class 2620 OID 146572202)
-- Dependencies: 430 938 8894
-- Name: checkheadbeforetrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER checkheadbeforetrigger BEFORE INSERT OR UPDATE ON checkhead FOR EACH ROW EXECUTE PROCEDURE _checkheadbeforetrigger();


--
-- TOC entry 8179 (class 2620 OID 146572203)
-- Dependencies: 218 939 8894
-- Name: cmheadbeforetrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER cmheadbeforetrigger BEFORE INSERT OR DELETE OR UPDATE ON cmhead FOR EACH ROW EXECUTE PROCEDURE _cmheadbeforetrigger();


--
-- TOC entry 8180 (class 2620 OID 146572204)
-- Dependencies: 218 940 8894
-- Name: cmheadtrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER cmheadtrigger AFTER INSERT OR DELETE OR UPDATE ON cmhead FOR EACH ROW EXECUTE PROCEDURE _cmheadtrigger();


--
-- TOC entry 8182 (class 2620 OID 146572205)
-- Dependencies: 222 941 8894
-- Name: cmitembeforetrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER cmitembeforetrigger BEFORE INSERT OR DELETE OR UPDATE ON cmitem FOR EACH ROW EXECUTE PROCEDURE _cmitembeforetrigger();


--
-- TOC entry 8183 (class 2620 OID 146572206)
-- Dependencies: 222 942 8894
-- Name: cmitemtrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER cmitemtrigger AFTER INSERT OR DELETE OR UPDATE ON cmitem FOR EACH ROW EXECUTE PROCEDURE _cmitemtrigger();


--
-- TOC entry 8155 (class 2620 OID 146572207)
-- Dependencies: 204 943 8894
-- Name: cntcttrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER cntcttrigger BEFORE INSERT OR UPDATE ON cntct FOR EACH ROW EXECUTE PROCEDURE _cntcttrigger();


--
-- TOC entry 8156 (class 2620 OID 146572208)
-- Dependencies: 204 947 8894
-- Name: cntcttriggerafter; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER cntcttriggerafter AFTER INSERT OR DELETE OR UPDATE ON cntct FOR EACH ROW EXECUTE PROCEDURE _cntcttriggerafter();


--
-- TOC entry 8157 (class 2620 OID 146572209)
-- Dependencies: 204 948 8894
-- Name: cntcttriggerbeforedelete; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER cntcttriggerbeforedelete BEFORE DELETE ON cntct FOR EACH ROW EXECUTE PROCEDURE _cntcttriggerbeforedelete();


--
-- TOC entry 8133 (class 2620 OID 146572210)
-- Dependencies: 189 949 8894
-- Name: cntsliptrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER cntsliptrigger BEFORE INSERT OR DELETE OR UPDATE ON cntslip FOR EACH ROW EXECUTE PROCEDURE _cntsliptrigger();


--
-- TOC entry 8288 (class 2620 OID 146572211)
-- Dependencies: 513 950 8894
-- Name: cobillbeforetrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER cobillbeforetrigger BEFORE INSERT OR DELETE OR UPDATE ON cobill FOR EACH ROW EXECUTE PROCEDURE _cobillbeforetrigger();


--
-- TOC entry 8289 (class 2620 OID 146572212)
-- Dependencies: 513 951 8894
-- Name: cobilltrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER cobilltrigger AFTER INSERT OR DELETE OR UPDATE ON cobill FOR EACH ROW EXECUTE PROCEDURE _cobilltrigger();


--
-- TOC entry 8290 (class 2620 OID 146572213)
-- Dependencies: 516 936 8894
-- Name: cobmiscbeforetrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER cobmiscbeforetrigger BEFORE INSERT OR DELETE OR UPDATE ON cobmisc FOR EACH ROW EXECUTE PROCEDURE _cobmiscbeforetrigger();


--
-- TOC entry 8291 (class 2620 OID 146572214)
-- Dependencies: 516 937 8894
-- Name: cobmisctrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER cobmisctrigger AFTER INSERT OR DELETE OR UPDATE ON cobmisc FOR EACH ROW EXECUTE PROCEDURE _cobmisctrigger();


--
-- TOC entry 8201 (class 2620 OID 146572215)
-- Dependencies: 240 944 8894
-- Name: commenttrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER commenttrigger AFTER INSERT OR UPDATE ON comment FOR EACH ROW EXECUTE PROCEDURE _commenttrigger();


--
-- TOC entry 8292 (class 2620 OID 146572216)
-- Dependencies: 523 952 8894
-- Name: companytrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER companytrigger BEFORE UPDATE ON company FOR EACH ROW EXECUTE PROCEDURE _companytrigger();


--
-- TOC entry 8230 (class 2620 OID 146572217)
-- Dependencies: 329 953 8894
-- Name: contrctaftertrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER contrctaftertrigger AFTER UPDATE ON contrct FOR EACH ROW EXECUTE PROCEDURE _contrctaftertrigger();


--
-- TOC entry 8158 (class 2620 OID 146572218)
-- Dependencies: 205 954 8894
-- Name: crmacctaftertrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER crmacctaftertrigger AFTER INSERT OR DELETE OR UPDATE ON crmacct FOR EACH ROW EXECUTE PROCEDURE _crmacctaftertrigger();


--
-- TOC entry 8159 (class 2620 OID 146572219)
-- Dependencies: 205 955 8894
-- Name: crmacctbeforetrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER crmacctbeforetrigger BEFORE INSERT OR DELETE OR UPDATE ON crmacct FOR EACH ROW EXECUTE PROCEDURE _crmacctbeforetrigger();


--
-- TOC entry 8294 (class 2620 OID 146572220)
-- Dependencies: 545 1379 8894
-- Name: currexchangecheckoverlap; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER currexchangecheckoverlap BEFORE INSERT OR UPDATE ON curr_rate FOR EACH ROW EXECUTE PROCEDURE currexchangecheckoverlap();


--
-- TOC entry 8164 (class 2620 OID 146572221)
-- Dependencies: 208 1381 8894
-- Name: curronebase; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER curronebase AFTER INSERT OR UPDATE ON curr_symbol FOR EACH ROW EXECUTE PROCEDURE curronebase();


--
-- TOC entry 8172 (class 2620 OID 146572222)
-- Dependencies: 213 956 8894
-- Name: custaftertrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER custaftertrigger AFTER INSERT OR UPDATE ON custinfo FOR EACH ROW EXECUTE PROCEDURE _custaftertrigger();


--
-- TOC entry 8173 (class 2620 OID 146572223)
-- Dependencies: 213 957 8894
-- Name: custinfoafterdeletetrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER custinfoafterdeletetrigger AFTER DELETE ON custinfo FOR EACH ROW EXECUTE PROCEDURE _custinfoafterdeletetrigger();


--
-- TOC entry 8174 (class 2620 OID 146572224)
-- Dependencies: 213 958 8894
-- Name: custinfobeforedeletetrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER custinfobeforedeletetrigger BEFORE DELETE ON custinfo FOR EACH ROW EXECUTE PROCEDURE _custinfobeforedeletetrigger();


--
-- TOC entry 8175 (class 2620 OID 146572225)
-- Dependencies: 213 960 8894
-- Name: custtrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER custtrigger BEFORE INSERT OR UPDATE ON custinfo FOR EACH ROW EXECUTE PROCEDURE _custtrigger();


--
-- TOC entry 8215 (class 2620 OID 146572226)
-- Dependencies: 280 961 8894
-- Name: custtypeafterdeletetrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER custtypeafterdeletetrigger AFTER DELETE ON custtype FOR EACH ROW EXECUTE PROCEDURE _custtypeafterdeletetrigger();


--
-- TOC entry 8216 (class 2620 OID 146572227)
-- Dependencies: 280 962 8894
-- Name: custtypetrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER custtypetrigger BEFORE INSERT OR UPDATE ON custtype FOR EACH ROW EXECUTE PROCEDURE _custtypetrigger();


--
-- TOC entry 8202 (class 2620 OID 146572228)
-- Dependencies: 242 963 8894
-- Name: docasstrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER docasstrigger AFTER INSERT OR UPDATE ON docass FOR EACH ROW EXECUTE PROCEDURE _docasstrigger();


--
-- TOC entry 8222 (class 2620 OID 146572229)
-- Dependencies: 292 964 8894
-- Name: empafterdeletetrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER empafterdeletetrigger AFTER DELETE ON emp FOR EACH ROW EXECUTE PROCEDURE _empafterdeletetrigger();


--
-- TOC entry 8223 (class 2620 OID 146572230)
-- Dependencies: 292 965 8894
-- Name: empaftertrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER empaftertrigger AFTER INSERT OR UPDATE ON emp FOR EACH ROW EXECUTE PROCEDURE _empaftertrigger();


--
-- TOC entry 8224 (class 2620 OID 146572231)
-- Dependencies: 292 966 8894
-- Name: empbeforedeletetrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER empbeforedeletetrigger BEFORE DELETE ON emp FOR EACH ROW EXECUTE PROCEDURE _empbeforedeletetrigger();


--
-- TOC entry 8225 (class 2620 OID 146572232)
-- Dependencies: 292 967 8894
-- Name: empbeforetrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER empbeforetrigger BEFORE INSERT OR UPDATE ON emp FOR EACH ROW EXECUTE PROCEDURE _empbeforetrigger();


--
-- TOC entry 8296 (class 2620 OID 146572233)
-- Dependencies: 567 968 8894
-- Name: evntlogafterinserttrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER evntlogafterinserttrigger AFTER INSERT ON evntlog FOR EACH ROW EXECUTE PROCEDURE _evntlogafterinserttrigger();


--
-- TOC entry 8237 (class 2620 OID 146572234)
-- Dependencies: 340 969 8894
-- Name: gltransaltertrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER gltransaltertrigger BEFORE DELETE OR UPDATE ON gltrans FOR EACH ROW EXECUTE PROCEDURE _gltransaltertrigger();


--
-- TOC entry 8238 (class 2620 OID 146572235)
-- Dependencies: 340 970 8894
-- Name: gltransinserttrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER gltransinserttrigger BEFORE INSERT ON gltrans FOR EACH ROW EXECUTE PROCEDURE _gltransinserttrigger();


--
-- TOC entry 8297 (class 2620 OID 146572236)
-- Dependencies: 603 971 8894
-- Name: grpprivtrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER grpprivtrigger BEFORE INSERT OR UPDATE ON grppriv FOR EACH ROW EXECUTE PROCEDURE _grpprivtrigger();


--
-- TOC entry 8203 (class 2620 OID 146572237)
-- Dependencies: 249 972 8894
-- Name: imageasstrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER imageasstrigger AFTER INSERT OR UPDATE ON imageass FOR EACH ROW EXECUTE PROCEDURE _imageasstrigger();


--
-- TOC entry 8160 (class 2620 OID 146572238)
-- Dependencies: 206 973 8894
-- Name: incdtbeforedeletetrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER incdtbeforedeletetrigger BEFORE DELETE ON incdt FOR EACH ROW EXECUTE PROCEDURE _incdtbeforedeletetrigger();


--
-- TOC entry 8161 (class 2620 OID 146572239)
-- Dependencies: 206 974 8894
-- Name: incdtbeforetrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER incdtbeforetrigger BEFORE INSERT OR UPDATE ON incdt FOR EACH ROW EXECUTE PROCEDURE _incdtbeforetrigger();


--
-- TOC entry 8162 (class 2620 OID 146572240)
-- Dependencies: 206 975 8894
-- Name: incdttrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER incdttrigger AFTER INSERT OR DELETE OR UPDATE ON incdt FOR EACH ROW EXECUTE PROCEDURE _incdttrigger();


--
-- TOC entry 8184 (class 2620 OID 146572241)
-- Dependencies: 224 976 8894
-- Name: invcheadaftertrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER invcheadaftertrigger AFTER UPDATE ON invchead FOR EACH ROW EXECUTE PROCEDURE _invcheadaftertrigger();


--
-- TOC entry 8185 (class 2620 OID 146572242)
-- Dependencies: 224 977 8894
-- Name: invcheadbeforetrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER invcheadbeforetrigger BEFORE INSERT OR DELETE OR UPDATE ON invchead FOR EACH ROW EXECUTE PROCEDURE _invcheadbeforetrigger();


--
-- TOC entry 8186 (class 2620 OID 146572243)
-- Dependencies: 224 978 8894
-- Name: invcheadtrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER invcheadtrigger AFTER INSERT OR DELETE OR UPDATE ON invchead FOR EACH ROW EXECUTE PROCEDURE _invcheadtrigger();


--
-- TOC entry 8190 (class 2620 OID 146572244)
-- Dependencies: 229 979 8894
-- Name: invcitembeforetrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER invcitembeforetrigger BEFORE INSERT OR DELETE OR UPDATE ON invcitem FOR EACH ROW EXECUTE PROCEDURE _invcitembeforetrigger();


--
-- TOC entry 8191 (class 2620 OID 146572245)
-- Dependencies: 229 980 8894
-- Name: invcitemtrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER invcitemtrigger AFTER INSERT OR DELETE OR UPDATE ON invcitem FOR EACH ROW EXECUTE PROCEDURE _invcitemtrigger();


--
-- TOC entry 8298 (class 2620 OID 146572246)
-- Dependencies: 623 1840 8894
-- Name: invhisttrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER invhisttrigger BEFORE INSERT OR UPDATE ON invhist FOR EACH ROW EXECUTE PROCEDURE invhisttrig();


--
-- TOC entry 8242 (class 2620 OID 146572247)
-- Dependencies: 347 981 8894
-- Name: ipsassbeforetrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER ipsassbeforetrigger BEFORE INSERT OR DELETE OR UPDATE ON ipsass FOR EACH ROW EXECUTE PROCEDURE _ipsassbeforetrigger();


--
-- TOC entry 8227 (class 2620 OID 146572248)
-- Dependencies: 301 982 8894
-- Name: ipsheadbeforetrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER ipsheadbeforetrigger BEFORE INSERT OR DELETE OR UPDATE ON ipshead FOR EACH ROW EXECUTE PROCEDURE _ipsheadbeforetrigger();


--
-- TOC entry 8244 (class 2620 OID 146572249)
-- Dependencies: 351 984 8894
-- Name: ipsitemcharbeforetrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER ipsitemcharbeforetrigger BEFORE INSERT OR DELETE OR UPDATE ON ipsitemchar FOR EACH ROW EXECUTE PROCEDURE _ipsitemcharbeforetrigger();


--
-- TOC entry 8243 (class 2620 OID 146572250)
-- Dependencies: 349 985 8894
-- Name: ipsiteminfobeforetrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER ipsiteminfobeforetrigger BEFORE INSERT OR DELETE OR UPDATE ON ipsiteminfo FOR EACH ROW EXECUTE PROCEDURE _ipsiteminfobeforetrigger();


--
-- TOC entry 8134 (class 2620 OID 146572251)
-- Dependencies: 191 986 8894
-- Name: itemaftertrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER itemaftertrigger AFTER INSERT OR DELETE OR UPDATE ON item FOR EACH ROW EXECUTE PROCEDURE _itemaftertrigger();


--
-- TOC entry 8228 (class 2620 OID 146572252)
-- Dependencies: 321 988 8894
-- Name: itemcostaftertrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER itemcostaftertrigger AFTER INSERT OR UPDATE ON itemcost FOR EACH ROW EXECUTE PROCEDURE _itemcostaftertrigger();


--
-- TOC entry 8229 (class 2620 OID 146572253)
-- Dependencies: 321 989 8894
-- Name: itemcosttrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER itemcosttrigger BEFORE INSERT OR DELETE OR UPDATE ON itemcost FOR EACH ROW EXECUTE PROCEDURE _itemcosttrigger();


--
-- TOC entry 8136 (class 2620 OID 146572254)
-- Dependencies: 192 990 8894
-- Name: itemsiteaftertrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER itemsiteaftertrigger AFTER INSERT OR UPDATE ON itemsite FOR EACH ROW EXECUTE PROCEDURE _itemsiteaftertrigger();


--
-- TOC entry 8137 (class 2620 OID 146572255)
-- Dependencies: 192 991 8894
-- Name: itemsitetrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER itemsitetrigger BEFORE INSERT OR UPDATE ON itemsite FOR EACH ROW EXECUTE PROCEDURE _itemsitetrigger();


--
-- TOC entry 8231 (class 2620 OID 146572256)
-- Dependencies: 330 992 8894
-- Name: itemsrcaftertrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER itemsrcaftertrigger AFTER INSERT OR UPDATE ON itemsrc FOR EACH ROW EXECUTE PROCEDURE _itemsrcaftertrigger();


--
-- TOC entry 8233 (class 2620 OID 146572257)
-- Dependencies: 332 993 8894
-- Name: itemsrcptrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER itemsrcptrigger BEFORE INSERT OR UPDATE ON itemsrcp FOR EACH ROW EXECUTE PROCEDURE _itemsrcptrigger();


--
-- TOC entry 8232 (class 2620 OID 146572258)
-- Dependencies: 330 994 8894
-- Name: itemsrctrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER itemsrctrigger BEFORE INSERT OR UPDATE ON itemsrc FOR EACH ROW EXECUTE PROCEDURE _itemsrctrigger();


--
-- TOC entry 8234 (class 2620 OID 146572259)
-- Dependencies: 334 995 8894
-- Name: itemsubtrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER itemsubtrigger AFTER INSERT OR UPDATE ON itemsub FOR EACH ROW EXECUTE PROCEDURE _itemsubtrigger();


--
-- TOC entry 8235 (class 2620 OID 146572260)
-- Dependencies: 336 996 8894
-- Name: itemtaxtrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER itemtaxtrigger AFTER INSERT OR UPDATE ON itemtax FOR EACH ROW EXECUTE PROCEDURE _itemtaxtrigger();


--
-- TOC entry 8135 (class 2620 OID 146572261)
-- Dependencies: 191 997 8894
-- Name: itemtrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER itemtrigger BEFORE INSERT OR UPDATE ON item FOR EACH ROW EXECUTE PROCEDURE _itemtrigger();


--
-- TOC entry 8236 (class 2620 OID 146572262)
-- Dependencies: 338 998 8894
-- Name: itemuomconvtrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER itemuomconvtrigger AFTER INSERT OR UPDATE ON itemuomconv FOR EACH ROW EXECUTE PROCEDURE _itemuomconvtrigger();


--
-- TOC entry 8239 (class 2620 OID 146572263)
-- Dependencies: 342 999 8894
-- Name: locationaftertrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER locationaftertrigger AFTER INSERT OR UPDATE ON location FOR EACH ROW EXECUTE PROCEDURE _locationaftertrigger();


--
-- TOC entry 8240 (class 2620 OID 146572264)
-- Dependencies: 342 1000 8894
-- Name: locationtrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER locationtrigger BEFORE INSERT OR UPDATE ON location FOR EACH ROW EXECUTE PROCEDURE _locationtrigger();


--
-- TOC entry 8265 (class 2620 OID 146572265)
-- Dependencies: 405 1001 8894
-- Name: metasqlaltertrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER metasqlaltertrigger BEFORE INSERT OR UPDATE ON metasql FOR EACH ROW EXECUTE PROCEDURE _metasqlaltertrigger();


--
-- TOC entry 8266 (class 2620 OID 146572266)
-- Dependencies: 405 1002 8894
-- Name: metasqltrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER metasqltrigger BEFORE INSERT OR UPDATE ON metasql FOR EACH ROW EXECUTE PROCEDURE _metasqltrigger();


--
-- TOC entry 8192 (class 2620 OID 146572267)
-- Dependencies: 231 1004 8894
-- Name: opheadaftertrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER opheadaftertrigger AFTER INSERT OR DELETE OR UPDATE ON ophead FOR EACH ROW EXECUTE PROCEDURE _opheadaftertrigger();


--
-- TOC entry 8193 (class 2620 OID 146572268)
-- Dependencies: 231 1005 8894
-- Name: opheadbeforetrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER opheadbeforetrigger BEFORE INSERT OR UPDATE ON ophead FOR EACH ROW EXECUTE PROCEDURE _opheadbeforetrigger();


--
-- TOC entry 8299 (class 2620 OID 146572269)
-- Dependencies: 706 1006 8894
-- Name: packbeforetrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER packbeforetrigger BEFORE INSERT OR UPDATE ON pack FOR EACH ROW EXECUTE PROCEDURE _packbeforetrigger();


--
-- TOC entry 8209 (class 2620 OID 146572270)
-- Dependencies: 264 1007 8894
-- Name: periodaftertrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER periodaftertrigger AFTER INSERT OR DELETE OR UPDATE ON period FOR EACH STATEMENT EXECUTE PROCEDURE _periodaftertrigger();


--
-- TOC entry 8300 (class 2620 OID 146572271)
-- Dependencies: 713 1015 8894
-- Name: pkgheadbeforetrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER pkgheadbeforetrigger BEFORE INSERT OR DELETE OR UPDATE ON pkghead FOR EACH ROW EXECUTE PROCEDURE _pkgheadbeforetrigger();


--
-- TOC entry 8301 (class 2620 OID 146572272)
-- Dependencies: 715 1019 8894
-- Name: pkgitembeforetrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER pkgitembeforetrigger BEFORE INSERT OR DELETE OR UPDATE ON pkgitem FOR EACH ROW EXECUTE PROCEDURE _pkgitembeforetrigger();


--
-- TOC entry 8146 (class 2620 OID 146572273)
-- Dependencies: 197 1030 8894
-- Name: poheadtrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER poheadtrigger BEFORE INSERT OR DELETE OR UPDATE ON pohead FOR EACH ROW EXECUTE PROCEDURE _poheadtrigger();


--
-- TOC entry 8147 (class 2620 OID 146572274)
-- Dependencies: 197 1031 8894
-- Name: poheadtriggerafter; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER poheadtriggerafter AFTER UPDATE ON pohead FOR EACH ROW EXECUTE PROCEDURE _poheadtriggerafter();


--
-- TOC entry 8148 (class 2620 OID 146572275)
-- Dependencies: 198 1032 8894
-- Name: poitemafterdeletetrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER poitemafterdeletetrigger AFTER DELETE ON poitem FOR EACH ROW EXECUTE PROCEDURE _poitemafterdeletetrigger();


--
-- TOC entry 8149 (class 2620 OID 146572276)
-- Dependencies: 198 1033 8894
-- Name: poitemaftertrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER poitemaftertrigger AFTER INSERT OR UPDATE ON poitem FOR EACH ROW EXECUTE PROCEDURE _poitemaftertrigger();


--
-- TOC entry 8150 (class 2620 OID 146572277)
-- Dependencies: 198 1034 8894
-- Name: poitemdeletetrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER poitemdeletetrigger BEFORE DELETE ON poitem FOR EACH ROW EXECUTE PROCEDURE _poitemdeletetrigger();


--
-- TOC entry 8151 (class 2620 OID 146572278)
-- Dependencies: 198 1035 8894
-- Name: poitemtrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER poitemtrigger BEFORE INSERT OR UPDATE ON poitem FOR EACH ROW EXECUTE PROCEDURE _poitemtrigger();


--
-- TOC entry 8187 (class 2620 OID 146572279)
-- Dependencies: 225 1036 8894
-- Name: prjaftertrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER prjaftertrigger AFTER INSERT OR UPDATE ON prj FOR EACH ROW EXECUTE PROCEDURE _prjaftertrigger();


--
-- TOC entry 8188 (class 2620 OID 146572280)
-- Dependencies: 225 1038 8894
-- Name: prjbeforedeletetrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER prjbeforedeletetrigger BEFORE DELETE ON prj FOR EACH ROW EXECUTE PROCEDURE _prjbeforedeletetrigger();


--
-- TOC entry 8194 (class 2620 OID 146572281)
-- Dependencies: 232 1039 8894
-- Name: prjtaskaftertrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER prjtaskaftertrigger AFTER INSERT OR UPDATE ON prjtask FOR EACH ROW EXECUTE PROCEDURE _prjtaskaftertrigger();


--
-- TOC entry 8195 (class 2620 OID 146572282)
-- Dependencies: 232 1040 8894
-- Name: prjtasktrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER prjtasktrigger BEFORE INSERT OR UPDATE ON prjtask FOR EACH ROW EXECUTE PROCEDURE _prjtasktrigger();


--
-- TOC entry 8245 (class 2620 OID 146572283)
-- Dependencies: 356 1041 8894
-- Name: prospectafterdeletetrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER prospectafterdeletetrigger AFTER DELETE ON prospect FOR EACH ROW EXECUTE PROCEDURE _prospectafterdeletetrigger();


--
-- TOC entry 8246 (class 2620 OID 146572284)
-- Dependencies: 356 1042 8894
-- Name: prospectaftertrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER prospectaftertrigger AFTER INSERT OR UPDATE ON prospect FOR EACH ROW EXECUTE PROCEDURE _prospectaftertrigger();


--
-- TOC entry 8247 (class 2620 OID 146572285)
-- Dependencies: 356 1043 8894
-- Name: prospectbeforedeletetrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER prospectbeforedeletetrigger BEFORE DELETE ON prospect FOR EACH ROW EXECUTE PROCEDURE _prospectbeforedeletetrigger();


--
-- TOC entry 8248 (class 2620 OID 146572286)
-- Dependencies: 356 1044 8894
-- Name: prospecttrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER prospecttrigger BEFORE INSERT OR UPDATE ON prospect FOR EACH ROW EXECUTE PROCEDURE _prospecttrigger();


--
-- TOC entry 8302 (class 2620 OID 146572287)
-- Dependencies: 728 1045 8894
-- Name: prtrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER prtrigger AFTER INSERT ON pr FOR EACH ROW EXECUTE PROCEDURE _prtrigger();


--
-- TOC entry 8251 (class 2620 OID 146572288)
-- Dependencies: 367 1046 8894
-- Name: quheadtrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER quheadtrigger BEFORE INSERT OR DELETE OR UPDATE ON quhead FOR EACH ROW EXECUTE PROCEDURE _quheadtrigger();


--
-- TOC entry 8252 (class 2620 OID 146572289)
-- Dependencies: 370 1048 8894
-- Name: quitemaftertrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER quitemaftertrigger AFTER INSERT OR UPDATE ON quitem FOR EACH ROW EXECUTE PROCEDURE _quitemaftertrigger();


--
-- TOC entry 8253 (class 2620 OID 146572290)
-- Dependencies: 370 1049 8894
-- Name: quitembeforetrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER quitembeforetrigger BEFORE INSERT OR UPDATE ON quitem FOR EACH ROW EXECUTE PROCEDURE _quitembeforetrigger();


--
-- TOC entry 8254 (class 2620 OID 146572291)
-- Dependencies: 370 1050 8894
-- Name: quitemtrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER quitemtrigger BEFORE INSERT OR DELETE OR UPDATE ON quitem FOR EACH ROW EXECUTE PROCEDURE _quitemtrigger();


--
-- TOC entry 8304 (class 2620 OID 146572292)
-- Dependencies: 749 1051 8894
-- Name: recuraftertrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER recuraftertrigger AFTER DELETE ON recur FOR EACH ROW EXECUTE PROCEDURE _recuraftertrigger();


--
-- TOC entry 8273 (class 2620 OID 146572293)
-- Dependencies: 411 1052 8894
-- Name: reporttrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER reporttrigger BEFORE INSERT OR UPDATE ON report FOR EACH ROW EXECUTE PROCEDURE _reporttrigger();


--
-- TOC entry 8176 (class 2620 OID 146572294)
-- Dependencies: 216 1053 8894
-- Name: salesrepafterdeletetrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER salesrepafterdeletetrigger AFTER DELETE ON salesrep FOR EACH ROW EXECUTE PROCEDURE _salesrepafterdeletetrigger();


--
-- TOC entry 8177 (class 2620 OID 146572295)
-- Dependencies: 216 1054 8894
-- Name: salesrepaftertrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER salesrepaftertrigger AFTER INSERT OR UPDATE ON salesrep FOR EACH ROW EXECUTE PROCEDURE _salesrepaftertrigger();


--
-- TOC entry 8178 (class 2620 OID 146572296)
-- Dependencies: 216 1055 8894
-- Name: salesrepbeforetrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER salesrepbeforetrigger BEFORE INSERT OR DELETE OR UPDATE ON salesrep FOR EACH ROW EXECUTE PROCEDURE _salesrepbeforetrigger();


--
-- TOC entry 8189 (class 2620 OID 146572297)
-- Dependencies: 226 1058 8894
-- Name: saletypebeforedeletetrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER saletypebeforedeletetrigger BEFORE DELETE ON saletype FOR EACH ROW EXECUTE PROCEDURE _saletypebeforedeletetrigger();


--
-- TOC entry 8305 (class 2620 OID 146572298)
-- Dependencies: 771 1059 8894
-- Name: shipdatasumtrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER shipdatasumtrigger BEFORE INSERT OR UPDATE ON shipdatasum FOR EACH ROW EXECUTE PROCEDURE _shipdatasumtrigger();


--
-- TOC entry 8226 (class 2620 OID 146572299)
-- Dependencies: 297 1060 8894
-- Name: shipdatatrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER shipdatatrigger BEFORE INSERT OR UPDATE ON shipdata FOR EACH ROW EXECUTE PROCEDURE _shipdatatrigger();


--
-- TOC entry 8217 (class 2620 OID 146572300)
-- Dependencies: 282 1061 8894
-- Name: shipformafterdeletetrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER shipformafterdeletetrigger AFTER DELETE ON shipform FOR EACH ROW EXECUTE PROCEDURE _shipformafterdeletetrigger();


--
-- TOC entry 8293 (class 2620 OID 146572301)
-- Dependencies: 526 1062 8894
-- Name: shipheadbeforetrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER shipheadbeforetrigger BEFORE INSERT OR UPDATE ON shiphead FOR EACH ROW EXECUTE PROCEDURE _shipheadbeforetrigger();


--
-- TOC entry 8181 (class 2620 OID 146572302)
-- Dependencies: 219 1063 8894
-- Name: shiptoinfoaftertrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER shiptoinfoaftertrigger AFTER INSERT OR UPDATE ON shiptoinfo FOR EACH ROW EXECUTE PROCEDURE _shiptoinfoaftertrigger();


--
-- TOC entry 8255 (class 2620 OID 146572303)
-- Dependencies: 386 1064 8894
-- Name: shipviaafterdeletetrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER shipviaafterdeletetrigger AFTER DELETE ON shipvia FOR EACH ROW EXECUTE PROCEDURE _shipviaafterdeletetrigger();


--
-- TOC entry 8306 (class 2620 OID 146572304)
-- Dependencies: 781 1065 8894
-- Name: sltransaltertrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER sltransaltertrigger BEFORE DELETE OR UPDATE ON sltrans FOR EACH ROW EXECUTE PROCEDURE _sltransaltertrigger();


--
-- TOC entry 8307 (class 2620 OID 146572305)
-- Dependencies: 781 1047 8894
-- Name: sltransinserttrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER sltransinserttrigger BEFORE INSERT ON sltrans FOR EACH ROW EXECUTE PROCEDURE _sltransinserttrigger();


--
-- TOC entry 8139 (class 2620 OID 146572306)
-- Dependencies: 195 1056 8894
-- Name: soheadtrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER soheadtrigger BEFORE INSERT OR DELETE OR UPDATE ON cohead FOR EACH ROW EXECUTE PROCEDURE _soheadtrigger();


--
-- TOC entry 8140 (class 2620 OID 146572307)
-- Dependencies: 195 1066 8894
-- Name: soheadtriggerafter; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER soheadtriggerafter AFTER UPDATE ON cohead FOR EACH ROW EXECUTE PROCEDURE _soheadtriggerafter();


--
-- TOC entry 8141 (class 2620 OID 146572308)
-- Dependencies: 196 1067 8894
-- Name: soitemafterdeletetrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER soitemafterdeletetrigger AFTER DELETE ON coitem FOR EACH ROW EXECUTE PROCEDURE _soitemafterdeletetrigger();


--
-- TOC entry 8142 (class 2620 OID 146572309)
-- Dependencies: 196 1068 8894
-- Name: soitemaftertrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER soitemaftertrigger AFTER INSERT OR UPDATE ON coitem FOR EACH ROW EXECUTE PROCEDURE _soitemaftertrigger();


--
-- TOC entry 8143 (class 2620 OID 146572310)
-- Dependencies: 196 1069 8894
-- Name: soitembeforedeletetrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER soitembeforedeletetrigger BEFORE DELETE ON coitem FOR EACH ROW EXECUTE PROCEDURE _soitembeforedeletetrigger();


--
-- TOC entry 8144 (class 2620 OID 146572311)
-- Dependencies: 196 1070 8894
-- Name: soitembeforetrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER soitembeforetrigger BEFORE INSERT OR UPDATE ON coitem FOR EACH ROW EXECUTE PROCEDURE _soitembeforetrigger();


--
-- TOC entry 8145 (class 2620 OID 146572312)
-- Dependencies: 196 1071 8894
-- Name: soitemtrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER soitemtrigger BEFORE INSERT OR UPDATE ON coitem FOR EACH ROW EXECUTE PROCEDURE _soitemtrigger();


--
-- TOC entry 8218 (class 2620 OID 146572313)
-- Dependencies: 284 1072 8894
-- Name: taxauthafterdeletetrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER taxauthafterdeletetrigger AFTER DELETE ON taxauth FOR EACH ROW EXECUTE PROCEDURE _taxauthafterdeletetrigger();


--
-- TOC entry 8219 (class 2620 OID 146572314)
-- Dependencies: 284 1073 8894
-- Name: taxauthaftertrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER taxauthaftertrigger AFTER INSERT OR UPDATE ON taxauth FOR EACH ROW EXECUTE PROCEDURE _taxauthaftertrigger();


--
-- TOC entry 8220 (class 2620 OID 146572315)
-- Dependencies: 284 1074 8894
-- Name: taxauthbeforedeletetrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER taxauthbeforedeletetrigger BEFORE DELETE ON taxauth FOR EACH ROW EXECUTE PROCEDURE _taxauthbeforedeletetrigger();


--
-- TOC entry 8221 (class 2620 OID 146572316)
-- Dependencies: 284 1075 8894
-- Name: taxauthbeforetrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER taxauthbeforetrigger BEFORE INSERT OR UPDATE ON taxauth FOR EACH ROW EXECUTE PROCEDURE _taxauthbeforetrigger();


--
-- TOC entry 8165 (class 2620 OID 146572317)
-- Dependencies: 209 1037 8894
-- Name: termsafterdeletetrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER termsafterdeletetrigger AFTER DELETE ON terms FOR EACH ROW EXECUTE PROCEDURE _termsafterdeletetrigger();


--
-- TOC entry 8196 (class 2620 OID 146572318)
-- Dependencies: 233 1076 8894
-- Name: todoitemtrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER todoitemtrigger BEFORE DELETE ON todoitem FOR EACH ROW EXECUTE PROCEDURE _todoitemtrigger();


--
-- TOC entry 8308 (class 2620 OID 146572319)
-- Dependencies: 820 1077 8894
-- Name: uomconvupdate; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER uomconvupdate BEFORE UPDATE ON uomconv FOR EACH ROW EXECUTE PROCEDURE _uomconvupdate();


--
-- TOC entry 8309 (class 2620 OID 146572320)
-- Dependencies: 825 1078 8894
-- Name: usrprefaftertrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER usrprefaftertrigger AFTER INSERT OR DELETE OR UPDATE ON usrpref FOR EACH ROW EXECUTE PROCEDURE _usrprefaftertrigger();


--
-- TOC entry 8310 (class 2620 OID 146572321)
-- Dependencies: 825 1079 8894
-- Name: usrprefbeforetrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER usrprefbeforetrigger BEFORE INSERT OR DELETE OR UPDATE ON usrpref FOR EACH ROW EXECUTE PROCEDURE _usrprefbeforetrigger();


--
-- TOC entry 8303 (class 2620 OID 146572322)
-- Dependencies: 733 1080 8894
-- Name: usrprivtrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER usrprivtrigger BEFORE INSERT OR UPDATE ON usrpriv FOR EACH ROW EXECUTE PROCEDURE _usrprivtrigger();


--
-- TOC entry 8250 (class 2620 OID 146572323)
-- Dependencies: 364 1082 8894
-- Name: vendaddrtrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER vendaddrtrigger BEFORE INSERT OR DELETE OR UPDATE ON vendaddrinfo FOR EACH ROW EXECUTE PROCEDURE _vendaddrtrigger();


--
-- TOC entry 8166 (class 2620 OID 146572324)
-- Dependencies: 210 1083 8894
-- Name: vendaftertrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER vendaftertrigger AFTER INSERT OR UPDATE ON vendinfo FOR EACH ROW EXECUTE PROCEDURE _vendaftertrigger();


--
-- TOC entry 8167 (class 2620 OID 146572325)
-- Dependencies: 210 1084 8894
-- Name: vendinfoafterdeletetrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER vendinfoafterdeletetrigger AFTER DELETE ON vendinfo FOR EACH ROW EXECUTE PROCEDURE _vendinfoafterdeletetrigger();


--
-- TOC entry 8168 (class 2620 OID 146572326)
-- Dependencies: 210 1085 8894
-- Name: vendinfobeforedeletetrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER vendinfobeforedeletetrigger BEFORE DELETE ON vendinfo FOR EACH ROW EXECUTE PROCEDURE _vendinfobeforedeletetrigger();


--
-- TOC entry 8169 (class 2620 OID 146572327)
-- Dependencies: 210 1086 8894
-- Name: vendtrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER vendtrigger BEFORE INSERT OR UPDATE ON vendinfo FOR EACH ROW EXECUTE PROCEDURE _vendtrigger();


--
-- TOC entry 8311 (class 2620 OID 146572328)
-- Dependencies: 837 1087 8894
-- Name: vodistaftertrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER vodistaftertrigger AFTER INSERT OR DELETE OR UPDATE ON vodist FOR EACH ROW EXECUTE PROCEDURE _vodistaftertrigger();


--
-- TOC entry 8312 (class 2620 OID 146572329)
-- Dependencies: 837 1088 8894
-- Name: vodistbeforetrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER vodistbeforetrigger BEFORE INSERT OR DELETE OR UPDATE ON vodist FOR EACH ROW EXECUTE PROCEDURE _vodistbeforetrigger();


--
-- TOC entry 8313 (class 2620 OID 146572330)
-- Dependencies: 839 1089 8894
-- Name: voheadaftertrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER voheadaftertrigger AFTER INSERT OR DELETE OR UPDATE ON vohead FOR EACH ROW EXECUTE PROCEDURE _voheadaftertrigger();


--
-- TOC entry 8314 (class 2620 OID 146572331)
-- Dependencies: 839 1090 8894
-- Name: voheadbeforetrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER voheadbeforetrigger BEFORE INSERT OR DELETE OR UPDATE ON vohead FOR EACH ROW EXECUTE PROCEDURE _voheadbeforetrigger();


--
-- TOC entry 8315 (class 2620 OID 146572332)
-- Dependencies: 842 1091 8894
-- Name: voitemaftertrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER voitemaftertrigger AFTER INSERT OR DELETE OR UPDATE ON voitem FOR EACH ROW EXECUTE PROCEDURE _voitemaftertrigger();


--
-- TOC entry 8316 (class 2620 OID 146572333)
-- Dependencies: 842 1092 8894
-- Name: voitembeforetrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER voitembeforetrigger BEFORE INSERT OR DELETE OR UPDATE ON voitem FOR EACH ROW EXECUTE PROCEDURE _voitembeforetrigger();


--
-- TOC entry 8138 (class 2620 OID 146572334)
-- Dependencies: 193 1093 8894
-- Name: warehoustrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER warehoustrigger BEFORE INSERT OR UPDATE ON whsinfo FOR EACH ROW EXECUTE PROCEDURE _warehoustrigger();


--
-- TOC entry 8241 (class 2620 OID 146572335)
-- Dependencies: 343 1094 8894
-- Name: whsezonetrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER whsezonetrigger BEFORE INSERT OR UPDATE ON whsezone FOR EACH ROW EXECUTE PROCEDURE _whsezonetrigger();


--
-- TOC entry 8249 (class 2620 OID 146572336)
-- Dependencies: 359 1095 8894
-- Name: womatlaftertrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER womatlaftertrigger AFTER INSERT OR DELETE OR UPDATE ON womatl FOR EACH ROW EXECUTE PROCEDURE _womatlaftertrigger();


--
-- TOC entry 8295 (class 2620 OID 146572337)
-- Dependencies: 560 1097 8894
-- Name: wotrigger; Type: TRIGGER; Schema: public; Owner: admin
--

CREATE TRIGGER wotrigger BEFORE INSERT OR DELETE OR UPDATE ON wo FOR EACH ROW EXECUTE PROCEDURE _wotrigger();



--
-- TOC entry 8317 (class 2620 OID 146572338)
-- Dependencies: 859 1008 8894
-- Name: pkgcmdaftertrigger; Type: TRIGGER; Schema: te; Owner: admin
--

CREATE TRIGGER pkgcmdaftertrigger AFTER INSERT OR DELETE OR UPDATE ON pkgcmd FOR EACH ROW EXECUTE PROCEDURE public._pkgcmdaftertrigger();


--
-- TOC entry 8318 (class 2620 OID 146572339)
-- Dependencies: 859 1009 8894
-- Name: pkgcmdaltertrigger; Type: TRIGGER; Schema: te; Owner: admin
--

CREATE TRIGGER pkgcmdaltertrigger BEFORE INSERT OR DELETE OR UPDATE ON pkgcmd FOR EACH ROW EXECUTE PROCEDURE public._pkgcmdaltertrigger();


--
-- TOC entry 8320 (class 2620 OID 146572340)
-- Dependencies: 860 1010 8894
-- Name: pkgcmdargaftertrigger; Type: TRIGGER; Schema: te; Owner: admin
--

CREATE TRIGGER pkgcmdargaftertrigger AFTER INSERT OR DELETE OR UPDATE ON pkgcmdarg FOR EACH ROW EXECUTE PROCEDURE public._pkgcmdargaftertrigger();


--
-- TOC entry 8321 (class 2620 OID 146572341)
-- Dependencies: 860 1012 8894
-- Name: pkgcmdargaltertrigger; Type: TRIGGER; Schema: te; Owner: admin
--

CREATE TRIGGER pkgcmdargaltertrigger BEFORE INSERT OR DELETE OR UPDATE ON pkgcmdarg FOR EACH ROW EXECUTE PROCEDURE public._pkgcmdargaltertrigger();


--
-- TOC entry 8322 (class 2620 OID 146572342)
-- Dependencies: 860 1013 8894
-- Name: pkgcmdargbeforetrigger; Type: TRIGGER; Schema: te; Owner: admin
--

CREATE TRIGGER pkgcmdargbeforetrigger BEFORE INSERT OR DELETE OR UPDATE ON pkgcmdarg FOR EACH ROW EXECUTE PROCEDURE public._pkgcmdargbeforetrigger();


--
-- TOC entry 8319 (class 2620 OID 146572343)
-- Dependencies: 859 1014 8894
-- Name: pkgcmdbeforetrigger; Type: TRIGGER; Schema: te; Owner: admin
--

CREATE TRIGGER pkgcmdbeforetrigger BEFORE INSERT OR DELETE OR UPDATE ON pkgcmd FOR EACH ROW EXECUTE PROCEDURE public._pkgcmdbeforetrigger();


--
-- TOC entry 8323 (class 2620 OID 146572344)
-- Dependencies: 861 1016 8894
-- Name: pkgimageaftertrigger; Type: TRIGGER; Schema: te; Owner: admin
--

CREATE TRIGGER pkgimageaftertrigger AFTER INSERT OR DELETE OR UPDATE ON pkgimage FOR EACH ROW EXECUTE PROCEDURE public._pkgimageaftertrigger();


--
-- TOC entry 8324 (class 2620 OID 146572345)
-- Dependencies: 861 1017 8894
-- Name: pkgimagealtertrigger; Type: TRIGGER; Schema: te; Owner: admin
--

CREATE TRIGGER pkgimagealtertrigger BEFORE INSERT OR DELETE OR UPDATE ON pkgimage FOR EACH ROW EXECUTE PROCEDURE public._pkgimagealtertrigger();


--
-- TOC entry 8325 (class 2620 OID 146572346)
-- Dependencies: 861 1018 8894
-- Name: pkgimagebeforetrigger; Type: TRIGGER; Schema: te; Owner: admin
--

CREATE TRIGGER pkgimagebeforetrigger BEFORE INSERT OR DELETE OR UPDATE ON pkgimage FOR EACH ROW EXECUTE PROCEDURE public._pkgimagebeforetrigger();


--
-- TOC entry 8326 (class 2620 OID 146572347)
-- Dependencies: 862 1020 8894
-- Name: pkgmetasqlaftertrigger; Type: TRIGGER; Schema: te; Owner: admin
--

CREATE TRIGGER pkgmetasqlaftertrigger AFTER INSERT OR DELETE OR UPDATE ON pkgmetasql FOR EACH ROW EXECUTE PROCEDURE public._pkgmetasqlaftertrigger();


--
-- TOC entry 8327 (class 2620 OID 146572348)
-- Dependencies: 862 1022 8894
-- Name: pkgmetasqlaltertrigger; Type: TRIGGER; Schema: te; Owner: admin
--

CREATE TRIGGER pkgmetasqlaltertrigger BEFORE INSERT OR DELETE OR UPDATE ON pkgmetasql FOR EACH ROW EXECUTE PROCEDURE public._pkgmetasqlaltertrigger();


--
-- TOC entry 8328 (class 2620 OID 146572349)
-- Dependencies: 862 1023 8894
-- Name: pkgmetasqlbeforetrigger; Type: TRIGGER; Schema: te; Owner: admin
--

CREATE TRIGGER pkgmetasqlbeforetrigger BEFORE INSERT OR DELETE OR UPDATE ON pkgmetasql FOR EACH ROW EXECUTE PROCEDURE public._pkgmetasqlbeforetrigger();


--
-- TOC entry 8329 (class 2620 OID 146572350)
-- Dependencies: 863 1024 8894
-- Name: pkgprivaftertrigger; Type: TRIGGER; Schema: te; Owner: admin
--

CREATE TRIGGER pkgprivaftertrigger AFTER INSERT OR DELETE OR UPDATE ON pkgpriv FOR EACH ROW EXECUTE PROCEDURE public._pkgprivaftertrigger();


--
-- TOC entry 8330 (class 2620 OID 146572351)
-- Dependencies: 863 1025 8894
-- Name: pkgprivaltertrigger; Type: TRIGGER; Schema: te; Owner: admin
--

CREATE TRIGGER pkgprivaltertrigger BEFORE INSERT OR DELETE OR UPDATE ON pkgpriv FOR EACH ROW EXECUTE PROCEDURE public._pkgprivaltertrigger();


--
-- TOC entry 8331 (class 2620 OID 146572352)
-- Dependencies: 863 1026 8894
-- Name: pkgprivbeforetrigger; Type: TRIGGER; Schema: te; Owner: admin
--

CREATE TRIGGER pkgprivbeforetrigger BEFORE INSERT OR DELETE OR UPDATE ON pkgpriv FOR EACH ROW EXECUTE PROCEDURE public._pkgprivbeforetrigger();


--
-- TOC entry 8332 (class 2620 OID 146572353)
-- Dependencies: 864 1027 8894
-- Name: pkgreportaftertrigger; Type: TRIGGER; Schema: te; Owner: admin
--

CREATE TRIGGER pkgreportaftertrigger AFTER INSERT OR DELETE OR UPDATE ON pkgreport FOR EACH ROW EXECUTE PROCEDURE public._pkgreportaftertrigger();


--
-- TOC entry 8333 (class 2620 OID 146572354)
-- Dependencies: 864 1028 8894
-- Name: pkgreportaltertrigger; Type: TRIGGER; Schema: te; Owner: admin
--

CREATE TRIGGER pkgreportaltertrigger BEFORE INSERT OR DELETE OR UPDATE ON pkgreport FOR EACH ROW EXECUTE PROCEDURE public._pkgreportaltertrigger();


--
-- TOC entry 8334 (class 2620 OID 146572355)
-- Dependencies: 864 1029 8894
-- Name: pkgreportbeforetrigger; Type: TRIGGER; Schema: te; Owner: admin
--

CREATE TRIGGER pkgreportbeforetrigger BEFORE INSERT OR DELETE OR UPDATE ON pkgreport FOR EACH ROW EXECUTE PROCEDURE public._pkgreportbeforetrigger();


--
-- TOC entry 8335 (class 2620 OID 146572356)
-- Dependencies: 865 959 8894
-- Name: pkgscriptaftertrigger; Type: TRIGGER; Schema: te; Owner: admin
--

CREATE TRIGGER pkgscriptaftertrigger AFTER INSERT OR DELETE OR UPDATE ON pkgscript FOR EACH ROW EXECUTE PROCEDURE public._pkgscriptaftertrigger();


--
-- TOC entry 8336 (class 2620 OID 146572357)
-- Dependencies: 865 983 8894
-- Name: pkgscriptaltertrigger; Type: TRIGGER; Schema: te; Owner: admin
--

CREATE TRIGGER pkgscriptaltertrigger BEFORE INSERT OR DELETE OR UPDATE ON pkgscript FOR EACH ROW EXECUTE PROCEDURE public._pkgscriptaltertrigger();


--
-- TOC entry 8337 (class 2620 OID 146572358)
-- Dependencies: 865 1003 8894
-- Name: pkgscriptbeforetrigger; Type: TRIGGER; Schema: te; Owner: admin
--

CREATE TRIGGER pkgscriptbeforetrigger BEFORE INSERT OR DELETE OR UPDATE ON pkgscript FOR EACH ROW EXECUTE PROCEDURE public._pkgscriptbeforetrigger();


--
-- TOC entry 8338 (class 2620 OID 146572359)
-- Dependencies: 866 1011 8894
-- Name: pkguiformaftertrigger; Type: TRIGGER; Schema: te; Owner: admin
--

CREATE TRIGGER pkguiformaftertrigger AFTER INSERT OR DELETE OR UPDATE ON pkguiform FOR EACH ROW EXECUTE PROCEDURE public._pkguiformaftertrigger();


--
-- TOC entry 8339 (class 2620 OID 146572360)
-- Dependencies: 866 1021 8894
-- Name: pkguiformaltertrigger; Type: TRIGGER; Schema: te; Owner: admin
--

CREATE TRIGGER pkguiformaltertrigger BEFORE INSERT OR DELETE OR UPDATE ON pkguiform FOR EACH ROW EXECUTE PROCEDURE public._pkguiformaltertrigger();


--
-- TOC entry 8340 (class 2620 OID 146572361)
-- Dependencies: 866 945 8894
-- Name: pkguiformbeforetrigger; Type: TRIGGER; Schema: te; Owner: admin
--

CREATE TRIGGER pkguiformbeforetrigger BEFORE INSERT OR DELETE OR UPDATE ON pkguiform FOR EACH ROW EXECUTE PROCEDURE public._pkguiformbeforetrigger();


--
-- TOC entry 8341 (class 2620 OID 146572362)
-- Dependencies: 873 2335 8894
-- Name: teheadtrigger; Type: TRIGGER; Schema: te; Owner: admin
--

CREATE TRIGGER teheadtrigger AFTER INSERT OR UPDATE ON tehead FOR EACH ROW EXECUTE PROCEDURE triggertehead();


--
-- TOC entry 8342 (class 2620 OID 146572363)
-- Dependencies: 875 2336 8894
-- Name: teitemtrigger; Type: TRIGGER; Schema: te; Owner: admin
--

CREATE TRIGGER teitemtrigger AFTER INSERT OR DELETE OR UPDATE ON teitem FOR EACH ROW EXECUTE PROCEDURE triggerteitem();


--
-- TOC entry 8343 (class 2620 OID 146572364)
-- Dependencies: 877 2329 8894
-- Name: teprjtrigger; Type: TRIGGER; Schema: te; Owner: admin
--

CREATE TRIGGER teprjtrigger AFTER INSERT OR UPDATE ON teprj FOR EACH ROW EXECUTE PROCEDURE triggerteprj();



--
-- TOC entry 8344 (class 2620 OID 146572365)
-- Dependencies: 881 1008 8894
-- Name: pkgcmdaftertrigger; Type: TRIGGER; Schema: xtdesktop; Owner: admin
--

CREATE TRIGGER pkgcmdaftertrigger AFTER INSERT OR DELETE OR UPDATE ON pkgcmd FOR EACH ROW EXECUTE PROCEDURE public._pkgcmdaftertrigger();


--
-- TOC entry 8345 (class 2620 OID 146572366)
-- Dependencies: 881 1009 8894
-- Name: pkgcmdaltertrigger; Type: TRIGGER; Schema: xtdesktop; Owner: admin
--

CREATE TRIGGER pkgcmdaltertrigger BEFORE INSERT OR DELETE OR UPDATE ON pkgcmd FOR EACH ROW EXECUTE PROCEDURE public._pkgcmdaltertrigger();


--
-- TOC entry 8347 (class 2620 OID 146572367)
-- Dependencies: 882 1010 8894
-- Name: pkgcmdargaftertrigger; Type: TRIGGER; Schema: xtdesktop; Owner: admin
--

CREATE TRIGGER pkgcmdargaftertrigger AFTER INSERT OR DELETE OR UPDATE ON pkgcmdarg FOR EACH ROW EXECUTE PROCEDURE public._pkgcmdargaftertrigger();


--
-- TOC entry 8348 (class 2620 OID 146572368)
-- Dependencies: 882 1012 8894
-- Name: pkgcmdargaltertrigger; Type: TRIGGER; Schema: xtdesktop; Owner: admin
--

CREATE TRIGGER pkgcmdargaltertrigger BEFORE INSERT OR DELETE OR UPDATE ON pkgcmdarg FOR EACH ROW EXECUTE PROCEDURE public._pkgcmdargaltertrigger();


--
-- TOC entry 8349 (class 2620 OID 146572369)
-- Dependencies: 882 1013 8894
-- Name: pkgcmdargbeforetrigger; Type: TRIGGER; Schema: xtdesktop; Owner: admin
--

CREATE TRIGGER pkgcmdargbeforetrigger BEFORE INSERT OR DELETE OR UPDATE ON pkgcmdarg FOR EACH ROW EXECUTE PROCEDURE public._pkgcmdargbeforetrigger();


--
-- TOC entry 8346 (class 2620 OID 146572370)
-- Dependencies: 881 1014 8894
-- Name: pkgcmdbeforetrigger; Type: TRIGGER; Schema: xtdesktop; Owner: admin
--

CREATE TRIGGER pkgcmdbeforetrigger BEFORE INSERT OR DELETE OR UPDATE ON pkgcmd FOR EACH ROW EXECUTE PROCEDURE public._pkgcmdbeforetrigger();


--
-- TOC entry 8350 (class 2620 OID 146572371)
-- Dependencies: 883 1016 8894
-- Name: pkgimageaftertrigger; Type: TRIGGER; Schema: xtdesktop; Owner: admin
--

CREATE TRIGGER pkgimageaftertrigger AFTER INSERT OR DELETE OR UPDATE ON pkgimage FOR EACH ROW EXECUTE PROCEDURE public._pkgimageaftertrigger();


--
-- TOC entry 8351 (class 2620 OID 146572372)
-- Dependencies: 883 1017 8894
-- Name: pkgimagealtertrigger; Type: TRIGGER; Schema: xtdesktop; Owner: admin
--

CREATE TRIGGER pkgimagealtertrigger BEFORE INSERT OR DELETE OR UPDATE ON pkgimage FOR EACH ROW EXECUTE PROCEDURE public._pkgimagealtertrigger();


--
-- TOC entry 8352 (class 2620 OID 146572373)
-- Dependencies: 883 1018 8894
-- Name: pkgimagebeforetrigger; Type: TRIGGER; Schema: xtdesktop; Owner: admin
--

CREATE TRIGGER pkgimagebeforetrigger BEFORE INSERT OR DELETE OR UPDATE ON pkgimage FOR EACH ROW EXECUTE PROCEDURE public._pkgimagebeforetrigger();


--
-- TOC entry 8353 (class 2620 OID 146572374)
-- Dependencies: 884 1020 8894
-- Name: pkgmetasqlaftertrigger; Type: TRIGGER; Schema: xtdesktop; Owner: admin
--

CREATE TRIGGER pkgmetasqlaftertrigger AFTER INSERT OR DELETE OR UPDATE ON pkgmetasql FOR EACH ROW EXECUTE PROCEDURE public._pkgmetasqlaftertrigger();


--
-- TOC entry 8354 (class 2620 OID 146572375)
-- Dependencies: 884 1022 8894
-- Name: pkgmetasqlaltertrigger; Type: TRIGGER; Schema: xtdesktop; Owner: admin
--

CREATE TRIGGER pkgmetasqlaltertrigger BEFORE INSERT OR DELETE OR UPDATE ON pkgmetasql FOR EACH ROW EXECUTE PROCEDURE public._pkgmetasqlaltertrigger();


--
-- TOC entry 8355 (class 2620 OID 146572376)
-- Dependencies: 884 1023 8894
-- Name: pkgmetasqlbeforetrigger; Type: TRIGGER; Schema: xtdesktop; Owner: admin
--

CREATE TRIGGER pkgmetasqlbeforetrigger BEFORE INSERT OR DELETE OR UPDATE ON pkgmetasql FOR EACH ROW EXECUTE PROCEDURE public._pkgmetasqlbeforetrigger();


--
-- TOC entry 8356 (class 2620 OID 146572377)
-- Dependencies: 885 1024 8894
-- Name: pkgprivaftertrigger; Type: TRIGGER; Schema: xtdesktop; Owner: admin
--

CREATE TRIGGER pkgprivaftertrigger AFTER INSERT OR DELETE OR UPDATE ON pkgpriv FOR EACH ROW EXECUTE PROCEDURE public._pkgprivaftertrigger();


--
-- TOC entry 8357 (class 2620 OID 146572378)
-- Dependencies: 885 1025 8894
-- Name: pkgprivaltertrigger; Type: TRIGGER; Schema: xtdesktop; Owner: admin
--

CREATE TRIGGER pkgprivaltertrigger BEFORE INSERT OR DELETE OR UPDATE ON pkgpriv FOR EACH ROW EXECUTE PROCEDURE public._pkgprivaltertrigger();


--
-- TOC entry 8358 (class 2620 OID 146572379)
-- Dependencies: 885 1026 8894
-- Name: pkgprivbeforetrigger; Type: TRIGGER; Schema: xtdesktop; Owner: admin
--

CREATE TRIGGER pkgprivbeforetrigger BEFORE INSERT OR DELETE OR UPDATE ON pkgpriv FOR EACH ROW EXECUTE PROCEDURE public._pkgprivbeforetrigger();


--
-- TOC entry 8359 (class 2620 OID 146572380)
-- Dependencies: 886 1027 8894
-- Name: pkgreportaftertrigger; Type: TRIGGER; Schema: xtdesktop; Owner: admin
--

CREATE TRIGGER pkgreportaftertrigger AFTER INSERT OR DELETE OR UPDATE ON pkgreport FOR EACH ROW EXECUTE PROCEDURE public._pkgreportaftertrigger();


--
-- TOC entry 8360 (class 2620 OID 146572381)
-- Dependencies: 886 1028 8894
-- Name: pkgreportaltertrigger; Type: TRIGGER; Schema: xtdesktop; Owner: admin
--

CREATE TRIGGER pkgreportaltertrigger BEFORE INSERT OR DELETE OR UPDATE ON pkgreport FOR EACH ROW EXECUTE PROCEDURE public._pkgreportaltertrigger();


--
-- TOC entry 8361 (class 2620 OID 146572382)
-- Dependencies: 886 1029 8894
-- Name: pkgreportbeforetrigger; Type: TRIGGER; Schema: xtdesktop; Owner: admin
--

CREATE TRIGGER pkgreportbeforetrigger BEFORE INSERT OR DELETE OR UPDATE ON pkgreport FOR EACH ROW EXECUTE PROCEDURE public._pkgreportbeforetrigger();


--
-- TOC entry 8362 (class 2620 OID 146572383)
-- Dependencies: 887 959 8894
-- Name: pkgscriptaftertrigger; Type: TRIGGER; Schema: xtdesktop; Owner: admin
--

CREATE TRIGGER pkgscriptaftertrigger AFTER INSERT OR DELETE OR UPDATE ON pkgscript FOR EACH ROW EXECUTE PROCEDURE public._pkgscriptaftertrigger();


--
-- TOC entry 8363 (class 2620 OID 146572384)
-- Dependencies: 887 983 8894
-- Name: pkgscriptaltertrigger; Type: TRIGGER; Schema: xtdesktop; Owner: admin
--

CREATE TRIGGER pkgscriptaltertrigger BEFORE INSERT OR DELETE OR UPDATE ON pkgscript FOR EACH ROW EXECUTE PROCEDURE public._pkgscriptaltertrigger();


--
-- TOC entry 8364 (class 2620 OID 146572385)
-- Dependencies: 887 1003 8894
-- Name: pkgscriptbeforetrigger; Type: TRIGGER; Schema: xtdesktop; Owner: admin
--

CREATE TRIGGER pkgscriptbeforetrigger BEFORE INSERT OR DELETE OR UPDATE ON pkgscript FOR EACH ROW EXECUTE PROCEDURE public._pkgscriptbeforetrigger();


--
-- TOC entry 8365 (class 2620 OID 146572386)
-- Dependencies: 888 1011 8894
-- Name: pkguiformaftertrigger; Type: TRIGGER; Schema: xtdesktop; Owner: admin
--

CREATE TRIGGER pkguiformaftertrigger AFTER INSERT OR DELETE OR UPDATE ON pkguiform FOR EACH ROW EXECUTE PROCEDURE public._pkguiformaftertrigger();


--
-- TOC entry 8366 (class 2620 OID 146572387)
-- Dependencies: 888 1021 8894
-- Name: pkguiformaltertrigger; Type: TRIGGER; Schema: xtdesktop; Owner: admin
--

CREATE TRIGGER pkguiformaltertrigger BEFORE INSERT OR DELETE OR UPDATE ON pkguiform FOR EACH ROW EXECUTE PROCEDURE public._pkguiformaltertrigger();


--
-- TOC entry 8367 (class 2620 OID 146572388)
-- Dependencies: 888 945 8894
-- Name: pkguiformbeforetrigger; Type: TRIGGER; Schema: xtdesktop; Owner: admin
--

CREATE TRIGGER pkguiformbeforetrigger BEFORE INSERT OR DELETE OR UPDATE ON pkguiform FOR EACH ROW EXECUTE PROCEDURE public._pkguiformbeforetrigger();



--
-- TOC entry 7968 (class 2606 OID 146572389)
-- Dependencies: 7164 399 402 8894
-- Name: pkgcmdarg_cmdarg_cmd_id_fkey; Type: FK CONSTRAINT; Schema: fixcountry; Owner: admin
--

ALTER TABLE ONLY pkgcmdarg
    ADD CONSTRAINT pkgcmdarg_cmdarg_cmd_id_fkey FOREIGN KEY (cmdarg_cmd_id) REFERENCES pkgcmd(cmd_id);



--
-- TOC entry 7863 (class 2606 OID 146572394)
-- Dependencies: 7298 523 262 8894
-- Name: accnt_accnt_company_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY accnt
    ADD CONSTRAINT accnt_accnt_company_fkey FOREIGN KEY (accnt_company) REFERENCES company(company_number) ON UPDATE CASCADE;


--
-- TOC entry 7864 (class 2606 OID 146572399)
-- Dependencies: 6834 208 262 8894
-- Name: accnt_to_curr_symbol; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY accnt
    ADD CONSTRAINT accnt_to_curr_symbol FOREIGN KEY (accnt_curr_id) REFERENCES curr_symbol(curr_id);


--
-- TOC entry 7969 (class 2606 OID 146572404)
-- Dependencies: 7204 430 428 8894
-- Name: apapply_apapply_checkhead_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY apapply
    ADD CONSTRAINT apapply_apapply_checkhead_id_fkey FOREIGN KEY (apapply_checkhead_id) REFERENCES checkhead(checkhead_id);


--
-- TOC entry 7970 (class 2606 OID 146572409)
-- Dependencies: 6841 210 428 8894
-- Name: apapply_apapply_vend_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY apapply
    ADD CONSTRAINT apapply_apapply_vend_id_fkey FOREIGN KEY (apapply_vend_id) REFERENCES vendinfo(vend_id);


--
-- TOC entry 7971 (class 2606 OID 146572414)
-- Dependencies: 6834 208 428 8894
-- Name: apapply_to_curr_symbol; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY apapply
    ADD CONSTRAINT apapply_to_curr_symbol FOREIGN KEY (apapply_curr_id) REFERENCES curr_symbol(curr_id);


--
-- TOC entry 7979 (class 2606 OID 146572419)
-- Dependencies: 6834 208 434 8894
-- Name: apcreditapply_curr_symbol; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY apcreditapply
    ADD CONSTRAINT apcreditapply_curr_symbol FOREIGN KEY (apcreditapply_curr_id) REFERENCES curr_symbol(curr_id);


--
-- TOC entry 7792 (class 2606 OID 146572424)
-- Dependencies: 6841 210 207 8894
-- Name: apopen_apopen_vend_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY apopen
    ADD CONSTRAINT apopen_apopen_vend_id_fkey FOREIGN KEY (apopen_vend_id) REFERENCES vendinfo(vend_id);


--
-- TOC entry 7793 (class 2606 OID 146572429)
-- Dependencies: 6834 208 207 8894
-- Name: apopen_to_curr_symbol; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY apopen
    ADD CONSTRAINT apopen_to_curr_symbol FOREIGN KEY (apopen_curr_id) REFERENCES curr_symbol(curr_id);


--
-- TOC entry 7980 (class 2606 OID 146572434)
-- Dependencies: 7124 363 438 8894
-- Name: apopentax_taxhist_basis_tax_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY apopentax
    ADD CONSTRAINT apopentax_taxhist_basis_tax_id_fkey FOREIGN KEY (taxhist_basis_tax_id) REFERENCES tax(tax_id);


--
-- TOC entry 7981 (class 2606 OID 146572439)
-- Dependencies: 6828 207 438 8894
-- Name: apopentax_taxhist_parent_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY apopentax
    ADD CONSTRAINT apopentax_taxhist_parent_id_fkey FOREIGN KEY (taxhist_parent_id) REFERENCES apopen(apopen_id) ON DELETE CASCADE;


--
-- TOC entry 7982 (class 2606 OID 146572444)
-- Dependencies: 7124 363 438 8894
-- Name: apopentax_taxhist_tax_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY apopentax
    ADD CONSTRAINT apopentax_taxhist_tax_id_fkey FOREIGN KEY (taxhist_tax_id) REFERENCES tax(tax_id);


--
-- TOC entry 7983 (class 2606 OID 146572449)
-- Dependencies: 6796 199 438 8894
-- Name: apopentax_taxhist_taxtype_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY apopentax
    ADD CONSTRAINT apopentax_taxhist_taxtype_id_fkey FOREIGN KEY (taxhist_taxtype_id) REFERENCES taxtype(taxtype_id);


--
-- TOC entry 7984 (class 2606 OID 146572454)
-- Dependencies: 6834 208 439 8894
-- Name: apselect_to_curr_symbol; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY apselect
    ADD CONSTRAINT apselect_to_curr_symbol FOREIGN KEY (apselect_curr_id) REFERENCES curr_symbol(curr_id);


--
-- TOC entry 7985 (class 2606 OID 146572459)
-- Dependencies: 6834 208 443 8894
-- Name: arapply_to_curr_symbol; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY arapply
    ADD CONSTRAINT arapply_to_curr_symbol FOREIGN KEY (arapply_curr_id) REFERENCES curr_symbol(curr_id);


--
-- TOC entry 7986 (class 2606 OID 146572464)
-- Dependencies: 6834 208 446 8894
-- Name: arcreditapply_curr_symbol; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY arcreditapply
    ADD CONSTRAINT arcreditapply_curr_symbol FOREIGN KEY (arcreditapply_curr_id) REFERENCES curr_symbol(curr_id);


--
-- TOC entry 7800 (class 2606 OID 146572469)
-- Dependencies: 6853 213 212 8894
-- Name: aropen_aropen_cust_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY aropen
    ADD CONSTRAINT aropen_aropen_cust_id_fkey FOREIGN KEY (aropen_cust_id) REFERENCES custinfo(cust_id);


--
-- TOC entry 7801 (class 2606 OID 146572474)
-- Dependencies: 6865 216 212 8894
-- Name: aropen_aropen_salesrep_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY aropen
    ADD CONSTRAINT aropen_aropen_salesrep_id_fkey FOREIGN KEY (aropen_salesrep_id) REFERENCES salesrep(salesrep_id);


--
-- TOC entry 7802 (class 2606 OID 146572479)
-- Dependencies: 6834 208 212 8894
-- Name: aropen_to_curr_symbol; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY aropen
    ADD CONSTRAINT aropen_to_curr_symbol FOREIGN KEY (aropen_curr_id) REFERENCES curr_symbol(curr_id);


--
-- TOC entry 7987 (class 2606 OID 146572484)
-- Dependencies: 7124 363 450 8894
-- Name: aropentax_taxhist_basis_tax_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY aropentax
    ADD CONSTRAINT aropentax_taxhist_basis_tax_id_fkey FOREIGN KEY (taxhist_basis_tax_id) REFERENCES tax(tax_id);


--
-- TOC entry 7988 (class 2606 OID 146572489)
-- Dependencies: 6849 212 450 8894
-- Name: aropentax_taxhist_parent_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY aropentax
    ADD CONSTRAINT aropentax_taxhist_parent_id_fkey FOREIGN KEY (taxhist_parent_id) REFERENCES aropen(aropen_id) ON DELETE CASCADE;


--
-- TOC entry 7989 (class 2606 OID 146572494)
-- Dependencies: 7124 363 450 8894
-- Name: aropentax_taxhist_tax_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY aropentax
    ADD CONSTRAINT aropentax_taxhist_tax_id_fkey FOREIGN KEY (taxhist_tax_id) REFERENCES tax(tax_id);


--
-- TOC entry 7990 (class 2606 OID 146572499)
-- Dependencies: 6796 199 450 8894
-- Name: aropentax_taxhist_taxtype_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY aropentax
    ADD CONSTRAINT aropentax_taxhist_taxtype_id_fkey FOREIGN KEY (taxhist_taxtype_id) REFERENCES taxtype(taxtype_id);


--
-- TOC entry 7991 (class 2606 OID 146572504)
-- Dependencies: 6796 199 451 8894
-- Name: asohist_asohist_taxtype_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY asohist
    ADD CONSTRAINT asohist_asohist_taxtype_id_fkey FOREIGN KEY (asohist_taxtype_id) REFERENCES taxtype(taxtype_id);


--
-- TOC entry 7992 (class 2606 OID 146572509)
-- Dependencies: 6878 220 451 8894
-- Name: asohist_asohist_taxzone_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY asohist
    ADD CONSTRAINT asohist_asohist_taxzone_id_fkey FOREIGN KEY (asohist_taxzone_id) REFERENCES taxzone(taxzone_id);


--
-- TOC entry 7993 (class 2606 OID 146572514)
-- Dependencies: 6834 208 451 8894
-- Name: asohist_to_curr_symbol; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY asohist
    ADD CONSTRAINT asohist_to_curr_symbol FOREIGN KEY (asohist_curr_id) REFERENCES curr_symbol(curr_id);


--
-- TOC entry 7994 (class 2606 OID 146572519)
-- Dependencies: 7124 363 453 8894
-- Name: asohisttax_taxhist_basis_tax_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY asohisttax
    ADD CONSTRAINT asohisttax_taxhist_basis_tax_id_fkey FOREIGN KEY (taxhist_basis_tax_id) REFERENCES tax(tax_id);


--
-- TOC entry 7995 (class 2606 OID 146572524)
-- Dependencies: 7229 451 453 8894
-- Name: asohisttax_taxhist_parent_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY asohisttax
    ADD CONSTRAINT asohisttax_taxhist_parent_id_fkey FOREIGN KEY (taxhist_parent_id) REFERENCES asohist(asohist_id) ON DELETE CASCADE;


--
-- TOC entry 7996 (class 2606 OID 146572529)
-- Dependencies: 7124 363 453 8894
-- Name: asohisttax_taxhist_tax_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY asohisttax
    ADD CONSTRAINT asohisttax_taxhist_tax_id_fkey FOREIGN KEY (taxhist_tax_id) REFERENCES tax(tax_id);


--
-- TOC entry 7997 (class 2606 OID 146572534)
-- Dependencies: 6796 199 453 8894
-- Name: asohisttax_taxhist_taxtype_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY asohisttax
    ADD CONSTRAINT asohisttax_taxhist_taxtype_id_fkey FOREIGN KEY (taxhist_taxtype_id) REFERENCES taxtype(taxtype_id);


--
-- TOC entry 7867 (class 2606 OID 146572539)
-- Dependencies: 6834 208 266 8894
-- Name: bankaccnt_to_curr_symbol; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY bankaccnt
    ADD CONSTRAINT bankaccnt_to_curr_symbol FOREIGN KEY (bankaccnt_curr_id) REFERENCES curr_symbol(curr_id);


--
-- TOC entry 7998 (class 2606 OID 146572544)
-- Dependencies: 6834 208 458 8894
-- Name: bankadj_to_curr_symbol; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY bankadj
    ADD CONSTRAINT bankadj_to_curr_symbol FOREIGN KEY (bankadj_curr_id) REFERENCES curr_symbol(curr_id);


--
-- TOC entry 7860 (class 2606 OID 146572549)
-- Dependencies: 6751 191 254 8894
-- Name: bomhead_bomhead_item_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY bomhead
    ADD CONSTRAINT bomhead_bomhead_item_id_fkey FOREIGN KEY (bomhead_item_id) REFERENCES item(item_id) ON UPDATE RESTRICT ON DELETE CASCADE;


--
-- TOC entry 7767 (class 2606 OID 146572554)
-- Dependencies: 6924 236 203 8894
-- Name: bomitem_bomitem_char_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY bomitem
    ADD CONSTRAINT bomitem_bomitem_char_id_fkey FOREIGN KEY (bomitem_char_id) REFERENCES "char"(char_id);


--
-- TOC entry 7768 (class 2606 OID 146572559)
-- Dependencies: 6751 191 203 8894
-- Name: bomitem_bomitem_item_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY bomitem
    ADD CONSTRAINT bomitem_bomitem_item_id_fkey FOREIGN KEY (bomitem_item_id) REFERENCES item(item_id);


--
-- TOC entry 7769 (class 2606 OID 146572564)
-- Dependencies: 6751 191 203 8894
-- Name: bomitem_bomitem_parent_item_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY bomitem
    ADD CONSTRAINT bomitem_bomitem_parent_item_id_fkey FOREIGN KEY (bomitem_parent_item_id) REFERENCES item(item_id) ON UPDATE RESTRICT ON DELETE CASCADE;


--
-- TOC entry 7770 (class 2606 OID 146572569)
-- Dependencies: 6800 200 203 8894
-- Name: bomitem_bomitem_uom_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY bomitem
    ADD CONSTRAINT bomitem_bomitem_uom_id_fkey FOREIGN KEY (bomitem_uom_id) REFERENCES uom(uom_id);


--
-- TOC entry 7999 (class 2606 OID 146572574)
-- Dependencies: 6810 203 468 8894
-- Name: bomitemcost_bomitemcost_bomitem_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY bomitemcost
    ADD CONSTRAINT bomitemcost_bomitemcost_bomitem_id_fkey FOREIGN KEY (bomitemcost_bomitem_id) REFERENCES bomitem(bomitem_id);


--
-- TOC entry 8000 (class 2606 OID 146572579)
-- Dependencies: 7049 320 468 8894
-- Name: bomitemcost_bomitemcost_costelem_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY bomitemcost
    ADD CONSTRAINT bomitemcost_bomitemcost_costelem_id_fkey FOREIGN KEY (bomitemcost_costelem_id) REFERENCES costelem(costelem_id);


--
-- TOC entry 8001 (class 2606 OID 146572584)
-- Dependencies: 6834 208 468 8894
-- Name: bomitemcost_bomitemcost_curr_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY bomitemcost
    ADD CONSTRAINT bomitemcost_bomitemcost_curr_id_fkey FOREIGN KEY (bomitemcost_curr_id) REFERENCES curr_symbol(curr_id);


--
-- TOC entry 7861 (class 2606 OID 146572589)
-- Dependencies: 6810 203 258 8894
-- Name: bomitemsub_bomitemsub_bomitem_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY bomitemsub
    ADD CONSTRAINT bomitemsub_bomitemsub_bomitem_id_fkey FOREIGN KEY (bomitemsub_bomitem_id) REFERENCES bomitem(bomitem_id) ON UPDATE RESTRICT ON DELETE CASCADE;


--
-- TOC entry 7862 (class 2606 OID 146572594)
-- Dependencies: 6751 191 258 8894
-- Name: bomitemsub_bomitemsub_item_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY bomitemsub
    ADD CONSTRAINT bomitemsub_bomitemsub_item_id_fkey FOREIGN KEY (bomitemsub_item_id) REFERENCES item(item_id) ON UPDATE RESTRICT ON DELETE CASCADE;


--
-- TOC entry 8002 (class 2606 OID 146572599)
-- Dependencies: 6924 236 471 8894
-- Name: bomwork_bomwork_char_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY bomwork
    ADD CONSTRAINT bomwork_bomwork_char_id_fkey FOREIGN KEY (bomwork_char_id) REFERENCES "char"(char_id);


--
-- TOC entry 7865 (class 2606 OID 146572604)
-- Dependencies: 6952 260 263 8894
-- Name: budgitem_budgitem_budghead_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY budgitem
    ADD CONSTRAINT budgitem_budgitem_budghead_id_fkey FOREIGN KEY (budgitem_budghead_id) REFERENCES budghead(budghead_id);


--
-- TOC entry 7866 (class 2606 OID 146572609)
-- Dependencies: 6959 264 263 8894
-- Name: budgitem_budgitem_period_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY budgitem
    ADD CONSTRAINT budgitem_budgitem_period_id_fkey FOREIGN KEY (budgitem_period_id) REFERENCES period(period_id);


--
-- TOC entry 7868 (class 2606 OID 146572614)
-- Dependencies: 6963 266 267 8894
-- Name: cashrcpt_bankaccnt_bankaccnt_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY cashrcpt
    ADD CONSTRAINT cashrcpt_bankaccnt_bankaccnt_id_fkey FOREIGN KEY (cashrcpt_bankaccnt_id) REFERENCES bankaccnt(bankaccnt_id);


--
-- TOC entry 7869 (class 2606 OID 146572619)
-- Dependencies: 6853 213 267 8894
-- Name: cashrcpt_cust_cust_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY cashrcpt
    ADD CONSTRAINT cashrcpt_cust_cust_id_fkey FOREIGN KEY (cashrcpt_cust_id) REFERENCES custinfo(cust_id);


--
-- TOC entry 7870 (class 2606 OID 146572624)
-- Dependencies: 6834 208 267 8894
-- Name: cashrcpt_to_curr_symbol; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY cashrcpt
    ADD CONSTRAINT cashrcpt_to_curr_symbol FOREIGN KEY (cashrcpt_curr_id) REFERENCES curr_symbol(curr_id);


--
-- TOC entry 7871 (class 2606 OID 146572629)
-- Dependencies: 6849 212 269 8894
-- Name: cashrcptitem_aropen_aropen_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY cashrcptitem
    ADD CONSTRAINT cashrcptitem_aropen_aropen_id_fkey FOREIGN KEY (cashrcptitem_aropen_id) REFERENCES aropen(aropen_id);


--
-- TOC entry 7872 (class 2606 OID 146572634)
-- Dependencies: 6967 267 269 8894
-- Name: cashrcptitem_cashrcpt_cashrcpt_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY cashrcptitem
    ADD CONSTRAINT cashrcptitem_cashrcpt_cashrcpt_id_fkey FOREIGN KEY (cashrcptitem_cashrcpt_id) REFERENCES cashrcpt(cashrcpt_id);


--
-- TOC entry 7873 (class 2606 OID 146572639)
-- Dependencies: 6954 262 271 8894
-- Name: cashrcptmisc_accnt_accnt_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY cashrcptmisc
    ADD CONSTRAINT cashrcptmisc_accnt_accnt_id_fkey FOREIGN KEY (cashrcptmisc_accnt_id) REFERENCES accnt(accnt_id);


--
-- TOC entry 7874 (class 2606 OID 146572644)
-- Dependencies: 6967 267 271 8894
-- Name: cashrcptmisc_cashrcpt_cashrcpt_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY cashrcptmisc
    ADD CONSTRAINT cashrcptmisc_cashrcpt_cashrcpt_id_fkey FOREIGN KEY (cashrcptmisc_cashrcpt_id) REFERENCES cashrcpt(cashrcpt_id);


--
-- TOC entry 7875 (class 2606 OID 146572649)
-- Dependencies: 6853 213 278 8894
-- Name: ccard_ccard_cust_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY ccard
    ADD CONSTRAINT ccard_ccard_cust_id_fkey FOREIGN KEY (ccard_cust_id) REFERENCES custinfo(cust_id);


--
-- TOC entry 8003 (class 2606 OID 146572654)
-- Dependencies: 6963 266 484 8894
-- Name: ccbank_ccbank_bankaccnt_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY ccbank
    ADD CONSTRAINT ccbank_ccbank_bankaccnt_id_fkey FOREIGN KEY (ccbank_bankaccnt_id) REFERENCES bankaccnt(bankaccnt_id);


--
-- TOC entry 8004 (class 2606 OID 146572659)
-- Dependencies: 6924 236 490 8894
-- Name: charopt_charopt_char_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY charopt
    ADD CONSTRAINT charopt_charopt_char_id_fkey FOREIGN KEY (charopt_char_id) REFERENCES "char"(char_id) ON DELETE CASCADE;


--
-- TOC entry 7972 (class 2606 OID 146572664)
-- Dependencies: 6963 266 430 8894
-- Name: checkhead_checkhead_bankaccnt_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY checkhead
    ADD CONSTRAINT checkhead_checkhead_bankaccnt_id_fkey FOREIGN KEY (checkhead_bankaccnt_id) REFERENCES bankaccnt(bankaccnt_id);


--
-- TOC entry 7973 (class 2606 OID 146572669)
-- Dependencies: 6834 208 430 8894
-- Name: checkhead_checkhead_curr_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY checkhead
    ADD CONSTRAINT checkhead_checkhead_curr_id_fkey FOREIGN KEY (checkhead_curr_id) REFERENCES curr_symbol(curr_id);


--
-- TOC entry 7974 (class 2606 OID 146572674)
-- Dependencies: 7118 358 430 8894
-- Name: checkhead_checkhead_expcat_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY checkhead
    ADD CONSTRAINT checkhead_checkhead_expcat_id_fkey FOREIGN KEY (checkhead_expcat_id) REFERENCES expcat(expcat_id);


--
-- TOC entry 7975 (class 2606 OID 146572679)
-- Dependencies: 6828 207 432 8894
-- Name: checkitem_checkitem_apopen_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY checkitem
    ADD CONSTRAINT checkitem_checkitem_apopen_id_fkey FOREIGN KEY (checkitem_apopen_id) REFERENCES apopen(apopen_id);


--
-- TOC entry 7976 (class 2606 OID 146572684)
-- Dependencies: 6849 212 432 8894
-- Name: checkitem_checkitem_aropen_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY checkitem
    ADD CONSTRAINT checkitem_checkitem_aropen_id_fkey FOREIGN KEY (checkitem_aropen_id) REFERENCES aropen(aropen_id);


--
-- TOC entry 7977 (class 2606 OID 146572689)
-- Dependencies: 7204 430 432 8894
-- Name: checkitem_checkitem_checkhead_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY checkitem
    ADD CONSTRAINT checkitem_checkitem_checkhead_id_fkey FOREIGN KEY (checkitem_checkhead_id) REFERENCES checkhead(checkhead_id);


--
-- TOC entry 7978 (class 2606 OID 146572694)
-- Dependencies: 6834 208 432 8894
-- Name: checkitem_checkitem_curr_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY checkitem
    ADD CONSTRAINT checkitem_checkitem_curr_id_fkey FOREIGN KEY (checkitem_curr_id) REFERENCES curr_symbol(curr_id);


--
-- TOC entry 7967 (class 2606 OID 146572699)
-- Dependencies: 7162 397 400 8894
-- Name: cmdarg_cmdarg_cmd_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY cmdarg
    ADD CONSTRAINT cmdarg_cmdarg_cmd_id_fkey FOREIGN KEY (cmdarg_cmd_id) REFERENCES cmd(cmd_id) ON DELETE CASCADE;


--
-- TOC entry 7813 (class 2606 OID 146572704)
-- Dependencies: 6853 213 218 8894
-- Name: cmhead_cmhead_cust_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY cmhead
    ADD CONSTRAINT cmhead_cmhead_cust_id_fkey FOREIGN KEY (cmhead_cust_id) REFERENCES custinfo(cust_id);


--
-- TOC entry 7814 (class 2606 OID 146572709)
-- Dependencies: 6796 199 218 8894
-- Name: cmhead_cmhead_freighttaxtype_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY cmhead
    ADD CONSTRAINT cmhead_cmhead_freighttaxtype_id_fkey FOREIGN KEY (cmhead_freighttaxtype_id) REFERENCES taxtype(taxtype_id);


--
-- TOC entry 7815 (class 2606 OID 146572714)
-- Dependencies: 6891 225 218 8894
-- Name: cmhead_cmhead_prj_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY cmhead
    ADD CONSTRAINT cmhead_cmhead_prj_id_fkey FOREIGN KEY (cmhead_prj_id) REFERENCES prj(prj_id);


--
-- TOC entry 7816 (class 2606 OID 146572719)
-- Dependencies: 6865 216 218 8894
-- Name: cmhead_cmhead_salesrep_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY cmhead
    ADD CONSTRAINT cmhead_cmhead_salesrep_id_fkey FOREIGN KEY (cmhead_salesrep_id) REFERENCES salesrep(salesrep_id);


--
-- TOC entry 7817 (class 2606 OID 146572724)
-- Dependencies: 6895 226 218 8894
-- Name: cmhead_cmhead_saletype_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY cmhead
    ADD CONSTRAINT cmhead_cmhead_saletype_id_fkey FOREIGN KEY (cmhead_saletype_id) REFERENCES saletype(saletype_id);


--
-- TOC entry 7818 (class 2606 OID 146572729)
-- Dependencies: 6897 227 218 8894
-- Name: cmhead_cmhead_shipzone_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY cmhead
    ADD CONSTRAINT cmhead_cmhead_shipzone_id_fkey FOREIGN KEY (cmhead_shipzone_id) REFERENCES shipzone(shipzone_id);


--
-- TOC entry 7819 (class 2606 OID 146572734)
-- Dependencies: 6878 220 218 8894
-- Name: cmhead_cmhead_taxzone_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY cmhead
    ADD CONSTRAINT cmhead_cmhead_taxzone_id_fkey FOREIGN KEY (cmhead_taxzone_id) REFERENCES taxzone(taxzone_id);


--
-- TOC entry 7820 (class 2606 OID 146572739)
-- Dependencies: 6834 208 218 8894
-- Name: cmhead_to_curr_symbol; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY cmhead
    ADD CONSTRAINT cmhead_to_curr_symbol FOREIGN KEY (cmhead_curr_id) REFERENCES curr_symbol(curr_id);


--
-- TOC entry 8005 (class 2606 OID 146572744)
-- Dependencies: 7124 363 497 8894
-- Name: cmheadtax_taxhist_basis_tax_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY cmheadtax
    ADD CONSTRAINT cmheadtax_taxhist_basis_tax_id_fkey FOREIGN KEY (taxhist_basis_tax_id) REFERENCES tax(tax_id);


--
-- TOC entry 8006 (class 2606 OID 146572749)
-- Dependencies: 6872 218 497 8894
-- Name: cmheadtax_taxhist_parent_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY cmheadtax
    ADD CONSTRAINT cmheadtax_taxhist_parent_id_fkey FOREIGN KEY (taxhist_parent_id) REFERENCES cmhead(cmhead_id) ON DELETE CASCADE;


--
-- TOC entry 8007 (class 2606 OID 146572754)
-- Dependencies: 7124 363 497 8894
-- Name: cmheadtax_taxhist_tax_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY cmheadtax
    ADD CONSTRAINT cmheadtax_taxhist_tax_id_fkey FOREIGN KEY (taxhist_tax_id) REFERENCES tax(tax_id);


--
-- TOC entry 8008 (class 2606 OID 146572759)
-- Dependencies: 6796 199 497 8894
-- Name: cmheadtax_taxhist_taxtype_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY cmheadtax
    ADD CONSTRAINT cmheadtax_taxhist_taxtype_id_fkey FOREIGN KEY (taxhist_taxtype_id) REFERENCES taxtype(taxtype_id);


--
-- TOC entry 7830 (class 2606 OID 146572764)
-- Dependencies: 6872 218 222 8894
-- Name: cmitem_cmhead_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY cmitem
    ADD CONSTRAINT cmitem_cmhead_id_fkey FOREIGN KEY (cmitem_cmhead_id) REFERENCES cmhead(cmhead_id) ON UPDATE CASCADE ON DELETE CASCADE;


--
-- TOC entry 7831 (class 2606 OID 146572769)
-- Dependencies: 6800 200 222 8894
-- Name: cmitem_cmitem_price_uom_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY cmitem
    ADD CONSTRAINT cmitem_cmitem_price_uom_id_fkey FOREIGN KEY (cmitem_price_uom_id) REFERENCES uom(uom_id);


--
-- TOC entry 7832 (class 2606 OID 146572774)
-- Dependencies: 6800 200 222 8894
-- Name: cmitem_cmitem_qty_uom_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY cmitem
    ADD CONSTRAINT cmitem_cmitem_qty_uom_id_fkey FOREIGN KEY (cmitem_qty_uom_id) REFERENCES uom(uom_id);


--
-- TOC entry 7833 (class 2606 OID 146572779)
-- Dependencies: 6796 199 222 8894
-- Name: cmitem_cmitem_taxtype_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY cmitem
    ADD CONSTRAINT cmitem_cmitem_taxtype_id_fkey FOREIGN KEY (cmitem_taxtype_id) REFERENCES taxtype(taxtype_id);


--
-- TOC entry 8009 (class 2606 OID 146572784)
-- Dependencies: 7124 363 499 8894
-- Name: cmitemtax_taxhist_basis_tax_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY cmitemtax
    ADD CONSTRAINT cmitemtax_taxhist_basis_tax_id_fkey FOREIGN KEY (taxhist_basis_tax_id) REFERENCES tax(tax_id);


--
-- TOC entry 8010 (class 2606 OID 146572789)
-- Dependencies: 6884 222 499 8894
-- Name: cmitemtax_taxhist_parent_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY cmitemtax
    ADD CONSTRAINT cmitemtax_taxhist_parent_id_fkey FOREIGN KEY (taxhist_parent_id) REFERENCES cmitem(cmitem_id) ON DELETE CASCADE;


--
-- TOC entry 8011 (class 2606 OID 146572794)
-- Dependencies: 7124 363 499 8894
-- Name: cmitemtax_taxhist_tax_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY cmitemtax
    ADD CONSTRAINT cmitemtax_taxhist_tax_id_fkey FOREIGN KEY (taxhist_tax_id) REFERENCES tax(tax_id);


--
-- TOC entry 8012 (class 2606 OID 146572799)
-- Dependencies: 6796 199 499 8894
-- Name: cmitemtax_taxhist_taxtype_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY cmitemtax
    ADD CONSTRAINT cmitemtax_taxhist_taxtype_id_fkey FOREIGN KEY (taxhist_taxtype_id) REFERENCES taxtype(taxtype_id);


--
-- TOC entry 7771 (class 2606 OID 146572804)
-- Dependencies: 6920 234 204 8894
-- Name: cntct_cntct_addr_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY cntct
    ADD CONSTRAINT cntct_cntct_addr_id_fkey FOREIGN KEY (cntct_addr_id) REFERENCES addr(addr_id);


--
-- TOC entry 7772 (class 2606 OID 146572809)
-- Dependencies: 6820 205 204 8894
-- Name: cntct_cntct_crmacct_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY cntct
    ADD CONSTRAINT cntct_cntct_crmacct_id_fkey FOREIGN KEY (cntct_crmacct_id) REFERENCES crmacct(crmacct_id);


--
-- TOC entry 8013 (class 2606 OID 146572814)
-- Dependencies: 6920 234 504 8894
-- Name: cntctaddr_cntctaddr_addr_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY cntctaddr
    ADD CONSTRAINT cntctaddr_cntctaddr_addr_id_fkey FOREIGN KEY (cntctaddr_addr_id) REFERENCES addr(addr_id);


--
-- TOC entry 8014 (class 2606 OID 146572819)
-- Dependencies: 6816 204 504 8894
-- Name: cntctaddr_cntctaddr_cntct_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY cntctaddr
    ADD CONSTRAINT cntctaddr_cntctaddr_cntct_id_fkey FOREIGN KEY (cntctaddr_cntct_id) REFERENCES cntct(cntct_id) ON DELETE CASCADE;


--
-- TOC entry 8015 (class 2606 OID 146572824)
-- Dependencies: 6816 204 506 8894
-- Name: cntctdata_cntctdata_cntct_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY cntctdata
    ADD CONSTRAINT cntctdata_cntctdata_cntct_id_fkey FOREIGN KEY (cntctdata_cntct_id) REFERENCES cntct(cntct_id) ON DELETE CASCADE;


--
-- TOC entry 8016 (class 2606 OID 146572829)
-- Dependencies: 6816 204 508 8894
-- Name: cntcteml_cntcteml_cntct_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY cntcteml
    ADD CONSTRAINT cntcteml_cntcteml_cntct_id_fkey FOREIGN KEY (cntcteml_cntct_id) REFERENCES cntct(cntct_id) ON DELETE CASCADE;


--
-- TOC entry 8017 (class 2606 OID 146572834)
-- Dependencies: 6816 204 510 8894
-- Name: cntctmrgd_cntctmrgd_cntct_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY cntctmrgd
    ADD CONSTRAINT cntctmrgd_cntctmrgd_cntct_id_fkey FOREIGN KEY (cntctmrgd_cntct_id) REFERENCES cntct(cntct_id) ON DELETE CASCADE;


--
-- TOC entry 8018 (class 2606 OID 146572839)
-- Dependencies: 6816 204 511 8894
-- Name: cntctsel_cntctsel_cntct_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY cntctsel
    ADD CONSTRAINT cntctsel_cntctsel_cntct_id_fkey FOREIGN KEY (cntctsel_cntct_id) REFERENCES cntct(cntct_id) ON DELETE CASCADE;


--
-- TOC entry 8019 (class 2606 OID 146572844)
-- Dependencies: 6905 229 513 8894
-- Name: cobill_cobill_invcitem_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY cobill
    ADD CONSTRAINT cobill_cobill_invcitem_id_fkey FOREIGN KEY (cobill_invcitem_id) REFERENCES invcitem(invcitem_id);


--
-- TOC entry 8020 (class 2606 OID 146572849)
-- Dependencies: 6796 199 513 8894
-- Name: cobill_cobill_taxtype_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY cobill
    ADD CONSTRAINT cobill_cobill_taxtype_id_fkey FOREIGN KEY (cobill_taxtype_id) REFERENCES taxtype(taxtype_id);


--
-- TOC entry 8021 (class 2606 OID 146572854)
-- Dependencies: 7124 363 515 8894
-- Name: cobilltax_taxhist_basis_tax_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY cobilltax
    ADD CONSTRAINT cobilltax_taxhist_basis_tax_id_fkey FOREIGN KEY (taxhist_basis_tax_id) REFERENCES tax(tax_id);


--
-- TOC entry 8022 (class 2606 OID 146572859)
-- Dependencies: 7288 513 515 8894
-- Name: cobilltax_taxhist_parent_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY cobilltax
    ADD CONSTRAINT cobilltax_taxhist_parent_id_fkey FOREIGN KEY (taxhist_parent_id) REFERENCES cobill(cobill_id) ON DELETE CASCADE;


--
-- TOC entry 8023 (class 2606 OID 146572864)
-- Dependencies: 7124 363 515 8894
-- Name: cobilltax_taxhist_tax_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY cobilltax
    ADD CONSTRAINT cobilltax_taxhist_tax_id_fkey FOREIGN KEY (taxhist_tax_id) REFERENCES tax(tax_id);


--
-- TOC entry 8024 (class 2606 OID 146572869)
-- Dependencies: 6796 199 515 8894
-- Name: cobilltax_taxhist_taxtype_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY cobilltax
    ADD CONSTRAINT cobilltax_taxhist_taxtype_id_fkey FOREIGN KEY (taxhist_taxtype_id) REFERENCES taxtype(taxtype_id);


--
-- TOC entry 8025 (class 2606 OID 146572874)
-- Dependencies: 6889 224 516 8894
-- Name: cobmisc_cobmisc_invchead_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY cobmisc
    ADD CONSTRAINT cobmisc_cobmisc_invchead_id_fkey FOREIGN KEY (cobmisc_invchead_id) REFERENCES invchead(invchead_id);


--
-- TOC entry 8026 (class 2606 OID 146572879)
-- Dependencies: 6796 199 516 8894
-- Name: cobmisc_cobmisc_taxtype_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY cobmisc
    ADD CONSTRAINT cobmisc_cobmisc_taxtype_id_fkey FOREIGN KEY (cobmisc_taxtype_id) REFERENCES taxtype(taxtype_id);


--
-- TOC entry 8027 (class 2606 OID 146572884)
-- Dependencies: 6878 220 516 8894
-- Name: cobmisc_cobmisc_taxzone_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY cobmisc
    ADD CONSTRAINT cobmisc_cobmisc_taxzone_id_fkey FOREIGN KEY (cobmisc_taxzone_id) REFERENCES taxzone(taxzone_id);


--
-- TOC entry 8028 (class 2606 OID 146572889)
-- Dependencies: 6834 208 516 8894
-- Name: cobmisc_to_curr_symbol; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY cobmisc
    ADD CONSTRAINT cobmisc_to_curr_symbol FOREIGN KEY (cobmisc_curr_id) REFERENCES curr_symbol(curr_id);


--
-- TOC entry 8029 (class 2606 OID 146572894)
-- Dependencies: 7124 363 518 8894
-- Name: cobmisctax_taxhist_basis_tax_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY cobmisctax
    ADD CONSTRAINT cobmisctax_taxhist_basis_tax_id_fkey FOREIGN KEY (taxhist_basis_tax_id) REFERENCES tax(tax_id);


--
-- TOC entry 8030 (class 2606 OID 146572899)
-- Dependencies: 7293 516 518 8894
-- Name: cobmisctax_taxhist_parent_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY cobmisctax
    ADD CONSTRAINT cobmisctax_taxhist_parent_id_fkey FOREIGN KEY (taxhist_parent_id) REFERENCES cobmisc(cobmisc_id) ON DELETE CASCADE;


--
-- TOC entry 8031 (class 2606 OID 146572904)
-- Dependencies: 7124 363 518 8894
-- Name: cobmisctax_taxhist_tax_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY cobmisctax
    ADD CONSTRAINT cobmisctax_taxhist_tax_id_fkey FOREIGN KEY (taxhist_tax_id) REFERENCES tax(tax_id);


--
-- TOC entry 8032 (class 2606 OID 146572909)
-- Dependencies: 6796 199 518 8894
-- Name: cobmisctax_taxhist_taxtype_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY cobmisctax
    ADD CONSTRAINT cobmisctax_taxhist_taxtype_id_fkey FOREIGN KEY (taxhist_taxtype_id) REFERENCES taxtype(taxtype_id);


--
-- TOC entry 7725 (class 2606 OID 146572914)
-- Dependencies: 6816 204 195 8894
-- Name: cohead_cohead_billto_cntct_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY cohead
    ADD CONSTRAINT cohead_cohead_billto_cntct_id_fkey FOREIGN KEY (cohead_billto_cntct_id) REFERENCES cntct(cntct_id);


--
-- TOC entry 7726 (class 2606 OID 146572919)
-- Dependencies: 6853 213 195 8894
-- Name: cohead_cohead_cust_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY cohead
    ADD CONSTRAINT cohead_cohead_cust_id_fkey FOREIGN KEY (cohead_cust_id) REFERENCES custinfo(cust_id);


--
-- TOC entry 7727 (class 2606 OID 146572924)
-- Dependencies: 6954 262 195 8894
-- Name: cohead_cohead_misc_accnt_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY cohead
    ADD CONSTRAINT cohead_cohead_misc_accnt_id_fkey FOREIGN KEY (cohead_misc_accnt_id) REFERENCES accnt(accnt_id);


--
-- TOC entry 7728 (class 2606 OID 146572929)
-- Dependencies: 6909 231 195 8894
-- Name: cohead_cohead_ophead_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY cohead
    ADD CONSTRAINT cohead_cohead_ophead_id_fkey FOREIGN KEY (cohead_ophead_id) REFERENCES ophead(ophead_id);


--
-- TOC entry 7729 (class 2606 OID 146572934)
-- Dependencies: 6891 225 195 8894
-- Name: cohead_cohead_prj_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY cohead
    ADD CONSTRAINT cohead_cohead_prj_id_fkey FOREIGN KEY (cohead_prj_id) REFERENCES prj(prj_id);


--
-- TOC entry 7730 (class 2606 OID 146572939)
-- Dependencies: 6865 216 195 8894
-- Name: cohead_cohead_salesrep_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY cohead
    ADD CONSTRAINT cohead_cohead_salesrep_id_fkey FOREIGN KEY (cohead_salesrep_id) REFERENCES salesrep(salesrep_id);


--
-- TOC entry 7731 (class 2606 OID 146572944)
-- Dependencies: 6895 226 195 8894
-- Name: cohead_cohead_saletype_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY cohead
    ADD CONSTRAINT cohead_cohead_saletype_id_fkey FOREIGN KEY (cohead_saletype_id) REFERENCES saletype(saletype_id);


--
-- TOC entry 7732 (class 2606 OID 146572949)
-- Dependencies: 6984 282 195 8894
-- Name: cohead_cohead_shipform_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY cohead
    ADD CONSTRAINT cohead_cohead_shipform_id_fkey FOREIGN KEY (cohead_shipform_id) REFERENCES shipform(shipform_id);


--
-- TOC entry 7733 (class 2606 OID 146572954)
-- Dependencies: 6816 204 195 8894
-- Name: cohead_cohead_shipto_cntct_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY cohead
    ADD CONSTRAINT cohead_cohead_shipto_cntct_id_fkey FOREIGN KEY (cohead_shipto_cntct_id) REFERENCES cntct(cntct_id);


--
-- TOC entry 7734 (class 2606 OID 146572959)
-- Dependencies: 6876 219 195 8894
-- Name: cohead_cohead_shipto_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY cohead
    ADD CONSTRAINT cohead_cohead_shipto_id_fkey FOREIGN KEY (cohead_shipto_id) REFERENCES shiptoinfo(shipto_id);


--
-- TOC entry 7735 (class 2606 OID 146572964)
-- Dependencies: 6897 227 195 8894
-- Name: cohead_cohead_shipzone_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY cohead
    ADD CONSTRAINT cohead_cohead_shipzone_id_fkey FOREIGN KEY (cohead_shipzone_id) REFERENCES shipzone(shipzone_id);


--
-- TOC entry 7736 (class 2606 OID 146572969)
-- Dependencies: 6796 199 195 8894
-- Name: cohead_cohead_taxtype_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY cohead
    ADD CONSTRAINT cohead_cohead_taxtype_id_fkey FOREIGN KEY (cohead_taxtype_id) REFERENCES taxtype(taxtype_id);


--
-- TOC entry 7737 (class 2606 OID 146572974)
-- Dependencies: 6878 220 195 8894
-- Name: cohead_cohead_taxzone_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY cohead
    ADD CONSTRAINT cohead_cohead_taxzone_id_fkey FOREIGN KEY (cohead_taxzone_id) REFERENCES taxzone(taxzone_id);


--
-- TOC entry 7738 (class 2606 OID 146572979)
-- Dependencies: 6836 209 195 8894
-- Name: cohead_cohead_terms_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY cohead
    ADD CONSTRAINT cohead_cohead_terms_id_fkey FOREIGN KEY (cohead_terms_id) REFERENCES terms(terms_id);


--
-- TOC entry 7739 (class 2606 OID 146572984)
-- Dependencies: 6763 193 195 8894
-- Name: cohead_cohead_warehous_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY cohead
    ADD CONSTRAINT cohead_cohead_warehous_id_fkey FOREIGN KEY (cohead_warehous_id) REFERENCES whsinfo(warehous_id);


--
-- TOC entry 7740 (class 2606 OID 146572989)
-- Dependencies: 6834 208 195 8894
-- Name: cohead_to_curr_symbol; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY cohead
    ADD CONSTRAINT cohead_to_curr_symbol FOREIGN KEY (cohead_curr_id) REFERENCES curr_symbol(curr_id);


--
-- TOC entry 7954 (class 2606 OID 146572994)
-- Dependencies: 7266 486 376 8894
-- Name: cohist_cohist_cohead_ccpay_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY cohist
    ADD CONSTRAINT cohist_cohist_cohead_ccpay_id_fkey FOREIGN KEY (cohist_cohead_ccpay_id) REFERENCES ccpay(ccpay_id);


--
-- TOC entry 7955 (class 2606 OID 146572999)
-- Dependencies: 6853 213 376 8894
-- Name: cohist_cohist_cust_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY cohist
    ADD CONSTRAINT cohist_cohist_cust_id_fkey FOREIGN KEY (cohist_cust_id) REFERENCES custinfo(cust_id);


--
-- TOC entry 7956 (class 2606 OID 146573004)
-- Dependencies: 6865 216 376 8894
-- Name: cohist_cohist_salesrep_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY cohist
    ADD CONSTRAINT cohist_cohist_salesrep_id_fkey FOREIGN KEY (cohist_salesrep_id) REFERENCES salesrep(salesrep_id);


--
-- TOC entry 7957 (class 2606 OID 146573009)
-- Dependencies: 6796 199 376 8894
-- Name: cohist_cohist_taxtype_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY cohist
    ADD CONSTRAINT cohist_cohist_taxtype_id_fkey FOREIGN KEY (cohist_taxtype_id) REFERENCES taxtype(taxtype_id);


--
-- TOC entry 7958 (class 2606 OID 146573014)
-- Dependencies: 6878 220 376 8894
-- Name: cohist_cohist_taxzone_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY cohist
    ADD CONSTRAINT cohist_cohist_taxzone_id_fkey FOREIGN KEY (cohist_taxzone_id) REFERENCES taxzone(taxzone_id);


--
-- TOC entry 7959 (class 2606 OID 146573019)
-- Dependencies: 6834 208 376 8894
-- Name: cohist_to_curr_symbol; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY cohist
    ADD CONSTRAINT cohist_to_curr_symbol FOREIGN KEY (cohist_curr_id) REFERENCES curr_symbol(curr_id);


--
-- TOC entry 7963 (class 2606 OID 146573024)
-- Dependencies: 7124 363 379 8894
-- Name: cohisttax_taxhist_basis_tax_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY cohisttax
    ADD CONSTRAINT cohisttax_taxhist_basis_tax_id_fkey FOREIGN KEY (taxhist_basis_tax_id) REFERENCES tax(tax_id);


--
-- TOC entry 7964 (class 2606 OID 146573029)
-- Dependencies: 7142 376 379 8894
-- Name: cohisttax_taxhist_parent_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY cohisttax
    ADD CONSTRAINT cohisttax_taxhist_parent_id_fkey FOREIGN KEY (taxhist_parent_id) REFERENCES cohist(cohist_id) ON DELETE CASCADE;


--
-- TOC entry 7965 (class 2606 OID 146573034)
-- Dependencies: 7124 363 379 8894
-- Name: cohisttax_taxhist_tax_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY cohisttax
    ADD CONSTRAINT cohisttax_taxhist_tax_id_fkey FOREIGN KEY (taxhist_tax_id) REFERENCES tax(tax_id);


--
-- TOC entry 7966 (class 2606 OID 146573039)
-- Dependencies: 6796 199 379 8894
-- Name: cohisttax_taxhist_taxtype_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY cohisttax
    ADD CONSTRAINT cohisttax_taxhist_taxtype_id_fkey FOREIGN KEY (taxhist_taxtype_id) REFERENCES taxtype(taxtype_id);


--
-- TOC entry 7741 (class 2606 OID 146573044)
-- Dependencies: 6773 195 196 8894
-- Name: coitem_coitem_cohead_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY coitem
    ADD CONSTRAINT coitem_coitem_cohead_id_fkey FOREIGN KEY (coitem_cohead_id) REFERENCES cohead(cohead_id) ON DELETE CASCADE;


--
-- TOC entry 7742 (class 2606 OID 146573049)
-- Dependencies: 6954 262 196 8894
-- Name: coitem_coitem_cos_accnt_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY coitem
    ADD CONSTRAINT coitem_coitem_cos_accnt_id_fkey FOREIGN KEY (coitem_cos_accnt_id) REFERENCES accnt(accnt_id);


--
-- TOC entry 7743 (class 2606 OID 146573054)
-- Dependencies: 6758 192 196 8894
-- Name: coitem_coitem_itemsite_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY coitem
    ADD CONSTRAINT coitem_coitem_itemsite_id_fkey FOREIGN KEY (coitem_itemsite_id) REFERENCES itemsite(itemsite_id);


--
-- TOC entry 7744 (class 2606 OID 146573059)
-- Dependencies: 6800 200 196 8894
-- Name: coitem_coitem_price_uom_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY coitem
    ADD CONSTRAINT coitem_coitem_price_uom_id_fkey FOREIGN KEY (coitem_price_uom_id) REFERENCES uom(uom_id);


--
-- TOC entry 7745 (class 2606 OID 146573064)
-- Dependencies: 6800 200 196 8894
-- Name: coitem_coitem_qty_uom_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY coitem
    ADD CONSTRAINT coitem_coitem_qty_uom_id_fkey FOREIGN KEY (coitem_qty_uom_id) REFERENCES uom(uom_id);


--
-- TOC entry 7746 (class 2606 OID 146573069)
-- Dependencies: 6954 262 196 8894
-- Name: coitem_coitem_rev_accnt_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY coitem
    ADD CONSTRAINT coitem_coitem_rev_accnt_id_fkey FOREIGN KEY (coitem_rev_accnt_id) REFERENCES accnt(accnt_id);


--
-- TOC entry 7747 (class 2606 OID 146573074)
-- Dependencies: 6751 191 196 8894
-- Name: coitem_coitem_substitute_item_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY coitem
    ADD CONSTRAINT coitem_coitem_substitute_item_id_fkey FOREIGN KEY (coitem_substitute_item_id) REFERENCES item(item_id);


--
-- TOC entry 7748 (class 2606 OID 146573079)
-- Dependencies: 6796 199 196 8894
-- Name: coitem_coitem_taxtype_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY coitem
    ADD CONSTRAINT coitem_coitem_taxtype_id_fkey FOREIGN KEY (coitem_taxtype_id) REFERENCES taxtype(taxtype_id);


--
-- TOC entry 7859 (class 2606 OID 146573084)
-- Dependencies: 6931 239 240 8894
-- Name: comment_comment_cmnttype_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY comment
    ADD CONSTRAINT comment_comment_cmnttype_id_fkey FOREIGN KEY (comment_cmnttype_id) REFERENCES cmnttype(cmnttype_id);


--
-- TOC entry 8033 (class 2606 OID 146573089)
-- Dependencies: 6834 208 523 8894
-- Name: company_company_curr_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY company
    ADD CONSTRAINT company_company_curr_id_fkey FOREIGN KEY (company_curr_id) REFERENCES curr_symbol(curr_id);


--
-- TOC entry 8034 (class 2606 OID 146573094)
-- Dependencies: 6954 262 523 8894
-- Name: company_company_dscrp_accnt_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY company
    ADD CONSTRAINT company_company_dscrp_accnt_id_fkey FOREIGN KEY (company_dscrp_accnt_id) REFERENCES accnt(accnt_id);


--
-- TOC entry 8035 (class 2606 OID 146573099)
-- Dependencies: 6954 262 523 8894
-- Name: company_company_gainloss_accnt_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY company
    ADD CONSTRAINT company_company_gainloss_accnt_id_fkey FOREIGN KEY (company_gainloss_accnt_id) REFERENCES accnt(accnt_id);


--
-- TOC entry 8036 (class 2606 OID 146573104)
-- Dependencies: 6954 262 523 8894
-- Name: company_company_unrlzgainloss_accnt_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY company
    ADD CONSTRAINT company_company_unrlzgainloss_accnt_id_fkey FOREIGN KEY (company_unrlzgainloss_accnt_id) REFERENCES accnt(accnt_id);


--
-- TOC entry 8037 (class 2606 OID 146573109)
-- Dependencies: 6954 262 523 8894
-- Name: company_company_yearend_accnt_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY company
    ADD CONSTRAINT company_company_yearend_accnt_id_fkey FOREIGN KEY (company_yearend_accnt_id) REFERENCES accnt(accnt_id);


--
-- TOC entry 7902 (class 2606 OID 146573114)
-- Dependencies: 6841 210 329 8894
-- Name: contrct_contrct_vend_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY contrct
    ADD CONSTRAINT contrct_contrct_vend_id_fkey FOREIGN KEY (contrct_vend_id) REFERENCES vendinfo(vend_id);


--
-- TOC entry 8044 (class 2606 OID 146573119)
-- Dependencies: 6834 208 535 8894
-- Name: costhist_new_to_curr_symbol; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY costhist
    ADD CONSTRAINT costhist_new_to_curr_symbol FOREIGN KEY (costhist_newcurr_id) REFERENCES curr_symbol(curr_id);


--
-- TOC entry 8045 (class 2606 OID 146573124)
-- Dependencies: 6834 208 535 8894
-- Name: costhist_old_to_curr_symbol; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY costhist
    ADD CONSTRAINT costhist_old_to_curr_symbol FOREIGN KEY (costhist_oldcurr_id) REFERENCES curr_symbol(curr_id);


--
-- TOC entry 7773 (class 2606 OID 146573129)
-- Dependencies: 6816 204 205 8894
-- Name: crmacct_crmacct_cntct_id_1_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY crmacct
    ADD CONSTRAINT crmacct_crmacct_cntct_id_1_fkey FOREIGN KEY (crmacct_cntct_id_1) REFERENCES cntct(cntct_id);


--
-- TOC entry 7774 (class 2606 OID 146573134)
-- Dependencies: 6816 204 205 8894
-- Name: crmacct_crmacct_cntct_id_2_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY crmacct
    ADD CONSTRAINT crmacct_crmacct_cntct_id_2_fkey FOREIGN KEY (crmacct_cntct_id_2) REFERENCES cntct(cntct_id);


--
-- TOC entry 7775 (class 2606 OID 146573139)
-- Dependencies: 6853 213 205 8894
-- Name: crmacct_crmacct_cust_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY crmacct
    ADD CONSTRAINT crmacct_crmacct_cust_id_fkey FOREIGN KEY (crmacct_cust_id) REFERENCES custinfo(cust_id);


--
-- TOC entry 7776 (class 2606 OID 146573144)
-- Dependencies: 7002 292 205 8894
-- Name: crmacct_crmacct_emp_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY crmacct
    ADD CONSTRAINT crmacct_crmacct_emp_id_fkey FOREIGN KEY (crmacct_emp_id) REFERENCES emp(emp_id);


--
-- TOC entry 7777 (class 2606 OID 146573149)
-- Dependencies: 6820 205 205 8894
-- Name: crmacct_crmacct_parent_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY crmacct
    ADD CONSTRAINT crmacct_crmacct_parent_id_fkey FOREIGN KEY (crmacct_parent_id) REFERENCES crmacct(crmacct_id);


--
-- TOC entry 7778 (class 2606 OID 146573154)
-- Dependencies: 7112 356 205 8894
-- Name: crmacct_crmacct_prospect_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY crmacct
    ADD CONSTRAINT crmacct_crmacct_prospect_id_fkey FOREIGN KEY (crmacct_prospect_id) REFERENCES prospect(prospect_id);


--
-- TOC entry 7779 (class 2606 OID 146573159)
-- Dependencies: 6865 216 205 8894
-- Name: crmacct_crmacct_salesrep_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY crmacct
    ADD CONSTRAINT crmacct_crmacct_salesrep_id_fkey FOREIGN KEY (crmacct_salesrep_id) REFERENCES salesrep(salesrep_id);


--
-- TOC entry 7780 (class 2606 OID 146573164)
-- Dependencies: 6988 284 205 8894
-- Name: crmacct_crmacct_taxauth_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY crmacct
    ADD CONSTRAINT crmacct_crmacct_taxauth_id_fkey FOREIGN KEY (crmacct_taxauth_id) REFERENCES taxauth(taxauth_id);


--
-- TOC entry 7781 (class 2606 OID 146573169)
-- Dependencies: 6841 210 205 8894
-- Name: crmacct_crmacct_vend_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY crmacct
    ADD CONSTRAINT crmacct_crmacct_vend_id_fkey FOREIGN KEY (crmacct_vend_id) REFERENCES vendinfo(vend_id);


--
-- TOC entry 8046 (class 2606 OID 146573174)
-- Dependencies: 6820 205 544 8894
-- Name: crmacctsel_crmacctsel_dest_crmacct_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY crmacctsel
    ADD CONSTRAINT crmacctsel_crmacctsel_dest_crmacct_id_fkey FOREIGN KEY (crmacctsel_dest_crmacct_id) REFERENCES crmacct(crmacct_id) ON DELETE CASCADE;


--
-- TOC entry 8047 (class 2606 OID 146573179)
-- Dependencies: 6820 205 544 8894
-- Name: crmacctsel_crmacctsel_src_crmacct_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY crmacctsel
    ADD CONSTRAINT crmacctsel_crmacctsel_src_crmacct_id_fkey FOREIGN KEY (crmacctsel_src_crmacct_id) REFERENCES crmacct(crmacct_id) ON DELETE CASCADE;


--
-- TOC entry 8048 (class 2606 OID 146573184)
-- Dependencies: 6834 208 545 8894
-- Name: curr_rate_to_curr_symbol; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY curr_rate
    ADD CONSTRAINT curr_rate_to_curr_symbol FOREIGN KEY (curr_id) REFERENCES curr_symbol(curr_id);


--
-- TOC entry 7803 (class 2606 OID 146573189)
-- Dependencies: 6834 208 213 8894
-- Name: cust_creditlmt_to_curr_symbol; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY custinfo
    ADD CONSTRAINT cust_creditlmt_to_curr_symbol FOREIGN KEY (cust_creditlmt_curr_id) REFERENCES curr_symbol(curr_id);


--
-- TOC entry 7804 (class 2606 OID 146573194)
-- Dependencies: 6834 208 213 8894
-- Name: cust_to_curr_symbol; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY custinfo
    ADD CONSTRAINT cust_to_curr_symbol FOREIGN KEY (cust_curr_id) REFERENCES curr_symbol(curr_id);


--
-- TOC entry 7805 (class 2606 OID 146573199)
-- Dependencies: 6816 204 213 8894
-- Name: custinfo_cust_cntct_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY custinfo
    ADD CONSTRAINT custinfo_cust_cntct_id_fkey FOREIGN KEY (cust_cntct_id) REFERENCES cntct(cntct_id);


--
-- TOC entry 7806 (class 2606 OID 146573204)
-- Dependencies: 6816 204 213 8894
-- Name: custinfo_cust_corrcntct_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY custinfo
    ADD CONSTRAINT custinfo_cust_corrcntct_id_fkey FOREIGN KEY (cust_corrcntct_id) REFERENCES cntct(cntct_id);


--
-- TOC entry 7807 (class 2606 OID 146573209)
-- Dependencies: 6980 280 213 8894
-- Name: custinfo_cust_custtype_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY custinfo
    ADD CONSTRAINT custinfo_cust_custtype_fkey FOREIGN KEY (cust_custtype_id) REFERENCES custtype(custtype_id) ON UPDATE RESTRICT ON DELETE RESTRICT;


--
-- TOC entry 7808 (class 2606 OID 146573214)
-- Dependencies: 6865 216 213 8894
-- Name: custinfo_cust_salesrep_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY custinfo
    ADD CONSTRAINT custinfo_cust_salesrep_fkey FOREIGN KEY (cust_salesrep_id) REFERENCES salesrep(salesrep_id) ON UPDATE RESTRICT ON DELETE RESTRICT;


--
-- TOC entry 7809 (class 2606 OID 146573219)
-- Dependencies: 6984 282 213 8894
-- Name: custinfo_cust_shipform_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY custinfo
    ADD CONSTRAINT custinfo_cust_shipform_fkey FOREIGN KEY (cust_shipform_id) REFERENCES shipform(shipform_id) ON UPDATE RESTRICT ON DELETE RESTRICT;


--
-- TOC entry 7810 (class 2606 OID 146573224)
-- Dependencies: 6878 220 213 8894
-- Name: custinfo_cust_taxzone_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY custinfo
    ADD CONSTRAINT custinfo_cust_taxzone_id_fkey FOREIGN KEY (cust_taxzone_id) REFERENCES taxzone(taxzone_id);


--
-- TOC entry 7811 (class 2606 OID 146573229)
-- Dependencies: 6836 209 213 8894
-- Name: custinfo_cust_terms_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY custinfo
    ADD CONSTRAINT custinfo_cust_terms_fkey FOREIGN KEY (cust_terms_id) REFERENCES terms(terms_id) ON UPDATE RESTRICT ON DELETE RESTRICT;


--
-- TOC entry 7881 (class 2606 OID 146573234)
-- Dependencies: 6816 204 292 8894
-- Name: emp_emp_cntct_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY emp
    ADD CONSTRAINT emp_emp_cntct_id_fkey FOREIGN KEY (emp_cntct_id) REFERENCES cntct(cntct_id);


--
-- TOC entry 7882 (class 2606 OID 146573239)
-- Dependencies: 6996 291 292 8894
-- Name: emp_emp_dept_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY emp
    ADD CONSTRAINT emp_emp_dept_id_fkey FOREIGN KEY (emp_dept_id) REFERENCES dept(dept_id);


--
-- TOC entry 7883 (class 2606 OID 146573244)
-- Dependencies: 6942 248 292 8894
-- Name: emp_emp_image_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY emp
    ADD CONSTRAINT emp_emp_image_id_fkey FOREIGN KEY (emp_image_id) REFERENCES image(image_id);


--
-- TOC entry 7884 (class 2606 OID 146573249)
-- Dependencies: 7002 292 292 8894
-- Name: emp_emp_mgr_emp_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY emp
    ADD CONSTRAINT emp_emp_mgr_emp_id_fkey FOREIGN KEY (emp_mgr_emp_id) REFERENCES emp(emp_id);


--
-- TOC entry 7885 (class 2606 OID 146573254)
-- Dependencies: 7004 293 292 8894
-- Name: emp_emp_shift_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY emp
    ADD CONSTRAINT emp_emp_shift_id_fkey FOREIGN KEY (emp_shift_id) REFERENCES shift(shift_id);


--
-- TOC entry 7886 (class 2606 OID 146573259)
-- Dependencies: 6834 208 292 8894
-- Name: emp_emp_wage_curr_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY emp
    ADD CONSTRAINT emp_emp_wage_curr_id_fkey FOREIGN KEY (emp_wage_curr_id) REFERENCES curr_symbol(curr_id);


--
-- TOC entry 7887 (class 2606 OID 146573264)
-- Dependencies: 6763 193 292 8894
-- Name: emp_emp_warehous_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY emp
    ADD CONSTRAINT emp_emp_warehous_id_fkey FOREIGN KEY (emp_warehous_id) REFERENCES whsinfo(warehous_id);


--
-- TOC entry 8050 (class 2606 OID 146573269)
-- Dependencies: 7002 292 565 8894
-- Name: empgrpitem_empgrpitem_emp_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY empgrpitem
    ADD CONSTRAINT empgrpitem_empgrpitem_emp_id_fkey FOREIGN KEY (empgrpitem_emp_id) REFERENCES emp(emp_id);


--
-- TOC entry 8051 (class 2606 OID 146573274)
-- Dependencies: 7350 563 565 8894
-- Name: empgrpitem_empgrpitem_empgrp_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY empgrpitem
    ADD CONSTRAINT empgrpitem_empgrpitem_empgrp_id_fkey FOREIGN KEY (empgrpitem_empgrp_id) REFERENCES empgrp(empgrp_id);


--
-- TOC entry 8052 (class 2606 OID 146573279)
-- Dependencies: 7373 579 588 8894
-- Name: flnotes_flnotes_flhead_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY flnotes
    ADD CONSTRAINT flnotes_flnotes_flhead_id_fkey FOREIGN KEY (flnotes_flhead_id) REFERENCES flhead(flhead_id) ON DELETE CASCADE;


--
-- TOC entry 8053 (class 2606 OID 146573284)
-- Dependencies: 6959 264 588 8894
-- Name: flnotes_flnotes_period_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY flnotes
    ADD CONSTRAINT flnotes_flnotes_period_id_fkey FOREIGN KEY (flnotes_period_id) REFERENCES period(period_id) ON DELETE CASCADE;


--
-- TOC entry 8054 (class 2606 OID 146573289)
-- Dependencies: 7395 601 603 8894
-- Name: grppriv_grppriv_grp_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY grppriv
    ADD CONSTRAINT grppriv_grppriv_grp_id_fkey FOREIGN KEY (grppriv_grp_id) REFERENCES grp(grp_id);


--
-- TOC entry 7782 (class 2606 OID 146573294)
-- Dependencies: 6849 212 206 8894
-- Name: incdt_incdt_aropen_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY incdt
    ADD CONSTRAINT incdt_incdt_aropen_id_fkey FOREIGN KEY (incdt_aropen_id) REFERENCES aropen(aropen_id);


--
-- TOC entry 7783 (class 2606 OID 146573299)
-- Dependencies: 6816 204 206 8894
-- Name: incdt_incdt_cntct_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY incdt
    ADD CONSTRAINT incdt_incdt_cntct_id_fkey FOREIGN KEY (incdt_cntct_id) REFERENCES cntct(cntct_id);


--
-- TOC entry 7784 (class 2606 OID 146573304)
-- Dependencies: 6820 205 206 8894
-- Name: incdt_incdt_crmacct_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY incdt
    ADD CONSTRAINT incdt_incdt_crmacct_id_fkey FOREIGN KEY (incdt_crmacct_id) REFERENCES crmacct(crmacct_id);


--
-- TOC entry 7785 (class 2606 OID 146573309)
-- Dependencies: 7021 304 206 8894
-- Name: incdt_incdt_incdtcat_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY incdt
    ADD CONSTRAINT incdt_incdt_incdtcat_id_fkey FOREIGN KEY (incdt_incdtcat_id) REFERENCES incdtcat(incdtcat_id);


--
-- TOC entry 7786 (class 2606 OID 146573314)
-- Dependencies: 7025 305 206 8894
-- Name: incdt_incdt_incdtpriority_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY incdt
    ADD CONSTRAINT incdt_incdt_incdtpriority_id_fkey FOREIGN KEY (incdt_incdtpriority_id) REFERENCES incdtpriority(incdtpriority_id);


--
-- TOC entry 7787 (class 2606 OID 146573319)
-- Dependencies: 7029 306 206 8894
-- Name: incdt_incdt_incdtresolution_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY incdt
    ADD CONSTRAINT incdt_incdt_incdtresolution_id_fkey FOREIGN KEY (incdt_incdtresolution_id) REFERENCES incdtresolution(incdtresolution_id);


--
-- TOC entry 7788 (class 2606 OID 146573324)
-- Dependencies: 7033 307 206 8894
-- Name: incdt_incdt_incdtseverity_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY incdt
    ADD CONSTRAINT incdt_incdt_incdtseverity_id_fkey FOREIGN KEY (incdt_incdtseverity_id) REFERENCES incdtseverity(incdtseverity_id);


--
-- TOC entry 7789 (class 2606 OID 146573329)
-- Dependencies: 6751 191 206 8894
-- Name: incdt_incdt_item_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY incdt
    ADD CONSTRAINT incdt_incdt_item_id_fkey FOREIGN KEY (incdt_item_id) REFERENCES item(item_id);


--
-- TOC entry 7790 (class 2606 OID 146573334)
-- Dependencies: 6891 225 206 8894
-- Name: incdt_incdt_prj_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY incdt
    ADD CONSTRAINT incdt_incdt_prj_id_fkey FOREIGN KEY (incdt_prj_id) REFERENCES prj(prj_id);


--
-- TOC entry 7791 (class 2606 OID 146573339)
-- Dependencies: 6824 206 206 8894
-- Name: incdt_incdt_recurring_incdt_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY incdt
    ADD CONSTRAINT incdt_incdt_recurring_incdt_id_fkey FOREIGN KEY (incdt_recurring_incdt_id) REFERENCES incdt(incdt_id);


--
-- TOC entry 8055 (class 2606 OID 146573344)
-- Dependencies: 6824 206 609 8894
-- Name: incdthist_incdthist_incdt_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY incdthist
    ADD CONSTRAINT incdthist_incdthist_incdt_id_fkey FOREIGN KEY (incdthist_incdt_id) REFERENCES incdt(incdt_id);


--
-- TOC entry 7765 (class 2606 OID 146573349)
-- Dependencies: 6758 192 202 8894
-- Name: invbal_invbal_itemsite_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY invbal
    ADD CONSTRAINT invbal_invbal_itemsite_id_fkey FOREIGN KEY (invbal_itemsite_id) REFERENCES itemsite(itemsite_id) ON DELETE CASCADE;


--
-- TOC entry 7766 (class 2606 OID 146573354)
-- Dependencies: 6959 264 202 8894
-- Name: invbal_invbal_period_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY invbal
    ADD CONSTRAINT invbal_invbal_period_id_fkey FOREIGN KEY (invbal_period_id) REFERENCES period(period_id) ON DELETE CASCADE;


--
-- TOC entry 7834 (class 2606 OID 146573359)
-- Dependencies: 6895 226 224 8894
-- Name: invchead_invchead_saletype_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY invchead
    ADD CONSTRAINT invchead_invchead_saletype_id_fkey FOREIGN KEY (invchead_saletype_id) REFERENCES saletype(saletype_id);


--
-- TOC entry 7835 (class 2606 OID 146573364)
-- Dependencies: 6897 227 224 8894
-- Name: invchead_invchead_shipzone_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY invchead
    ADD CONSTRAINT invchead_invchead_shipzone_id_fkey FOREIGN KEY (invchead_shipzone_id) REFERENCES shipzone(shipzone_id);


--
-- TOC entry 7836 (class 2606 OID 146573369)
-- Dependencies: 6878 220 224 8894
-- Name: invchead_invchead_taxzone_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY invchead
    ADD CONSTRAINT invchead_invchead_taxzone_id_fkey FOREIGN KEY (invchead_taxzone_id) REFERENCES taxzone(taxzone_id);


--
-- TOC entry 7837 (class 2606 OID 146573374)
-- Dependencies: 6834 208 224 8894
-- Name: invchead_to_curr_symbol; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY invchead
    ADD CONSTRAINT invchead_to_curr_symbol FOREIGN KEY (invchead_curr_id) REFERENCES curr_symbol(curr_id);


--
-- TOC entry 8056 (class 2606 OID 146573379)
-- Dependencies: 7124 363 617 8894
-- Name: invcheadtax_taxhist_basis_tax_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY invcheadtax
    ADD CONSTRAINT invcheadtax_taxhist_basis_tax_id_fkey FOREIGN KEY (taxhist_basis_tax_id) REFERENCES tax(tax_id);


--
-- TOC entry 8057 (class 2606 OID 146573384)
-- Dependencies: 6889 224 617 8894
-- Name: invcheadtax_taxhist_parent_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY invcheadtax
    ADD CONSTRAINT invcheadtax_taxhist_parent_id_fkey FOREIGN KEY (taxhist_parent_id) REFERENCES invchead(invchead_id) ON DELETE CASCADE;


--
-- TOC entry 8058 (class 2606 OID 146573389)
-- Dependencies: 7124 363 617 8894
-- Name: invcheadtax_taxhist_tax_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY invcheadtax
    ADD CONSTRAINT invcheadtax_taxhist_tax_id_fkey FOREIGN KEY (taxhist_tax_id) REFERENCES tax(tax_id);


--
-- TOC entry 8059 (class 2606 OID 146573394)
-- Dependencies: 6796 199 617 8894
-- Name: invcheadtax_taxhist_taxtype_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY invcheadtax
    ADD CONSTRAINT invcheadtax_taxhist_taxtype_id_fkey FOREIGN KEY (taxhist_taxtype_id) REFERENCES taxtype(taxtype_id);


--
-- TOC entry 7842 (class 2606 OID 146573399)
-- Dependencies: 6889 224 229 8894
-- Name: invcitem_invchead_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY invcitem
    ADD CONSTRAINT invcitem_invchead_id_fkey FOREIGN KEY (invcitem_invchead_id) REFERENCES invchead(invchead_id) ON UPDATE CASCADE ON DELETE CASCADE;


--
-- TOC entry 7843 (class 2606 OID 146573404)
-- Dependencies: 6800 200 229 8894
-- Name: invcitem_invcitem_price_uom_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY invcitem
    ADD CONSTRAINT invcitem_invcitem_price_uom_id_fkey FOREIGN KEY (invcitem_price_uom_id) REFERENCES uom(uom_id);


--
-- TOC entry 7844 (class 2606 OID 146573409)
-- Dependencies: 6800 200 229 8894
-- Name: invcitem_invcitem_qty_uom_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY invcitem
    ADD CONSTRAINT invcitem_invcitem_qty_uom_id_fkey FOREIGN KEY (invcitem_qty_uom_id) REFERENCES uom(uom_id);


--
-- TOC entry 7845 (class 2606 OID 146573414)
-- Dependencies: 6954 262 229 8894
-- Name: invcitem_invcitem_rev_accnt_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY invcitem
    ADD CONSTRAINT invcitem_invcitem_rev_accnt_id_fkey FOREIGN KEY (invcitem_rev_accnt_id) REFERENCES accnt(accnt_id);


--
-- TOC entry 7846 (class 2606 OID 146573419)
-- Dependencies: 6796 199 229 8894
-- Name: invcitem_invcitem_taxtype_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY invcitem
    ADD CONSTRAINT invcitem_invcitem_taxtype_id_fkey FOREIGN KEY (invcitem_taxtype_id) REFERENCES taxtype(taxtype_id);


--
-- TOC entry 8060 (class 2606 OID 146573424)
-- Dependencies: 7124 363 619 8894
-- Name: invcitemtax_taxhist_basis_tax_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY invcitemtax
    ADD CONSTRAINT invcitemtax_taxhist_basis_tax_id_fkey FOREIGN KEY (taxhist_basis_tax_id) REFERENCES tax(tax_id);


--
-- TOC entry 8061 (class 2606 OID 146573429)
-- Dependencies: 6905 229 619 8894
-- Name: invcitemtax_taxhist_parent_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY invcitemtax
    ADD CONSTRAINT invcitemtax_taxhist_parent_id_fkey FOREIGN KEY (taxhist_parent_id) REFERENCES invcitem(invcitem_id) ON DELETE CASCADE;


--
-- TOC entry 8062 (class 2606 OID 146573434)
-- Dependencies: 7124 363 619 8894
-- Name: invcitemtax_taxhist_tax_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY invcitemtax
    ADD CONSTRAINT invcitemtax_taxhist_tax_id_fkey FOREIGN KEY (taxhist_tax_id) REFERENCES tax(tax_id);


--
-- TOC entry 8063 (class 2606 OID 146573439)
-- Dependencies: 6796 199 619 8894
-- Name: invcitemtax_taxhist_taxtype_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY invcitemtax
    ADD CONSTRAINT invcitemtax_taxhist_taxtype_id_fkey FOREIGN KEY (taxhist_taxtype_id) REFERENCES taxtype(taxtype_id);


--
-- TOC entry 8064 (class 2606 OID 146573444)
-- Dependencies: 7118 358 625 8894
-- Name: invhistexpcat_invhistexpcat_expcat_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY invhistexpcat
    ADD CONSTRAINT invhistexpcat_invhistexpcat_expcat_id_fkey FOREIGN KEY (invhistexpcat_expcat_id) REFERENCES expcat(expcat_id) ON UPDATE CASCADE ON DELETE CASCADE;


--
-- TOC entry 8065 (class 2606 OID 146573449)
-- Dependencies: 7417 623 625 8894
-- Name: invhistexpcat_invhistexpcat_invhist_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY invhistexpcat
    ADD CONSTRAINT invhistexpcat_invhistexpcat_invhist_id_fkey FOREIGN KEY (invhistexpcat_invhist_id) REFERENCES invhist(invhist_id) ON UPDATE CASCADE ON DELETE CASCADE;


--
-- TOC entry 7916 (class 2606 OID 146573454)
-- Dependencies: 7017 301 347 8894
-- Name: ipsass_ipsass_ipshead_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY ipsass
    ADD CONSTRAINT ipsass_ipsass_ipshead_id_fkey FOREIGN KEY (ipsass_ipshead_id) REFERENCES ipshead(ipshead_id);


--
-- TOC entry 7891 (class 2606 OID 146573459)
-- Dependencies: 7011 299 300 8894
-- Name: ipsfreight_ipsfreight_freightclass_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY ipsfreight
    ADD CONSTRAINT ipsfreight_ipsfreight_freightclass_id_fkey FOREIGN KEY (ipsfreight_freightclass_id) REFERENCES freightclass(freightclass_id);


--
-- TOC entry 7892 (class 2606 OID 146573464)
-- Dependencies: 7017 301 300 8894
-- Name: ipsfreight_ipsfreight_ipshead_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY ipsfreight
    ADD CONSTRAINT ipsfreight_ipsfreight_ipshead_id_fkey FOREIGN KEY (ipsfreight_ipshead_id) REFERENCES ipshead(ipshead_id);


--
-- TOC entry 7893 (class 2606 OID 146573469)
-- Dependencies: 6897 227 300 8894
-- Name: ipsfreight_ipsfreight_shipzone_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY ipsfreight
    ADD CONSTRAINT ipsfreight_ipsfreight_shipzone_id_fkey FOREIGN KEY (ipsfreight_shipzone_id) REFERENCES shipzone(shipzone_id);


--
-- TOC entry 7894 (class 2606 OID 146573474)
-- Dependencies: 6763 193 300 8894
-- Name: ipsfreight_ipsfreight_warehous_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY ipsfreight
    ADD CONSTRAINT ipsfreight_ipsfreight_warehous_id_fkey FOREIGN KEY (ipsfreight_warehous_id) REFERENCES whsinfo(warehous_id);


--
-- TOC entry 7895 (class 2606 OID 146573479)
-- Dependencies: 6834 208 301 8894
-- Name: ipshead_to_curr_symbol; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY ipshead
    ADD CONSTRAINT ipshead_to_curr_symbol FOREIGN KEY (ipshead_curr_id) REFERENCES curr_symbol(curr_id);


--
-- TOC entry 7917 (class 2606 OID 146573484)
-- Dependencies: 7017 301 349 8894
-- Name: ipsitem_ipshead_id_fk; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY ipsiteminfo
    ADD CONSTRAINT ipsitem_ipshead_id_fk FOREIGN KEY (ipsitem_ipshead_id) REFERENCES ipshead(ipshead_id) ON DELETE CASCADE;


--
-- TOC entry 7918 (class 2606 OID 146573489)
-- Dependencies: 6800 200 349 8894
-- Name: ipsitem_ipsitem_price_uom_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY ipsiteminfo
    ADD CONSTRAINT ipsitem_ipsitem_price_uom_id_fkey FOREIGN KEY (ipsitem_price_uom_id) REFERENCES uom(uom_id);


--
-- TOC entry 7919 (class 2606 OID 146573494)
-- Dependencies: 6800 200 349 8894
-- Name: ipsitem_ipsitem_qty_uom_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY ipsiteminfo
    ADD CONSTRAINT ipsitem_ipsitem_qty_uom_id_fkey FOREIGN KEY (ipsitem_qty_uom_id) REFERENCES uom(uom_id);


--
-- TOC entry 7920 (class 2606 OID 146573499)
-- Dependencies: 6763 193 349 8894
-- Name: ipsitem_ipsitem_warehous_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY ipsiteminfo
    ADD CONSTRAINT ipsitem_ipsitem_warehous_id_fkey FOREIGN KEY (ipsitem_warehous_id) REFERENCES whsinfo(warehous_id);


--
-- TOC entry 7921 (class 2606 OID 146573504)
-- Dependencies: 6751 191 349 8894
-- Name: ipsitem_item_id_fk; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY ipsiteminfo
    ADD CONSTRAINT ipsitem_item_id_fk FOREIGN KEY (ipsitem_item_id) REFERENCES item(item_id);


--
-- TOC entry 7922 (class 2606 OID 146573509)
-- Dependencies: 6924 236 351 8894
-- Name: ipsitemchar_ipsitemchar_char_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY ipsitemchar
    ADD CONSTRAINT ipsitemchar_ipsitemchar_char_id_fkey FOREIGN KEY (ipsitemchar_char_id) REFERENCES "char"(char_id);


--
-- TOC entry 7923 (class 2606 OID 146573514)
-- Dependencies: 7104 349 351 8894
-- Name: ipsitemchar_ipsitemchar_ipsitem_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY ipsitemchar
    ADD CONSTRAINT ipsitemchar_ipsitemchar_ipsitem_id_fkey FOREIGN KEY (ipsitemchar_ipsitem_id) REFERENCES ipsiteminfo(ipsitem_id) ON DELETE CASCADE;


--
-- TOC entry 7709 (class 2606 OID 146573519)
-- Dependencies: 7037 313 191 8894
-- Name: item_item_classcode_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY item
    ADD CONSTRAINT item_item_classcode_id_fkey FOREIGN KEY (item_classcode_id) REFERENCES classcode(classcode_id);


--
-- TOC entry 7710 (class 2606 OID 146573524)
-- Dependencies: 7011 299 191 8894
-- Name: item_item_freightclass_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY item
    ADD CONSTRAINT item_item_freightclass_id_fkey FOREIGN KEY (item_freightclass_id) REFERENCES freightclass(freightclass_id);


--
-- TOC entry 7711 (class 2606 OID 146573529)
-- Dependencies: 6800 200 191 8894
-- Name: item_item_inv_uom_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY item
    ADD CONSTRAINT item_item_inv_uom_id_fkey FOREIGN KEY (item_inv_uom_id) REFERENCES uom(uom_id);


--
-- TOC entry 7712 (class 2606 OID 146573534)
-- Dependencies: 6800 200 191 8894
-- Name: item_item_price_uom_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY item
    ADD CONSTRAINT item_item_price_uom_id_fkey FOREIGN KEY (item_price_uom_id) REFERENCES uom(uom_id);


--
-- TOC entry 7896 (class 2606 OID 146573539)
-- Dependencies: 6820 205 316 8894
-- Name: itemalias_itemalias_crmacct_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY itemalias
    ADD CONSTRAINT itemalias_itemalias_crmacct_id_fkey FOREIGN KEY (itemalias_crmacct_id) REFERENCES crmacct(crmacct_id);


--
-- TOC entry 7897 (class 2606 OID 146573544)
-- Dependencies: 6751 191 316 8894
-- Name: itemalias_itemalias_item_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY itemalias
    ADD CONSTRAINT itemalias_itemalias_item_id_fkey FOREIGN KEY (itemalias_item_id) REFERENCES item(item_id);


--
-- TOC entry 7898 (class 2606 OID 146573549)
-- Dependencies: 7049 320 321 8894
-- Name: itemcost_itemcost_costelem_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY itemcost
    ADD CONSTRAINT itemcost_itemcost_costelem_id_fkey FOREIGN KEY (itemcost_costelem_id) REFERENCES costelem(costelem_id);


--
-- TOC entry 7899 (class 2606 OID 146573554)
-- Dependencies: 6834 208 321 8894
-- Name: itemcost_itemcost_curr_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY itemcost
    ADD CONSTRAINT itemcost_itemcost_curr_id_fkey FOREIGN KEY (itemcost_curr_id) REFERENCES curr_symbol(curr_id);


--
-- TOC entry 7900 (class 2606 OID 146573559)
-- Dependencies: 6751 191 321 8894
-- Name: itemcost_itemcost_item_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY itemcost
    ADD CONSTRAINT itemcost_itemcost_item_id_fkey FOREIGN KEY (itemcost_item_id) REFERENCES item(item_id);


--
-- TOC entry 7901 (class 2606 OID 146573564)
-- Dependencies: 6834 208 321 8894
-- Name: itemcost_to_curr_symbol; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY itemcost
    ADD CONSTRAINT itemcost_to_curr_symbol FOREIGN KEY (itemcost_curr_id) REFERENCES curr_symbol(curr_id);


--
-- TOC entry 7713 (class 2606 OID 146573569)
-- Dependencies: 7057 325 192 8894
-- Name: itemsite_itemsite_costcat_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY itemsite
    ADD CONSTRAINT itemsite_itemsite_costcat_id_fkey FOREIGN KEY (itemsite_costcat_id) REFERENCES costcat(costcat_id);


--
-- TOC entry 7714 (class 2606 OID 146573574)
-- Dependencies: 6751 191 192 8894
-- Name: itemsite_itemsite_item_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY itemsite
    ADD CONSTRAINT itemsite_itemsite_item_id_fkey FOREIGN KEY (itemsite_item_id) REFERENCES item(item_id);


--
-- TOC entry 7715 (class 2606 OID 146573579)
-- Dependencies: 7059 326 192 8894
-- Name: itemsite_itemsite_plancode_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY itemsite
    ADD CONSTRAINT itemsite_itemsite_plancode_id_fkey FOREIGN KEY (itemsite_plancode_id) REFERENCES plancode(plancode_id);


--
-- TOC entry 7716 (class 2606 OID 146573584)
-- Dependencies: 6763 193 192 8894
-- Name: itemsite_itemsite_warehous_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY itemsite
    ADD CONSTRAINT itemsite_itemsite_warehous_id_fkey FOREIGN KEY (itemsite_warehous_id) REFERENCES whsinfo(warehous_id);


--
-- TOC entry 7903 (class 2606 OID 146573589)
-- Dependencies: 7064 329 330 8894
-- Name: itemsrc_itemsrc_contrct_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY itemsrc
    ADD CONSTRAINT itemsrc_itemsrc_contrct_id_fkey FOREIGN KEY (itemsrc_contrct_id) REFERENCES contrct(contrct_id);


--
-- TOC entry 7904 (class 2606 OID 146573594)
-- Dependencies: 6751 191 330 8894
-- Name: itemsrc_itemsrc_item_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY itemsrc
    ADD CONSTRAINT itemsrc_itemsrc_item_id_fkey FOREIGN KEY (itemsrc_item_id) REFERENCES item(item_id) ON DELETE CASCADE;


--
-- TOC entry 7905 (class 2606 OID 146573599)
-- Dependencies: 6841 210 330 8894
-- Name: itemsrc_itemsrc_vend_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY itemsrc
    ADD CONSTRAINT itemsrc_itemsrc_vend_id_fkey FOREIGN KEY (itemsrc_vend_id) REFERENCES vendinfo(vend_id) ON DELETE CASCADE;


--
-- TOC entry 7906 (class 2606 OID 146573604)
-- Dependencies: 7068 330 332 8894
-- Name: itemsrcp_itemsrcp_itemsrc_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY itemsrcp
    ADD CONSTRAINT itemsrcp_itemsrcp_itemsrc_id_fkey FOREIGN KEY (itemsrcp_itemsrc_id) REFERENCES itemsrc(itemsrc_id) ON DELETE CASCADE;


--
-- TOC entry 7907 (class 2606 OID 146573609)
-- Dependencies: 6834 208 332 8894
-- Name: itemsrcp_to_curr_symbol; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY itemsrcp
    ADD CONSTRAINT itemsrcp_to_curr_symbol FOREIGN KEY (itemsrcp_curr_id) REFERENCES curr_symbol(curr_id);


--
-- TOC entry 7908 (class 2606 OID 146573614)
-- Dependencies: 6751 191 334 8894
-- Name: itemsub_itemsub_parent_item_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY itemsub
    ADD CONSTRAINT itemsub_itemsub_parent_item_id_fkey FOREIGN KEY (itemsub_parent_item_id) REFERENCES item(item_id);


--
-- TOC entry 7909 (class 2606 OID 146573619)
-- Dependencies: 6751 191 334 8894
-- Name: itemsub_itemsub_sub_item_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY itemsub
    ADD CONSTRAINT itemsub_itemsub_sub_item_id_fkey FOREIGN KEY (itemsub_sub_item_id) REFERENCES item(item_id);


--
-- TOC entry 7910 (class 2606 OID 146573624)
-- Dependencies: 6751 191 336 8894
-- Name: itemtax_itemtax_item_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY itemtax
    ADD CONSTRAINT itemtax_itemtax_item_id_fkey FOREIGN KEY (itemtax_item_id) REFERENCES item(item_id);


--
-- TOC entry 7911 (class 2606 OID 146573629)
-- Dependencies: 6796 199 336 8894
-- Name: itemtax_itemtax_taxtype_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY itemtax
    ADD CONSTRAINT itemtax_itemtax_taxtype_id_fkey FOREIGN KEY (itemtax_taxtype_id) REFERENCES taxtype(taxtype_id);


--
-- TOC entry 7912 (class 2606 OID 146573634)
-- Dependencies: 6878 220 336 8894
-- Name: itemtax_itemtax_taxzone_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY itemtax
    ADD CONSTRAINT itemtax_itemtax_taxzone_id_fkey FOREIGN KEY (itemtax_taxzone_id) REFERENCES taxzone(taxzone_id);


--
-- TOC entry 8066 (class 2606 OID 146573639)
-- Dependencies: 6751 191 662 8894
-- Name: itemtrans_itemtrans_source_item_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY itemtrans
    ADD CONSTRAINT itemtrans_itemtrans_source_item_id_fkey FOREIGN KEY (itemtrans_source_item_id) REFERENCES item(item_id);


--
-- TOC entry 8067 (class 2606 OID 146573644)
-- Dependencies: 6751 191 662 8894
-- Name: itemtrans_itemtrans_target_item_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY itemtrans
    ADD CONSTRAINT itemtrans_itemtrans_target_item_id_fkey FOREIGN KEY (itemtrans_target_item_id) REFERENCES item(item_id);


--
-- TOC entry 8068 (class 2606 OID 146573649)
-- Dependencies: 7084 338 664 8894
-- Name: itemuom_itemuom_itemuomconv_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY itemuom
    ADD CONSTRAINT itemuom_itemuom_itemuomconv_id_fkey FOREIGN KEY (itemuom_itemuomconv_id) REFERENCES itemuomconv(itemuomconv_id);


--
-- TOC entry 8069 (class 2606 OID 146573654)
-- Dependencies: 7629 822 664 8894
-- Name: itemuom_itemuom_uomtype_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY itemuom
    ADD CONSTRAINT itemuom_itemuom_uomtype_id_fkey FOREIGN KEY (itemuom_uomtype_id) REFERENCES uomtype(uomtype_id);


--
-- TOC entry 7913 (class 2606 OID 146573659)
-- Dependencies: 6800 200 338 8894
-- Name: itemuomconv_itemuomconv_from_uom_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY itemuomconv
    ADD CONSTRAINT itemuomconv_itemuomconv_from_uom_id_fkey FOREIGN KEY (itemuomconv_from_uom_id) REFERENCES uom(uom_id);


--
-- TOC entry 7914 (class 2606 OID 146573664)
-- Dependencies: 6751 191 338 8894
-- Name: itemuomconv_itemuomconv_item_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY itemuomconv
    ADD CONSTRAINT itemuomconv_itemuomconv_item_id_fkey FOREIGN KEY (itemuomconv_item_id) REFERENCES item(item_id);


--
-- TOC entry 7915 (class 2606 OID 146573669)
-- Dependencies: 6800 200 338 8894
-- Name: itemuomconv_itemuomconv_to_uom_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY itemuomconv
    ADD CONSTRAINT itemuomconv_itemuomconv_to_uom_id_fkey FOREIGN KEY (itemuomconv_to_uom_id) REFERENCES uom(uom_id);


--
-- TOC entry 8070 (class 2606 OID 146573674)
-- Dependencies: 6816 204 687 8894
-- Name: mrghist_mrghist_cntct_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY mrghist
    ADD CONSTRAINT mrghist_mrghist_cntct_id_fkey FOREIGN KEY (mrghist_cntct_id) REFERENCES cntct(cntct_id) ON DELETE CASCADE;


--
-- TOC entry 7847 (class 2606 OID 146573679)
-- Dependencies: 6816 204 231 8894
-- Name: ophead_ophead_cntct_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY ophead
    ADD CONSTRAINT ophead_ophead_cntct_id_fkey FOREIGN KEY (ophead_cntct_id) REFERENCES cntct(cntct_id);


--
-- TOC entry 7848 (class 2606 OID 146573684)
-- Dependencies: 6820 205 231 8894
-- Name: ophead_ophead_crmacct_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY ophead
    ADD CONSTRAINT ophead_ophead_crmacct_id_fkey FOREIGN KEY (ophead_crmacct_id) REFERENCES crmacct(crmacct_id);


--
-- TOC entry 7849 (class 2606 OID 146573689)
-- Dependencies: 7486 696 231 8894
-- Name: ophead_ophead_opsource_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY ophead
    ADD CONSTRAINT ophead_ophead_opsource_id_fkey FOREIGN KEY (ophead_opsource_id) REFERENCES opsource(opsource_id);


--
-- TOC entry 7850 (class 2606 OID 146573694)
-- Dependencies: 7490 698 231 8894
-- Name: ophead_ophead_opstage_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY ophead
    ADD CONSTRAINT ophead_ophead_opstage_id_fkey FOREIGN KEY (ophead_opstage_id) REFERENCES opstage(opstage_id);


--
-- TOC entry 7851 (class 2606 OID 146573699)
-- Dependencies: 7494 700 231 8894
-- Name: ophead_ophead_optype_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY ophead
    ADD CONSTRAINT ophead_ophead_optype_id_fkey FOREIGN KEY (ophead_optype_id) REFERENCES optype(optype_id);


--
-- TOC entry 7852 (class 2606 OID 146573704)
-- Dependencies: 7025 305 231 8894
-- Name: ophead_ophead_priority_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY ophead
    ADD CONSTRAINT ophead_ophead_priority_id_fkey FOREIGN KEY (ophead_priority_id) REFERENCES incdtpriority(incdtpriority_id);


--
-- TOC entry 8071 (class 2606 OID 146573709)
-- Dependencies: 7303 526 706 8894
-- Name: pack_pack_shiphead_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY pack
    ADD CONSTRAINT pack_pack_shiphead_id_fkey FOREIGN KEY (pack_shiphead_id) REFERENCES shiphead(shiphead_id);


--
-- TOC entry 8072 (class 2606 OID 146573714)
-- Dependencies: 7266 486 709 8894
-- Name: payco_payco_ccpay_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY payco
    ADD CONSTRAINT payco_payco_ccpay_id_fkey FOREIGN KEY (payco_ccpay_id) REFERENCES ccpay(ccpay_id);


--
-- TOC entry 8073 (class 2606 OID 146573719)
-- Dependencies: 6773 195 709 8894
-- Name: payco_payco_cohead_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY payco
    ADD CONSTRAINT payco_payco_cohead_id_fkey FOREIGN KEY (payco_cohead_id) REFERENCES cohead(cohead_id);


--
-- TOC entry 8074 (class 2606 OID 146573724)
-- Dependencies: 7510 713 711 8894
-- Name: pkgdep_pkgdep_parent_pkghead_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY pkgdep
    ADD CONSTRAINT pkgdep_pkgdep_parent_pkghead_id_fkey FOREIGN KEY (pkgdep_parent_pkghead_id) REFERENCES pkghead(pkghead_id);


--
-- TOC entry 8075 (class 2606 OID 146573729)
-- Dependencies: 7510 713 711 8894
-- Name: pkgdep_pkgdep_pkghead_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY pkgdep
    ADD CONSTRAINT pkgdep_pkgdep_pkghead_id_fkey FOREIGN KEY (pkgdep_pkghead_id) REFERENCES pkghead(pkghead_id);


--
-- TOC entry 8076 (class 2606 OID 146573734)
-- Dependencies: 7510 713 715 8894
-- Name: pkgitem_pkgitem_pkghead_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY pkgitem
    ADD CONSTRAINT pkgitem_pkgitem_pkghead_id_fkey FOREIGN KEY (pkgitem_pkghead_id) REFERENCES pkghead(pkghead_id) ON DELETE CASCADE;


--
-- TOC entry 7749 (class 2606 OID 146573739)
-- Dependencies: 6773 195 197 8894
-- Name: pohead_pohead_cohead_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY pohead
    ADD CONSTRAINT pohead_pohead_cohead_id_fkey FOREIGN KEY (pohead_cohead_id) REFERENCES cohead(cohead_id) ON DELETE SET NULL;


--
-- TOC entry 7750 (class 2606 OID 146573744)
-- Dependencies: 6816 204 197 8894
-- Name: pohead_pohead_shipto_cntct_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY pohead
    ADD CONSTRAINT pohead_pohead_shipto_cntct_id_fkey FOREIGN KEY (pohead_shipto_cntct_id) REFERENCES cntct(cntct_id);


--
-- TOC entry 7751 (class 2606 OID 146573749)
-- Dependencies: 6920 234 197 8894
-- Name: pohead_pohead_shiptoddress_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY pohead
    ADD CONSTRAINT pohead_pohead_shiptoddress_id_fkey FOREIGN KEY (pohead_shiptoaddress_id) REFERENCES addr(addr_id);


--
-- TOC entry 7752 (class 2606 OID 146573754)
-- Dependencies: 6796 199 197 8894
-- Name: pohead_pohead_taxtype_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY pohead
    ADD CONSTRAINT pohead_pohead_taxtype_id_fkey FOREIGN KEY (pohead_taxtype_id) REFERENCES taxtype(taxtype_id);


--
-- TOC entry 7753 (class 2606 OID 146573759)
-- Dependencies: 6878 220 197 8894
-- Name: pohead_pohead_taxzone_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY pohead
    ADD CONSTRAINT pohead_pohead_taxzone_id_fkey FOREIGN KEY (pohead_taxzone_id) REFERENCES taxzone(taxzone_id);


--
-- TOC entry 7754 (class 2606 OID 146573764)
-- Dependencies: 6836 209 197 8894
-- Name: pohead_pohead_terms_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY pohead
    ADD CONSTRAINT pohead_pohead_terms_id_fkey FOREIGN KEY (pohead_terms_id) REFERENCES terms(terms_id);


--
-- TOC entry 7755 (class 2606 OID 146573769)
-- Dependencies: 6816 204 197 8894
-- Name: pohead_pohead_vend_cntct_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY pohead
    ADD CONSTRAINT pohead_pohead_vend_cntct_id_fkey FOREIGN KEY (pohead_vend_cntct_id) REFERENCES cntct(cntct_id);


--
-- TOC entry 7756 (class 2606 OID 146573774)
-- Dependencies: 6841 210 197 8894
-- Name: pohead_pohead_vend_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY pohead
    ADD CONSTRAINT pohead_pohead_vend_id_fkey FOREIGN KEY (pohead_vend_id) REFERENCES vendinfo(vend_id);


--
-- TOC entry 7757 (class 2606 OID 146573779)
-- Dependencies: 7126 364 197 8894
-- Name: pohead_pohead_vendaddr_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY pohead
    ADD CONSTRAINT pohead_pohead_vendaddr_id_fkey FOREIGN KEY (pohead_vendaddr_id) REFERENCES vendaddrinfo(vendaddr_id);


--
-- TOC entry 7758 (class 2606 OID 146573784)
-- Dependencies: 6763 193 197 8894
-- Name: pohead_pohead_warehous_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY pohead
    ADD CONSTRAINT pohead_pohead_warehous_id_fkey FOREIGN KEY (pohead_warehous_id) REFERENCES whsinfo(warehous_id);


--
-- TOC entry 7759 (class 2606 OID 146573789)
-- Dependencies: 6834 208 197 8894
-- Name: pohead_to_curr_symbol; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY pohead
    ADD CONSTRAINT pohead_to_curr_symbol FOREIGN KEY (pohead_curr_id) REFERENCES curr_symbol(curr_id);


--
-- TOC entry 7760 (class 2606 OID 146573794)
-- Dependencies: 7118 358 198 8894
-- Name: poitem_poitem_expcat_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY poitem
    ADD CONSTRAINT poitem_poitem_expcat_id_fkey FOREIGN KEY (poitem_expcat_id) REFERENCES expcat(expcat_id);


--
-- TOC entry 7761 (class 2606 OID 146573799)
-- Dependencies: 6758 192 198 8894
-- Name: poitem_poitem_itemsite_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY poitem
    ADD CONSTRAINT poitem_poitem_itemsite_id_fkey FOREIGN KEY (poitem_itemsite_id) REFERENCES itemsite(itemsite_id);


--
-- TOC entry 7762 (class 2606 OID 146573804)
-- Dependencies: 7068 330 198 8894
-- Name: poitem_poitem_itemsrc_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY poitem
    ADD CONSTRAINT poitem_poitem_itemsrc_id_fkey FOREIGN KEY (poitem_itemsrc_id) REFERENCES itemsrc(itemsrc_id);


--
-- TOC entry 7763 (class 2606 OID 146573809)
-- Dependencies: 6891 225 198 8894
-- Name: poitem_poitem_prj_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY poitem
    ADD CONSTRAINT poitem_poitem_prj_id_fkey FOREIGN KEY (poitem_prj_id) REFERENCES prj(prj_id);


--
-- TOC entry 7764 (class 2606 OID 146573814)
-- Dependencies: 6796 199 198 8894
-- Name: poitem_poitem_taxtype_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY poitem
    ADD CONSTRAINT poitem_poitem_taxtype_id_fkey FOREIGN KEY (poitem_taxtype_id) REFERENCES taxtype(taxtype_id);


--
-- TOC entry 8085 (class 2606 OID 146573819)
-- Dependencies: 7519 721 724 8894
-- Name: poreject_poreject_recv_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY poreject
    ADD CONSTRAINT poreject_poreject_recv_id_fkey FOREIGN KEY (poreject_recv_id) REFERENCES recv(recv_id);


--
-- TOC entry 8086 (class 2606 OID 146573824)
-- Dependencies: 6841 210 724 8894
-- Name: poreject_poreject_vend_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY poreject
    ADD CONSTRAINT poreject_poreject_vend_id_fkey FOREIGN KEY (poreject_vend_id) REFERENCES vendinfo(vend_id);


--
-- TOC entry 7838 (class 2606 OID 146573829)
-- Dependencies: 6816 204 225 8894
-- Name: prj_prj_cntct_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY prj
    ADD CONSTRAINT prj_prj_cntct_id_fkey FOREIGN KEY (prj_cntct_id) REFERENCES cntct(cntct_id);


--
-- TOC entry 7839 (class 2606 OID 146573834)
-- Dependencies: 6820 205 225 8894
-- Name: prj_prj_crmacct_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY prj
    ADD CONSTRAINT prj_prj_crmacct_id_fkey FOREIGN KEY (prj_crmacct_id) REFERENCES crmacct(crmacct_id);


--
-- TOC entry 7840 (class 2606 OID 146573839)
-- Dependencies: 7537 739 225 8894
-- Name: prj_prj_prjtype_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY prj
    ADD CONSTRAINT prj_prj_prjtype_id_fkey FOREIGN KEY (prj_prjtype_id) REFERENCES prjtype(prjtype_id);


--
-- TOC entry 7841 (class 2606 OID 146573844)
-- Dependencies: 6891 225 225 8894
-- Name: prj_prj_recurring_prj_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY prj
    ADD CONSTRAINT prj_prj_recurring_prj_id_fkey FOREIGN KEY (prj_recurring_prj_id) REFERENCES prj(prj_id);


--
-- TOC entry 7853 (class 2606 OID 146573849)
-- Dependencies: 6891 225 232 8894
-- Name: prjtask_prjtask_prj_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY prjtask
    ADD CONSTRAINT prjtask_prjtask_prj_id_fkey FOREIGN KEY (prjtask_prj_id) REFERENCES prj(prj_id);


--
-- TOC entry 7924 (class 2606 OID 146573854)
-- Dependencies: 6816 204 356 8894
-- Name: prospect_prospect_cntct_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY prospect
    ADD CONSTRAINT prospect_prospect_cntct_id_fkey FOREIGN KEY (prospect_cntct_id) REFERENCES cntct(cntct_id);


--
-- TOC entry 7925 (class 2606 OID 146573859)
-- Dependencies: 6865 216 356 8894
-- Name: prospect_prospect_salesrep_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY prospect
    ADD CONSTRAINT prospect_prospect_salesrep_id_fkey FOREIGN KEY (prospect_salesrep_id) REFERENCES salesrep(salesrep_id);


--
-- TOC entry 7926 (class 2606 OID 146573864)
-- Dependencies: 6878 220 356 8894
-- Name: prospect_prospect_taxzone_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY prospect
    ADD CONSTRAINT prospect_prospect_taxzone_id_fkey FOREIGN KEY (prospect_taxzone_id) REFERENCES taxzone(taxzone_id);


--
-- TOC entry 7927 (class 2606 OID 146573869)
-- Dependencies: 6763 193 356 8894
-- Name: prospect_prospect_warehous_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY prospect
    ADD CONSTRAINT prospect_prospect_warehous_id_fkey FOREIGN KEY (prospect_warehous_id) REFERENCES whsinfo(warehous_id);


--
-- TOC entry 8088 (class 2606 OID 146573874)
-- Dependencies: 7541 742 744 8894
-- Name: qryitem_qryitem_qryhead_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY qryitem
    ADD CONSTRAINT qryitem_qryitem_qryhead_id_fkey FOREIGN KEY (qryitem_qryhead_id) REFERENCES qryhead(qryhead_id);


--
-- TOC entry 7936 (class 2606 OID 146573879)
-- Dependencies: 6816 204 367 8894
-- Name: quhead_quhead_billto_cntct_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY quhead
    ADD CONSTRAINT quhead_quhead_billto_cntct_id_fkey FOREIGN KEY (quhead_billto_cntct_id) REFERENCES cntct(cntct_id);


--
-- TOC entry 7937 (class 2606 OID 146573884)
-- Dependencies: 6954 262 367 8894
-- Name: quhead_quhead_misc_accnt_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY quhead
    ADD CONSTRAINT quhead_quhead_misc_accnt_id_fkey FOREIGN KEY (quhead_misc_accnt_id) REFERENCES accnt(accnt_id);


--
-- TOC entry 7938 (class 2606 OID 146573889)
-- Dependencies: 6909 231 367 8894
-- Name: quhead_quhead_ophead_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY quhead
    ADD CONSTRAINT quhead_quhead_ophead_id_fkey FOREIGN KEY (quhead_ophead_id) REFERENCES ophead(ophead_id);


--
-- TOC entry 7939 (class 2606 OID 146573894)
-- Dependencies: 6891 225 367 8894
-- Name: quhead_quhead_prj_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY quhead
    ADD CONSTRAINT quhead_quhead_prj_id_fkey FOREIGN KEY (quhead_prj_id) REFERENCES prj(prj_id);


--
-- TOC entry 7940 (class 2606 OID 146573899)
-- Dependencies: 6865 216 367 8894
-- Name: quhead_quhead_salesrep_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY quhead
    ADD CONSTRAINT quhead_quhead_salesrep_id_fkey FOREIGN KEY (quhead_salesrep_id) REFERENCES salesrep(salesrep_id);


--
-- TOC entry 7941 (class 2606 OID 146573904)
-- Dependencies: 6895 226 367 8894
-- Name: quhead_quhead_saletype_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY quhead
    ADD CONSTRAINT quhead_quhead_saletype_id_fkey FOREIGN KEY (quhead_saletype_id) REFERENCES saletype(saletype_id);


--
-- TOC entry 7942 (class 2606 OID 146573909)
-- Dependencies: 6816 204 367 8894
-- Name: quhead_quhead_shipto_cntct_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY quhead
    ADD CONSTRAINT quhead_quhead_shipto_cntct_id_fkey FOREIGN KEY (quhead_shipto_cntct_id) REFERENCES cntct(cntct_id);


--
-- TOC entry 7943 (class 2606 OID 146573914)
-- Dependencies: 6876 219 367 8894
-- Name: quhead_quhead_shipto_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY quhead
    ADD CONSTRAINT quhead_quhead_shipto_id_fkey FOREIGN KEY (quhead_shipto_id) REFERENCES shiptoinfo(shipto_id);


--
-- TOC entry 7944 (class 2606 OID 146573919)
-- Dependencies: 6897 227 367 8894
-- Name: quhead_quhead_shipzone_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY quhead
    ADD CONSTRAINT quhead_quhead_shipzone_id_fkey FOREIGN KEY (quhead_shipzone_id) REFERENCES shipzone(shipzone_id);


--
-- TOC entry 7945 (class 2606 OID 146573924)
-- Dependencies: 6796 199 367 8894
-- Name: quhead_quhead_taxtype_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY quhead
    ADD CONSTRAINT quhead_quhead_taxtype_id_fkey FOREIGN KEY (quhead_taxtype_id) REFERENCES taxtype(taxtype_id);


--
-- TOC entry 7946 (class 2606 OID 146573929)
-- Dependencies: 6878 220 367 8894
-- Name: quhead_quhead_taxzone_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY quhead
    ADD CONSTRAINT quhead_quhead_taxzone_id_fkey FOREIGN KEY (quhead_taxzone_id) REFERENCES taxzone(taxzone_id);


--
-- TOC entry 7947 (class 2606 OID 146573934)
-- Dependencies: 6836 209 367 8894
-- Name: quhead_quhead_terms_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY quhead
    ADD CONSTRAINT quhead_quhead_terms_id_fkey FOREIGN KEY (quhead_terms_id) REFERENCES terms(terms_id);


--
-- TOC entry 7948 (class 2606 OID 146573939)
-- Dependencies: 6763 193 367 8894
-- Name: quhead_quhead_warehous_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY quhead
    ADD CONSTRAINT quhead_quhead_warehous_id_fkey FOREIGN KEY (quhead_warehous_id) REFERENCES whsinfo(warehous_id);


--
-- TOC entry 7949 (class 2606 OID 146573944)
-- Dependencies: 6834 208 367 8894
-- Name: quhead_to_curr_symbol; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY quhead
    ADD CONSTRAINT quhead_to_curr_symbol FOREIGN KEY (quhead_curr_id) REFERENCES curr_symbol(curr_id);


--
-- TOC entry 7950 (class 2606 OID 146573949)
-- Dependencies: 7068 330 370 8894
-- Name: quitem_quitem_itemsrc_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY quitem
    ADD CONSTRAINT quitem_quitem_itemsrc_id_fkey FOREIGN KEY (quitem_itemsrc_id) REFERENCES itemsrc(itemsrc_id);


--
-- TOC entry 7951 (class 2606 OID 146573954)
-- Dependencies: 6800 200 370 8894
-- Name: quitem_quitem_price_uom_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY quitem
    ADD CONSTRAINT quitem_quitem_price_uom_id_fkey FOREIGN KEY (quitem_price_uom_id) REFERENCES uom(uom_id);


--
-- TOC entry 7952 (class 2606 OID 146573959)
-- Dependencies: 6800 200 370 8894
-- Name: quitem_quitem_qty_uom_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY quitem
    ADD CONSTRAINT quitem_quitem_qty_uom_id_fkey FOREIGN KEY (quitem_qty_uom_id) REFERENCES uom(uom_id);


--
-- TOC entry 7953 (class 2606 OID 146573964)
-- Dependencies: 6796 199 370 8894
-- Name: quitem_quitem_taxtype_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY quitem
    ADD CONSTRAINT quitem_quitem_taxtype_id_fkey FOREIGN KEY (quitem_taxtype_id) REFERENCES taxtype(taxtype_id);


--
-- TOC entry 8077 (class 2606 OID 146573969)
-- Dependencies: 6834 208 721 8894
-- Name: recv_recv_freight_curr_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY recv
    ADD CONSTRAINT recv_recv_freight_curr_id_fkey FOREIGN KEY (recv_freight_curr_id) REFERENCES curr_symbol(curr_id);


--
-- TOC entry 8078 (class 2606 OID 146573974)
-- Dependencies: 6758 192 721 8894
-- Name: recv_recv_itemsite_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY recv
    ADD CONSTRAINT recv_recv_itemsite_id_fkey FOREIGN KEY (recv_itemsite_id) REFERENCES itemsite(itemsite_id);


--
-- TOC entry 8079 (class 2606 OID 146573979)
-- Dependencies: 6834 208 721 8894
-- Name: recv_recv_purchcost_curr_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY recv
    ADD CONSTRAINT recv_recv_purchcost_curr_id_fkey FOREIGN KEY (recv_purchcost_curr_id) REFERENCES curr_symbol(curr_id);


--
-- TOC entry 8080 (class 2606 OID 146573984)
-- Dependencies: 6834 208 721 8894
-- Name: recv_recv_recvcost_curr_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY recv
    ADD CONSTRAINT recv_recv_recvcost_curr_id_fkey FOREIGN KEY (recv_recvcost_curr_id) REFERENCES curr_symbol(curr_id);


--
-- TOC entry 8081 (class 2606 OID 146573989)
-- Dependencies: 7519 721 721 8894
-- Name: recv_recv_splitfrom_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY recv
    ADD CONSTRAINT recv_recv_splitfrom_id_fkey FOREIGN KEY (recv_splitfrom_id) REFERENCES recv(recv_id);


--
-- TOC entry 8082 (class 2606 OID 146573994)
-- Dependencies: 6841 210 721 8894
-- Name: recv_recv_vend_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY recv
    ADD CONSTRAINT recv_recv_vend_id_fkey FOREIGN KEY (recv_vend_id) REFERENCES vendinfo(vend_id);


--
-- TOC entry 8083 (class 2606 OID 146573999)
-- Dependencies: 7642 839 721 8894
-- Name: recv_recv_vohead_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY recv
    ADD CONSTRAINT recv_recv_vohead_id_fkey FOREIGN KEY (recv_vohead_id) REFERENCES vohead(vohead_id);


--
-- TOC entry 8084 (class 2606 OID 146574004)
-- Dependencies: 7648 842 721 8894
-- Name: recv_recv_voitem_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY recv
    ADD CONSTRAINT recv_recv_voitem_id_fkey FOREIGN KEY (recv_voitem_id) REFERENCES voitem(voitem_id);


--
-- TOC entry 7812 (class 2606 OID 146574009)
-- Dependencies: 7002 292 216 8894
-- Name: salesrep_salesrep_emp_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY salesrep
    ADD CONSTRAINT salesrep_salesrep_emp_id_fkey FOREIGN KEY (salesrep_emp_id) REFERENCES emp(emp_id);


--
-- TOC entry 7888 (class 2606 OID 146574014)
-- Dependencies: 6834 208 297 8894
-- Name: shipdata_shipdata_base_freight_curr_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY shipdata
    ADD CONSTRAINT shipdata_shipdata_base_freight_curr_id_fkey FOREIGN KEY (shipdata_base_freight_curr_id) REFERENCES curr_symbol(curr_id);


--
-- TOC entry 7889 (class 2606 OID 146574019)
-- Dependencies: 7305 526 297 8894
-- Name: shipdata_shipdata_shiphead_number_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY shipdata
    ADD CONSTRAINT shipdata_shipdata_shiphead_number_fkey FOREIGN KEY (shipdata_shiphead_number) REFERENCES shiphead(shiphead_number);


--
-- TOC entry 7890 (class 2606 OID 146574024)
-- Dependencies: 6834 208 297 8894
-- Name: shipdata_shipdata_total_freight_curr_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY shipdata
    ADD CONSTRAINT shipdata_shipdata_total_freight_curr_id_fkey FOREIGN KEY (shipdata_total_freight_curr_id) REFERENCES curr_symbol(curr_id);


--
-- TOC entry 8089 (class 2606 OID 146574029)
-- Dependencies: 6834 208 771 8894
-- Name: shipdatasum_shipdatasum_base_freight_curr_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY shipdatasum
    ADD CONSTRAINT shipdatasum_shipdatasum_base_freight_curr_id_fkey FOREIGN KEY (shipdatasum_base_freight_curr_id) REFERENCES curr_symbol(curr_id);


--
-- TOC entry 8090 (class 2606 OID 146574034)
-- Dependencies: 7305 526 771 8894
-- Name: shipdatasum_shipdatasum_shiphead_number_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY shipdatasum
    ADD CONSTRAINT shipdatasum_shipdatasum_shiphead_number_fkey FOREIGN KEY (shipdatasum_shiphead_number) REFERENCES shiphead(shiphead_number);


--
-- TOC entry 8091 (class 2606 OID 146574039)
-- Dependencies: 6834 208 771 8894
-- Name: shipdatasum_shipdatasum_total_freight_curr_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY shipdatasum
    ADD CONSTRAINT shipdatasum_shipdatasum_total_freight_curr_id_fkey FOREIGN KEY (shipdatasum_total_freight_curr_id) REFERENCES curr_symbol(curr_id);


--
-- TOC entry 8038 (class 2606 OID 146574044)
-- Dependencies: 6834 208 526 8894
-- Name: shiphead_shiphead_freight_curr_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY shiphead
    ADD CONSTRAINT shiphead_shiphead_freight_curr_id_fkey FOREIGN KEY (shiphead_freight_curr_id) REFERENCES curr_symbol(curr_id);


--
-- TOC entry 8039 (class 2606 OID 146574049)
-- Dependencies: 6982 281 526 8894
-- Name: shiphead_shiphead_shipchrg_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY shiphead
    ADD CONSTRAINT shiphead_shiphead_shipchrg_id_fkey FOREIGN KEY (shiphead_shipchrg_id) REFERENCES shipchrg(shipchrg_id);


--
-- TOC entry 8040 (class 2606 OID 146574054)
-- Dependencies: 6984 282 526 8894
-- Name: shiphead_shiphead_shipform_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY shiphead
    ADD CONSTRAINT shiphead_shiphead_shipform_id_fkey FOREIGN KEY (shiphead_shipform_id) REFERENCES shipform(shipform_id);


--
-- TOC entry 8041 (class 2606 OID 146574059)
-- Dependencies: 6905 229 527 8894
-- Name: shipitem_shipitem_invcitem_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY shipitem
    ADD CONSTRAINT shipitem_shipitem_invcitem_id_fkey FOREIGN KEY (shipitem_invcitem_id) REFERENCES invcitem(invcitem_id);


--
-- TOC entry 8042 (class 2606 OID 146574064)
-- Dependencies: 7417 623 527 8894
-- Name: shipitem_shipitem_invhist_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY shipitem
    ADD CONSTRAINT shipitem_shipitem_invhist_id_fkey FOREIGN KEY (shipitem_invhist_id) REFERENCES invhist(invhist_id);


--
-- TOC entry 8043 (class 2606 OID 146574069)
-- Dependencies: 7303 526 527 8894
-- Name: shipitem_shipitem_shiphead_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY shipitem
    ADD CONSTRAINT shipitem_shipitem_shiphead_id_fkey FOREIGN KEY (shipitem_shiphead_id) REFERENCES shiphead(shiphead_id);


--
-- TOC entry 7821 (class 2606 OID 146574074)
-- Dependencies: 6920 234 219 8894
-- Name: shiptoinfo_shipto_addr_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY shiptoinfo
    ADD CONSTRAINT shiptoinfo_shipto_addr_id_fkey FOREIGN KEY (shipto_addr_id) REFERENCES addr(addr_id);


--
-- TOC entry 7822 (class 2606 OID 146574079)
-- Dependencies: 6816 204 219 8894
-- Name: shiptoinfo_shipto_cntct_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY shiptoinfo
    ADD CONSTRAINT shiptoinfo_shipto_cntct_id_fkey FOREIGN KEY (shipto_cntct_id) REFERENCES cntct(cntct_id);


--
-- TOC entry 7823 (class 2606 OID 146574084)
-- Dependencies: 6853 213 219 8894
-- Name: shiptoinfo_shipto_cust_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY shiptoinfo
    ADD CONSTRAINT shiptoinfo_shipto_cust_id_fkey FOREIGN KEY (shipto_cust_id) REFERENCES custinfo(cust_id);


--
-- TOC entry 7824 (class 2606 OID 146574089)
-- Dependencies: 6865 216 219 8894
-- Name: shiptoinfo_shipto_salesrep_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY shiptoinfo
    ADD CONSTRAINT shiptoinfo_shipto_salesrep_fkey FOREIGN KEY (shipto_salesrep_id) REFERENCES salesrep(salesrep_id) ON UPDATE RESTRICT ON DELETE RESTRICT;


--
-- TOC entry 7825 (class 2606 OID 146574094)
-- Dependencies: 6865 216 219 8894
-- Name: shiptoinfo_shipto_salesrep_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY shiptoinfo
    ADD CONSTRAINT shiptoinfo_shipto_salesrep_id_fkey FOREIGN KEY (shipto_salesrep_id) REFERENCES salesrep(salesrep_id);


--
-- TOC entry 7826 (class 2606 OID 146574099)
-- Dependencies: 6984 282 219 8894
-- Name: shiptoinfo_shipto_shipform_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY shiptoinfo
    ADD CONSTRAINT shiptoinfo_shipto_shipform_fkey FOREIGN KEY (shipto_shipform_id) REFERENCES shipform(shipform_id) ON UPDATE RESTRICT ON DELETE RESTRICT;


--
-- TOC entry 7827 (class 2606 OID 146574104)
-- Dependencies: 6984 282 219 8894
-- Name: shiptoinfo_shipto_shipform_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY shiptoinfo
    ADD CONSTRAINT shiptoinfo_shipto_shipform_id_fkey FOREIGN KEY (shipto_shipform_id) REFERENCES shipform(shipform_id);


--
-- TOC entry 7828 (class 2606 OID 146574109)
-- Dependencies: 6897 227 219 8894
-- Name: shiptoinfo_shipto_shipzone_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY shiptoinfo
    ADD CONSTRAINT shiptoinfo_shipto_shipzone_id_fkey FOREIGN KEY (shipto_shipzone_id) REFERENCES shipzone(shipzone_id);


--
-- TOC entry 7829 (class 2606 OID 146574114)
-- Dependencies: 6878 220 219 8894
-- Name: shiptoinfo_shipto_taxzone_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY shiptoinfo
    ADD CONSTRAINT shiptoinfo_shipto_taxzone_id_fkey FOREIGN KEY (shipto_taxzone_id) REFERENCES taxzone(taxzone_id);


--
-- TOC entry 8092 (class 2606 OID 146574119)
-- Dependencies: 7321 538 787 8894
-- Name: state_state_country_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY state
    ADD CONSTRAINT state_state_country_id_fkey FOREIGN KEY (state_country_id) REFERENCES country(country_id);


--
-- TOC entry 7929 (class 2606 OID 146574124)
-- Dependencies: 7124 363 363 8894
-- Name: tax_tax_basis_tax_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY tax
    ADD CONSTRAINT tax_tax_basis_tax_id_fkey FOREIGN KEY (tax_basis_tax_id) REFERENCES tax(tax_id) ON DELETE CASCADE;


--
-- TOC entry 7930 (class 2606 OID 146574129)
-- Dependencies: 6954 262 363 8894
-- Name: tax_tax_sales_accnt_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY tax
    ADD CONSTRAINT tax_tax_sales_accnt_id_fkey FOREIGN KEY (tax_sales_accnt_id) REFERENCES accnt(accnt_id);


--
-- TOC entry 7931 (class 2606 OID 146574134)
-- Dependencies: 6988 284 363 8894
-- Name: tax_tax_taxauth_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY tax
    ADD CONSTRAINT tax_tax_taxauth_id_fkey FOREIGN KEY (tax_taxauth_id) REFERENCES taxauth(taxauth_id);


--
-- TOC entry 7932 (class 2606 OID 146574139)
-- Dependencies: 7618 807 363 8894
-- Name: tax_tax_taxclass_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY tax
    ADD CONSTRAINT tax_tax_taxclass_id_fkey FOREIGN KEY (tax_taxclass_id) REFERENCES taxclass(taxclass_id);


--
-- TOC entry 8093 (class 2606 OID 146574144)
-- Dependencies: 7124 363 804 8894
-- Name: taxass_taxass_tax_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY taxass
    ADD CONSTRAINT taxass_taxass_tax_id_fkey FOREIGN KEY (taxass_tax_id) REFERENCES tax(tax_id);


--
-- TOC entry 8094 (class 2606 OID 146574149)
-- Dependencies: 6796 199 804 8894
-- Name: taxass_taxass_taxtype_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY taxass
    ADD CONSTRAINT taxass_taxass_taxtype_id_fkey FOREIGN KEY (taxass_taxtype_id) REFERENCES taxtype(taxtype_id);


--
-- TOC entry 8095 (class 2606 OID 146574154)
-- Dependencies: 6878 220 804 8894
-- Name: taxass_taxass_taxzone_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY taxass
    ADD CONSTRAINT taxass_taxass_taxzone_id_fkey FOREIGN KEY (taxass_taxzone_id) REFERENCES taxzone(taxzone_id);


--
-- TOC entry 7876 (class 2606 OID 146574159)
-- Dependencies: 6954 262 284 8894
-- Name: taxauth_taxauth_accnt_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY taxauth
    ADD CONSTRAINT taxauth_taxauth_accnt_id_fkey FOREIGN KEY (taxauth_accnt_id) REFERENCES accnt(accnt_id);


--
-- TOC entry 7877 (class 2606 OID 146574164)
-- Dependencies: 6920 234 284 8894
-- Name: taxauth_taxauth_addr_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY taxauth
    ADD CONSTRAINT taxauth_taxauth_addr_id_fkey FOREIGN KEY (taxauth_addr_id) REFERENCES addr(addr_id);


--
-- TOC entry 7878 (class 2606 OID 146574169)
-- Dependencies: 6834 208 284 8894
-- Name: taxauth_taxauth_curr_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY taxauth
    ADD CONSTRAINT taxauth_taxauth_curr_id_fkey FOREIGN KEY (taxauth_curr_id) REFERENCES curr_symbol(curr_id);


--
-- TOC entry 7960 (class 2606 OID 146574174)
-- Dependencies: 6834 208 377 8894
-- Name: taxhist_taxhist_curr_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY taxhist
    ADD CONSTRAINT taxhist_taxhist_curr_id_fkey FOREIGN KEY (taxhist_curr_id) REFERENCES curr_symbol(curr_id);


--
-- TOC entry 7961 (class 2606 OID 146574179)
-- Dependencies: 7124 363 377 8894
-- Name: taxhist_taxhist_tax_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY taxhist
    ADD CONSTRAINT taxhist_taxhist_tax_id_fkey FOREIGN KEY (taxhist_tax_id) REFERENCES tax(tax_id);


--
-- TOC entry 7962 (class 2606 OID 146574184)
-- Dependencies: 6796 199 377 8894
-- Name: taxhist_taxhist_taxtype_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY taxhist
    ADD CONSTRAINT taxhist_taxhist_taxtype_id_fkey FOREIGN KEY (taxhist_taxtype_id) REFERENCES taxtype(taxtype_id);


--
-- TOC entry 8096 (class 2606 OID 146574189)
-- Dependencies: 6834 208 809 8894
-- Name: taxrate_taxrate_curr_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY taxrate
    ADD CONSTRAINT taxrate_taxrate_curr_id_fkey FOREIGN KEY (taxrate_curr_id) REFERENCES curr_symbol(curr_id);


--
-- TOC entry 8097 (class 2606 OID 146574194)
-- Dependencies: 7124 363 809 8894
-- Name: taxrate_taxrate_tax_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY taxrate
    ADD CONSTRAINT taxrate_taxrate_tax_id_fkey FOREIGN KEY (taxrate_tax_id) REFERENCES tax(tax_id);


--
-- TOC entry 7879 (class 2606 OID 146574199)
-- Dependencies: 6988 284 285 8894
-- Name: taxreg_taxreg_taxauth_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY taxreg
    ADD CONSTRAINT taxreg_taxreg_taxauth_id_fkey FOREIGN KEY (taxreg_taxauth_id) REFERENCES taxauth(taxauth_id);


--
-- TOC entry 7880 (class 2606 OID 146574204)
-- Dependencies: 6878 220 285 8894
-- Name: taxreg_taxreg_taxzone_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY taxreg
    ADD CONSTRAINT taxreg_taxreg_taxzone_id_fkey FOREIGN KEY (taxreg_taxzone_id) REFERENCES taxzone(taxzone_id);


--
-- TOC entry 7854 (class 2606 OID 146574209)
-- Dependencies: 6816 204 233 8894
-- Name: todoitem_todoitem_cntct_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY todoitem
    ADD CONSTRAINT todoitem_todoitem_cntct_id_fkey FOREIGN KEY (todoitem_cntct_id) REFERENCES cntct(cntct_id);


--
-- TOC entry 7855 (class 2606 OID 146574214)
-- Dependencies: 6820 205 233 8894
-- Name: todoitem_todoitem_crmacct_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY todoitem
    ADD CONSTRAINT todoitem_todoitem_crmacct_id_fkey FOREIGN KEY (todoitem_crmacct_id) REFERENCES crmacct(crmacct_id);


--
-- TOC entry 7856 (class 2606 OID 146574219)
-- Dependencies: 6824 206 233 8894
-- Name: todoitem_todoitem_incdt_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY todoitem
    ADD CONSTRAINT todoitem_todoitem_incdt_id_fkey FOREIGN KEY (todoitem_incdt_id) REFERENCES incdt(incdt_id);


--
-- TOC entry 7857 (class 2606 OID 146574224)
-- Dependencies: 6909 231 233 8894
-- Name: todoitem_todoitem_ophead_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY todoitem
    ADD CONSTRAINT todoitem_todoitem_ophead_id_fkey FOREIGN KEY (todoitem_ophead_id) REFERENCES ophead(ophead_id) ON UPDATE RESTRICT ON DELETE RESTRICT;


--
-- TOC entry 7858 (class 2606 OID 146574229)
-- Dependencies: 6915 233 233 8894
-- Name: todoitem_todoitem_recurring_todoitem_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY todoitem
    ADD CONSTRAINT todoitem_todoitem_recurring_todoitem_id_fkey FOREIGN KEY (todoitem_recurring_todoitem_id) REFERENCES todoitem(todoitem_id);


--
-- TOC entry 8098 (class 2606 OID 146574234)
-- Dependencies: 7282 510 816 8894
-- Name: trgthist_trgthist_src_cntct_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY trgthist
    ADD CONSTRAINT trgthist_trgthist_src_cntct_id_fkey FOREIGN KEY (trgthist_src_cntct_id) REFERENCES cntctmrgd(cntctmrgd_cntct_id) ON DELETE CASCADE;


--
-- TOC entry 8099 (class 2606 OID 146574239)
-- Dependencies: 6816 204 816 8894
-- Name: trgthist_trgthist_trgt_cntct_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY trgthist
    ADD CONSTRAINT trgthist_trgthist_trgt_cntct_id_fkey FOREIGN KEY (trgthist_trgt_cntct_id) REFERENCES cntct(cntct_id) ON DELETE CASCADE;


--
-- TOC entry 8100 (class 2606 OID 146574244)
-- Dependencies: 6800 200 820 8894
-- Name: uomconv_uomconv_from_uom_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY uomconv
    ADD CONSTRAINT uomconv_uomconv_from_uom_id_fkey FOREIGN KEY (uomconv_from_uom_id) REFERENCES uom(uom_id);


--
-- TOC entry 8101 (class 2606 OID 146574249)
-- Dependencies: 6800 200 820 8894
-- Name: uomconv_uomconv_to_uom_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY uomconv
    ADD CONSTRAINT uomconv_uomconv_to_uom_id_fkey FOREIGN KEY (uomconv_to_uom_id) REFERENCES uom(uom_id);


--
-- TOC entry 8087 (class 2606 OID 146574254)
-- Dependencies: 7395 601 732 8894
-- Name: usrgrp_usrgrp_grp_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY usrgrp
    ADD CONSTRAINT usrgrp_usrgrp_grp_id_fkey FOREIGN KEY (usrgrp_grp_id) REFERENCES grp(grp_id);


--
-- TOC entry 7794 (class 2606 OID 146574259)
-- Dependencies: 6834 208 210 8894
-- Name: vend_to_curr_symbol; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY vendinfo
    ADD CONSTRAINT vend_to_curr_symbol FOREIGN KEY (vend_curr_id) REFERENCES curr_symbol(curr_id);


--
-- TOC entry 7795 (class 2606 OID 146574264)
-- Dependencies: 6816 204 210 8894
-- Name: vend_vend_cntct1_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY vendinfo
    ADD CONSTRAINT vend_vend_cntct1_id_fkey FOREIGN KEY (vend_cntct1_id) REFERENCES cntct(cntct_id);


--
-- TOC entry 7796 (class 2606 OID 146574269)
-- Dependencies: 6816 204 210 8894
-- Name: vend_vend_cntct2_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY vendinfo
    ADD CONSTRAINT vend_vend_cntct2_id_fkey FOREIGN KEY (vend_cntct2_id) REFERENCES cntct(cntct_id);


--
-- TOC entry 7933 (class 2606 OID 146574274)
-- Dependencies: 6920 234 364 8894
-- Name: vendaddrinfo_vendaddr_addr_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY vendaddrinfo
    ADD CONSTRAINT vendaddrinfo_vendaddr_addr_id_fkey FOREIGN KEY (vendaddr_addr_id) REFERENCES addr(addr_id);


--
-- TOC entry 7934 (class 2606 OID 146574279)
-- Dependencies: 6816 204 364 8894
-- Name: vendaddrinfo_vendaddr_cntct_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY vendaddrinfo
    ADD CONSTRAINT vendaddrinfo_vendaddr_cntct_id_fkey FOREIGN KEY (vendaddr_cntct_id) REFERENCES cntct(cntct_id);


--
-- TOC entry 7935 (class 2606 OID 146574284)
-- Dependencies: 6878 220 364 8894
-- Name: vendaddrinfo_vendaddr_taxzone_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY vendaddrinfo
    ADD CONSTRAINT vendaddrinfo_vendaddr_taxzone_id_fkey FOREIGN KEY (vendaddr_taxzone_id) REFERENCES taxzone(taxzone_id);


--
-- TOC entry 7797 (class 2606 OID 146574289)
-- Dependencies: 6920 234 210 8894
-- Name: vendinfo_vend_addr_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY vendinfo
    ADD CONSTRAINT vendinfo_vend_addr_id_fkey FOREIGN KEY (vend_addr_id) REFERENCES addr(addr_id);


--
-- TOC entry 7798 (class 2606 OID 146574294)
-- Dependencies: 6878 220 210 8894
-- Name: vendinfo_vend_taxzone_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY vendinfo
    ADD CONSTRAINT vendinfo_vend_taxzone_id_fkey FOREIGN KEY (vend_taxzone_id) REFERENCES taxzone(taxzone_id);


--
-- TOC entry 7799 (class 2606 OID 146574299)
-- Dependencies: 7158 393 210 8894
-- Name: vendinfo_vend_vendtype_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY vendinfo
    ADD CONSTRAINT vendinfo_vend_vendtype_id_fkey FOREIGN KEY (vend_vendtype_id) REFERENCES vendtype(vendtype_id);


--
-- TOC entry 8102 (class 2606 OID 146574304)
-- Dependencies: 6834 208 839 8894
-- Name: vohead_to_curr_symbol; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY vohead
    ADD CONSTRAINT vohead_to_curr_symbol FOREIGN KEY (vohead_curr_id) REFERENCES curr_symbol(curr_id);


--
-- TOC entry 8103 (class 2606 OID 146574309)
-- Dependencies: 6796 199 839 8894
-- Name: vohead_vohead_adjtaxtype_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY vohead
    ADD CONSTRAINT vohead_vohead_adjtaxtype_id_fkey FOREIGN KEY (vohead_adjtaxtype_id) REFERENCES taxtype(taxtype_id);


--
-- TOC entry 8104 (class 2606 OID 146574314)
-- Dependencies: 6796 199 839 8894
-- Name: vohead_vohead_freighttaxtype_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY vohead
    ADD CONSTRAINT vohead_vohead_freighttaxtype_id_fkey FOREIGN KEY (vohead_freighttaxtype_id) REFERENCES taxtype(taxtype_id);


--
-- TOC entry 8105 (class 2606 OID 146574319)
-- Dependencies: 6796 199 839 8894
-- Name: vohead_vohead_taxtype_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY vohead
    ADD CONSTRAINT vohead_vohead_taxtype_id_fkey FOREIGN KEY (vohead_taxtype_id) REFERENCES taxtype(taxtype_id);


--
-- TOC entry 8106 (class 2606 OID 146574324)
-- Dependencies: 6878 220 839 8894
-- Name: vohead_vohead_taxzone_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY vohead
    ADD CONSTRAINT vohead_vohead_taxzone_id_fkey FOREIGN KEY (vohead_taxzone_id) REFERENCES taxzone(taxzone_id);


--
-- TOC entry 8107 (class 2606 OID 146574329)
-- Dependencies: 6841 210 839 8894
-- Name: vohead_vohead_vend_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY vohead
    ADD CONSTRAINT vohead_vohead_vend_id_fkey FOREIGN KEY (vohead_vend_id) REFERENCES vendinfo(vend_id);


--
-- TOC entry 8108 (class 2606 OID 146574334)
-- Dependencies: 7124 363 841 8894
-- Name: voheadtax_taxhist_basis_tax_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY voheadtax
    ADD CONSTRAINT voheadtax_taxhist_basis_tax_id_fkey FOREIGN KEY (taxhist_basis_tax_id) REFERENCES tax(tax_id);


--
-- TOC entry 8109 (class 2606 OID 146574339)
-- Dependencies: 7642 839 841 8894
-- Name: voheadtax_taxhist_parent_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY voheadtax
    ADD CONSTRAINT voheadtax_taxhist_parent_id_fkey FOREIGN KEY (taxhist_parent_id) REFERENCES vohead(vohead_id) ON DELETE CASCADE;


--
-- TOC entry 8110 (class 2606 OID 146574344)
-- Dependencies: 7124 363 841 8894
-- Name: voheadtax_taxhist_tax_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY voheadtax
    ADD CONSTRAINT voheadtax_taxhist_tax_id_fkey FOREIGN KEY (taxhist_tax_id) REFERENCES tax(tax_id);


--
-- TOC entry 8111 (class 2606 OID 146574349)
-- Dependencies: 6796 199 841 8894
-- Name: voheadtax_taxhist_taxtype_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY voheadtax
    ADD CONSTRAINT voheadtax_taxhist_taxtype_id_fkey FOREIGN KEY (taxhist_taxtype_id) REFERENCES taxtype(taxtype_id);


--
-- TOC entry 8112 (class 2606 OID 146574354)
-- Dependencies: 6796 199 842 8894
-- Name: voitem_voitem_taxtype_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY voitem
    ADD CONSTRAINT voitem_voitem_taxtype_id_fkey FOREIGN KEY (voitem_taxtype_id) REFERENCES taxtype(taxtype_id);


--
-- TOC entry 8113 (class 2606 OID 146574359)
-- Dependencies: 7124 363 844 8894
-- Name: voitemtax_taxhist_basis_tax_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY voitemtax
    ADD CONSTRAINT voitemtax_taxhist_basis_tax_id_fkey FOREIGN KEY (taxhist_basis_tax_id) REFERENCES tax(tax_id);


--
-- TOC entry 8114 (class 2606 OID 146574364)
-- Dependencies: 7648 842 844 8894
-- Name: voitemtax_taxhist_parent_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY voitemtax
    ADD CONSTRAINT voitemtax_taxhist_parent_id_fkey FOREIGN KEY (taxhist_parent_id) REFERENCES voitem(voitem_id) ON DELETE CASCADE;


--
-- TOC entry 8115 (class 2606 OID 146574369)
-- Dependencies: 7124 363 844 8894
-- Name: voitemtax_taxhist_tax_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY voitemtax
    ADD CONSTRAINT voitemtax_taxhist_tax_id_fkey FOREIGN KEY (taxhist_tax_id) REFERENCES tax(tax_id);


--
-- TOC entry 8116 (class 2606 OID 146574374)
-- Dependencies: 6796 199 844 8894
-- Name: voitemtax_taxhist_taxtype_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY voitemtax
    ADD CONSTRAINT voitemtax_taxhist_taxtype_id_fkey FOREIGN KEY (taxhist_taxtype_id) REFERENCES taxtype(taxtype_id);


--
-- TOC entry 7717 (class 2606 OID 146574379)
-- Dependencies: 6954 262 193 8894
-- Name: whsinfo_warehous_accnt_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY whsinfo
    ADD CONSTRAINT whsinfo_warehous_accnt_id_fkey FOREIGN KEY (warehous_default_accnt_id) REFERENCES accnt(accnt_id);


--
-- TOC entry 7718 (class 2606 OID 146574384)
-- Dependencies: 6920 234 193 8894
-- Name: whsinfo_warehous_addr_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY whsinfo
    ADD CONSTRAINT whsinfo_warehous_addr_id_fkey FOREIGN KEY (warehous_addr_id) REFERENCES addr(addr_id);


--
-- TOC entry 7719 (class 2606 OID 146574389)
-- Dependencies: 6816 204 193 8894
-- Name: whsinfo_warehous_cntct_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY whsinfo
    ADD CONSTRAINT whsinfo_warehous_cntct_id_fkey FOREIGN KEY (warehous_cntct_id) REFERENCES cntct(cntct_id);


--
-- TOC entry 7720 (class 2606 OID 146574394)
-- Dependencies: 7057 325 193 8894
-- Name: whsinfo_warehous_costcat_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY whsinfo
    ADD CONSTRAINT whsinfo_warehous_costcat_id_fkey FOREIGN KEY (warehous_costcat_id) REFERENCES costcat(costcat_id);


--
-- TOC entry 7721 (class 2606 OID 146574399)
-- Dependencies: 6984 282 193 8894
-- Name: whsinfo_warehous_shipform_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY whsinfo
    ADD CONSTRAINT whsinfo_warehous_shipform_id_fkey FOREIGN KEY (warehous_shipform_id) REFERENCES shipform(shipform_id);


--
-- TOC entry 7722 (class 2606 OID 146574404)
-- Dependencies: 7150 386 193 8894
-- Name: whsinfo_warehous_shipvia_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY whsinfo
    ADD CONSTRAINT whsinfo_warehous_shipvia_id_fkey FOREIGN KEY (warehous_shipvia_id) REFERENCES shipvia(shipvia_id);


--
-- TOC entry 7723 (class 2606 OID 146574409)
-- Dependencies: 7154 387 193 8894
-- Name: whsinfo_warehous_sitetype_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY whsinfo
    ADD CONSTRAINT whsinfo_warehous_sitetype_id_fkey FOREIGN KEY (warehous_sitetype_id) REFERENCES sitetype(sitetype_id);


--
-- TOC entry 7724 (class 2606 OID 146574414)
-- Dependencies: 6878 220 193 8894
-- Name: whsinfo_warehous_taxzone_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY whsinfo
    ADD CONSTRAINT whsinfo_warehous_taxzone_id_fkey FOREIGN KEY (warehous_taxzone_id) REFERENCES taxzone(taxzone_id);


--
-- TOC entry 8049 (class 2606 OID 146574419)
-- Dependencies: 7121 359 560 8894
-- Name: wo_wo_womatl_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY wo
    ADD CONSTRAINT wo_wo_womatl_id_fkey FOREIGN KEY (wo_womatl_id) REFERENCES womatl(womatl_id) ON DELETE SET NULL;


--
-- TOC entry 7928 (class 2606 OID 146574424)
-- Dependencies: 6800 200 359 8894
-- Name: womatl_womatl_uom_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY womatl
    ADD CONSTRAINT womatl_womatl_uom_id_fkey FOREIGN KEY (womatl_uom_id) REFERENCES uom(uom_id);


--
-- TOC entry 8117 (class 2606 OID 146574429)
-- Dependencies: 7417 623 850 8894
-- Name: womatlpost_womatlpost_invhist_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY womatlpost
    ADD CONSTRAINT womatlpost_womatlpost_invhist_id_fkey FOREIGN KEY (womatlpost_invhist_id) REFERENCES invhist(invhist_id);


--
-- TOC entry 8118 (class 2606 OID 146574434)
-- Dependencies: 7121 359 850 8894
-- Name: womatlpost_womatlpost_womatl_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
--

ALTER TABLE ONLY womatlpost
    ADD CONSTRAINT womatlpost_womatlpost_womatl_id_fkey FOREIGN KEY (womatlpost_womatl_id) REFERENCES womatl(womatl_id) ON DELETE CASCADE;



--
-- TOC entry 8119 (class 2606 OID 146574439)
-- Dependencies: 7662 859 860 8894
-- Name: pkgcmdarg_cmdarg_cmd_id_fkey; Type: FK CONSTRAINT; Schema: te; Owner: admin
--

ALTER TABLE ONLY pkgcmdarg
    ADD CONSTRAINT pkgcmdarg_cmdarg_cmd_id_fkey FOREIGN KEY (cmdarg_cmd_id) REFERENCES pkgcmd(cmd_id);


--
-- TOC entry 8120 (class 2606 OID 146574444)
-- Dependencies: 6834 208 867 8894
-- Name: tecustrate_tecustrate_curr_id_fkey; Type: FK CONSTRAINT; Schema: te; Owner: admin
--

ALTER TABLE ONLY tecustrate
    ADD CONSTRAINT tecustrate_tecustrate_curr_id_fkey FOREIGN KEY (tecustrate_curr_id) REFERENCES public.curr_symbol(curr_id) ON DELETE SET DEFAULT;


--
-- TOC entry 8121 (class 2606 OID 146574449)
-- Dependencies: 6853 213 867 8894
-- Name: tecustrate_tecustrate_cust_id_fkey; Type: FK CONSTRAINT; Schema: te; Owner: admin
--

ALTER TABLE ONLY tecustrate
    ADD CONSTRAINT tecustrate_tecustrate_cust_id_fkey FOREIGN KEY (tecustrate_cust_id) REFERENCES public.custinfo(cust_id) ON DELETE CASCADE;


--
-- TOC entry 8122 (class 2606 OID 146574454)
-- Dependencies: 7002 292 869 8894
-- Name: teemp_teemp_emp_id_fkey; Type: FK CONSTRAINT; Schema: te; Owner: admin
--

ALTER TABLE ONLY teemp
    ADD CONSTRAINT teemp_teemp_emp_id_fkey FOREIGN KEY (teemp_emp_id) REFERENCES public.emp(emp_id) ON DELETE CASCADE;


--
-- TOC entry 8123 (class 2606 OID 146574459)
-- Dependencies: 6834 208 875 8894
-- Name: teitem_teitem_curr_id_fkey; Type: FK CONSTRAINT; Schema: te; Owner: admin
--

ALTER TABLE ONLY teitem
    ADD CONSTRAINT teitem_teitem_curr_id_fkey FOREIGN KEY (teitem_curr_id) REFERENCES public.curr_symbol(curr_id) ON DELETE SET DEFAULT;


--
-- TOC entry 8124 (class 2606 OID 146574464)
-- Dependencies: 6905 229 875 8894
-- Name: teitem_teitem_invcitem_id_fkey; Type: FK CONSTRAINT; Schema: te; Owner: admin
--

ALTER TABLE ONLY teitem
    ADD CONSTRAINT teitem_teitem_invcitem_id_fkey FOREIGN KEY (teitem_invcitem_id) REFERENCES public.invcitem(invcitem_id) ON DELETE SET NULL;


--
-- TOC entry 8125 (class 2606 OID 146574469)
-- Dependencies: 7682 873 875 8894
-- Name: teitem_teitem_tehead_id_fkey; Type: FK CONSTRAINT; Schema: te; Owner: admin
--

ALTER TABLE ONLY teitem
    ADD CONSTRAINT teitem_teitem_tehead_id_fkey FOREIGN KEY (teitem_tehead_id) REFERENCES tehead(tehead_id) ON DELETE CASCADE;


--
-- TOC entry 8126 (class 2606 OID 146574474)
-- Dependencies: 7640 837 875 8894
-- Name: teitem_teitem_vodist_id_fkey; Type: FK CONSTRAINT; Schema: te; Owner: admin
--

ALTER TABLE ONLY teitem
    ADD CONSTRAINT teitem_teitem_vodist_id_fkey FOREIGN KEY (teitem_vodist_id) REFERENCES public.vodist(vodist_id) ON DELETE SET NULL;


--
-- TOC entry 8127 (class 2606 OID 146574479)
-- Dependencies: 6834 208 877 8894
-- Name: teprj_teprj_curr_id_fkey; Type: FK CONSTRAINT; Schema: te; Owner: admin
--

ALTER TABLE ONLY teprj
    ADD CONSTRAINT teprj_teprj_curr_id_fkey FOREIGN KEY (teprj_curr_id) REFERENCES public.curr_symbol(curr_id) ON DELETE SET NULL;


--
-- TOC entry 8128 (class 2606 OID 146574484)
-- Dependencies: 6853 213 877 8894
-- Name: teprj_teprj_cust_id_fkey; Type: FK CONSTRAINT; Schema: te; Owner: admin
--

ALTER TABLE ONLY teprj
    ADD CONSTRAINT teprj_teprj_cust_id_fkey FOREIGN KEY (teprj_cust_id) REFERENCES public.custinfo(cust_id) ON DELETE SET NULL;


--
-- TOC entry 8129 (class 2606 OID 146574489)
-- Dependencies: 6834 208 879 8894
-- Name: teprjtask_teprjtask_curr_id_fkey; Type: FK CONSTRAINT; Schema: te; Owner: admin
--

ALTER TABLE ONLY teprjtask
    ADD CONSTRAINT teprjtask_teprjtask_curr_id_fkey FOREIGN KEY (teprjtask_curr_id) REFERENCES public.curr_symbol(curr_id) ON DELETE SET DEFAULT;


--
-- TOC entry 8130 (class 2606 OID 146574494)
-- Dependencies: 6751 191 879 8894
-- Name: teprjtask_teprjtask_item_id_fkey; Type: FK CONSTRAINT; Schema: te; Owner: admin
--

ALTER TABLE ONLY teprjtask
    ADD CONSTRAINT teprjtask_teprjtask_item_id_fkey FOREIGN KEY (teprjtask_item_id) REFERENCES public.item(item_id) ON DELETE SET NULL;


--
-- TOC entry 8131 (class 2606 OID 146574499)
-- Dependencies: 6911 232 879 8894
-- Name: teprjtask_teprjtask_prjtask_id_fkey; Type: FK CONSTRAINT; Schema: te; Owner: admin
--

ALTER TABLE ONLY teprjtask
    ADD CONSTRAINT teprjtask_teprjtask_prjtask_id_fkey FOREIGN KEY (teprjtask_prjtask_id) REFERENCES public.prjtask(prjtask_id) ON DELETE CASCADE;



--
-- TOC entry 8132 (class 2606 OID 146574504)
-- Dependencies: 7693 881 882 8894
-- Name: pkgcmdarg_cmdarg_cmd_id_fkey; Type: FK CONSTRAINT; Schema: xtdesktop; Owner: admin
--

ALTER TABLE ONLY pkgcmdarg
    ADD CONSTRAINT pkgcmdarg_cmdarg_cmd_id_fkey FOREIGN KEY (cmdarg_cmd_id) REFERENCES pkgcmd(cmd_id);


--
-- TOC entry 8898 (class 0 OID 0)
-- Dependencies: 6
-- Name: api; Type: ACL; Schema: -; Owner: admin
--

REVOKE ALL ON SCHEMA api FROM PUBLIC;
REVOKE ALL ON SCHEMA api FROM admin;
GRANT ALL ON SCHEMA api TO admin;
GRANT ALL ON SCHEMA api TO xtrole;


--
-- TOC entry 8900 (class 0 OID 0)
-- Dependencies: 7
-- Name: fixcountry; Type: ACL; Schema: -; Owner: admin
--

REVOKE ALL ON SCHEMA fixcountry FROM PUBLIC;
REVOKE ALL ON SCHEMA fixcountry FROM admin;
GRANT ALL ON SCHEMA fixcountry TO admin;
GRANT ALL ON SCHEMA fixcountry TO xtrole;


--
-- TOC entry 8902 (class 0 OID 0)
-- Dependencies: 8
-- Name: public; Type: ACL; Schema: -; Owner: postgres
--

REVOKE ALL ON SCHEMA public FROM PUBLIC;
REVOKE ALL ON SCHEMA public FROM postgres;
GRANT ALL ON SCHEMA public TO postgres;
GRANT ALL ON SCHEMA public TO PUBLIC;


--
-- TOC entry 8904 (class 0 OID 0)
-- Dependencies: 9
-- Name: te; Type: ACL; Schema: -; Owner: admin
--

REVOKE ALL ON SCHEMA te FROM PUBLIC;
REVOKE ALL ON SCHEMA te FROM admin;
GRANT ALL ON SCHEMA te TO admin;
GRANT ALL ON SCHEMA te TO xtrole;


--
-- TOC entry 8906 (class 0 OID 0)
-- Dependencies: 10
-- Name: xtdesktop; Type: ACL; Schema: -; Owner: admin
--

REVOKE ALL ON SCHEMA xtdesktop FROM PUBLIC;
REVOKE ALL ON SCHEMA xtdesktop FROM admin;
GRANT ALL ON SCHEMA xtdesktop TO admin;
GRANT ALL ON SCHEMA xtdesktop TO xtrole;



--
-- TOC entry 8909 (class 0 OID 0)
-- Dependencies: 189
-- Name: cntslip; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE cntslip FROM PUBLIC;
REVOKE ALL ON TABLE cntslip FROM admin;
GRANT ALL ON TABLE cntslip TO admin;
GRANT ALL ON TABLE cntslip TO xtrole;


--
-- TOC entry 8911 (class 0 OID 0)
-- Dependencies: 190
-- Name: invcnt; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE invcnt FROM PUBLIC;
REVOKE ALL ON TABLE invcnt FROM admin;
GRANT ALL ON TABLE invcnt TO admin;
GRANT ALL ON TABLE invcnt TO xtrole;


--
-- TOC entry 8915 (class 0 OID 0)
-- Dependencies: 191
-- Name: item; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE item FROM PUBLIC;
REVOKE ALL ON TABLE item FROM admin;
GRANT ALL ON TABLE item TO admin;
GRANT ALL ON TABLE item TO xtrole;


--
-- TOC entry 8921 (class 0 OID 0)
-- Dependencies: 192
-- Name: itemsite; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE itemsite FROM PUBLIC;
REVOKE ALL ON TABLE itemsite FROM admin;
GRANT ALL ON TABLE itemsite TO admin;
GRANT ALL ON TABLE itemsite TO xtrole;


--
-- TOC entry 8923 (class 0 OID 0)
-- Dependencies: 193
-- Name: whsinfo; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE whsinfo FROM PUBLIC;
REVOKE ALL ON TABLE whsinfo FROM admin;
GRANT ALL ON TABLE whsinfo TO admin;
GRANT ALL ON TABLE whsinfo TO xtrole;



--
-- TOC entry 8925 (class 0 OID 0)
-- Dependencies: 194
-- Name: physinvcount; Type: ACL; Schema: api; Owner: admin
--

REVOKE ALL ON TABLE physinvcount FROM PUBLIC;
REVOKE ALL ON TABLE physinvcount FROM admin;
GRANT ALL ON TABLE physinvcount TO admin;
GRANT ALL ON TABLE physinvcount TO xtrole;



--
-- TOC entry 8929 (class 0 OID 0)
-- Dependencies: 195
-- Name: cohead; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE cohead FROM PUBLIC;
REVOKE ALL ON TABLE cohead FROM admin;
GRANT ALL ON TABLE cohead TO admin;
GRANT ALL ON TABLE cohead TO xtrole;


--
-- TOC entry 8932 (class 0 OID 0)
-- Dependencies: 196
-- Name: coitem; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE coitem FROM PUBLIC;
REVOKE ALL ON TABLE coitem FROM admin;
GRANT ALL ON TABLE coitem TO admin;
GRANT ALL ON TABLE coitem TO xtrole;


--
-- TOC entry 8934 (class 0 OID 0)
-- Dependencies: 197
-- Name: pohead; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE pohead FROM PUBLIC;
REVOKE ALL ON TABLE pohead FROM admin;
GRANT ALL ON TABLE pohead TO admin;
GRANT ALL ON TABLE pohead TO xtrole;


--
-- TOC entry 8936 (class 0 OID 0)
-- Dependencies: 198
-- Name: poitem; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE poitem FROM PUBLIC;
REVOKE ALL ON TABLE poitem FROM admin;
GRANT ALL ON TABLE poitem TO admin;
GRANT ALL ON TABLE poitem TO xtrole;


--
-- TOC entry 8938 (class 0 OID 0)
-- Dependencies: 199
-- Name: taxtype; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE taxtype FROM PUBLIC;
REVOKE ALL ON TABLE taxtype FROM admin;
GRANT ALL ON TABLE taxtype TO admin;
GRANT ALL ON TABLE taxtype TO xtrole;


--
-- TOC entry 8940 (class 0 OID 0)
-- Dependencies: 200
-- Name: uom; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE uom FROM PUBLIC;
REVOKE ALL ON TABLE uom FROM admin;
GRANT ALL ON TABLE uom TO admin;
GRANT ALL ON TABLE uom TO xtrole;



--
-- TOC entry 8942 (class 0 OID 0)
-- Dependencies: 201
-- Name: salesline; Type: ACL; Schema: api; Owner: admin
--

REVOKE ALL ON TABLE salesline FROM PUBLIC;
REVOKE ALL ON TABLE salesline FROM admin;
GRANT ALL ON TABLE salesline TO admin;
GRANT ALL ON TABLE salesline TO xtrole;



--
-- TOC entry 8943 (class 0 OID 0)
-- Dependencies: 202
-- Name: invbal; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE invbal FROM PUBLIC;
REVOKE ALL ON TABLE invbal FROM admin;
GRANT ALL ON TABLE invbal TO admin;
GRANT ALL ON TABLE invbal TO xtrole;


--
-- TOC entry 8946 (class 0 OID 0)
-- Dependencies: 203
-- Name: bomitem; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE bomitem FROM PUBLIC;
REVOKE ALL ON TABLE bomitem FROM admin;
GRANT ALL ON TABLE bomitem TO admin;
GRANT ALL ON TABLE bomitem TO xtrole;


--
-- TOC entry 8951 (class 0 OID 0)
-- Dependencies: 204
-- Name: cntct; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE cntct FROM PUBLIC;
REVOKE ALL ON TABLE cntct FROM admin;
GRANT ALL ON TABLE cntct TO admin;
GRANT ALL ON TABLE cntct TO xtrole;


--
-- TOC entry 8973 (class 0 OID 0)
-- Dependencies: 205
-- Name: crmacct; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE crmacct FROM PUBLIC;
REVOKE ALL ON TABLE crmacct FROM admin;
GRANT ALL ON TABLE crmacct TO admin;
GRANT ALL ON TABLE crmacct TO xtrole;


--
-- TOC entry 8979 (class 0 OID 0)
-- Dependencies: 206
-- Name: incdt; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE incdt FROM PUBLIC;
REVOKE ALL ON TABLE incdt FROM admin;
GRANT ALL ON TABLE incdt TO admin;
GRANT ALL ON TABLE incdt TO xtrole;


--
-- TOC entry 8982 (class 0 OID 0)
-- Dependencies: 207
-- Name: apopen; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE apopen FROM PUBLIC;
REVOKE ALL ON TABLE apopen FROM admin;
GRANT ALL ON TABLE apopen TO admin;
GRANT ALL ON TABLE apopen TO xtrole;


--
-- TOC entry 8984 (class 0 OID 0)
-- Dependencies: 208
-- Name: curr_symbol; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE curr_symbol FROM PUBLIC;
REVOKE ALL ON TABLE curr_symbol FROM admin;
GRANT ALL ON TABLE curr_symbol TO admin;
GRANT ALL ON TABLE curr_symbol TO xtrole;


--
-- TOC entry 8986 (class 0 OID 0)
-- Dependencies: 209
-- Name: terms; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE terms FROM PUBLIC;
REVOKE ALL ON TABLE terms FROM admin;
GRANT ALL ON TABLE terms TO admin;
GRANT ALL ON TABLE terms TO xtrole;


--
-- TOC entry 8989 (class 0 OID 0)
-- Dependencies: 210
-- Name: vendinfo; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE vendinfo FROM PUBLIC;
REVOKE ALL ON TABLE vendinfo FROM admin;
GRANT ALL ON TABLE vendinfo TO admin;
GRANT ALL ON TABLE vendinfo TO xtrole;



--
-- TOC entry 8991 (class 0 OID 0)
-- Dependencies: 211
-- Name: apmemo; Type: ACL; Schema: api; Owner: admin
--

REVOKE ALL ON TABLE apmemo FROM PUBLIC;
REVOKE ALL ON TABLE apmemo FROM admin;
GRANT ALL ON TABLE apmemo TO admin;
GRANT ALL ON TABLE apmemo TO xtrole;



--
-- TOC entry 8993 (class 0 OID 0)
-- Dependencies: 212
-- Name: aropen; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE aropen FROM PUBLIC;
REVOKE ALL ON TABLE aropen FROM admin;
GRANT ALL ON TABLE aropen TO admin;
GRANT ALL ON TABLE aropen TO xtrole;


--
-- TOC entry 9009 (class 0 OID 0)
-- Dependencies: 213
-- Name: custinfo; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE custinfo FROM PUBLIC;
REVOKE ALL ON TABLE custinfo FROM admin;
GRANT ALL ON TABLE custinfo TO admin;
GRANT ALL ON TABLE custinfo TO xtrole;


--
-- TOC entry 9011 (class 0 OID 0)
-- Dependencies: 214
-- Name: rsncode; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE rsncode FROM PUBLIC;
REVOKE ALL ON TABLE rsncode FROM admin;
GRANT ALL ON TABLE rsncode TO admin;
GRANT ALL ON TABLE rsncode TO xtrole;


--
-- TOC entry 9013 (class 0 OID 0)
-- Dependencies: 215
-- Name: salescat; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE salescat FROM PUBLIC;
REVOKE ALL ON TABLE salescat FROM admin;
GRANT ALL ON TABLE salescat TO admin;
GRANT ALL ON TABLE salescat TO xtrole;


--
-- TOC entry 9016 (class 0 OID 0)
-- Dependencies: 216
-- Name: salesrep; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE salesrep FROM PUBLIC;
REVOKE ALL ON TABLE salesrep FROM admin;
GRANT ALL ON TABLE salesrep TO admin;
GRANT ALL ON TABLE salesrep TO xtrole;



--
-- TOC entry 9018 (class 0 OID 0)
-- Dependencies: 217
-- Name: armemo; Type: ACL; Schema: api; Owner: admin
--

REVOKE ALL ON TABLE armemo FROM PUBLIC;
REVOKE ALL ON TABLE armemo FROM admin;
GRANT ALL ON TABLE armemo TO admin;
GRANT ALL ON TABLE armemo TO xtrole;



--
-- TOC entry 9024 (class 0 OID 0)
-- Dependencies: 218
-- Name: cmhead; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE cmhead FROM PUBLIC;
REVOKE ALL ON TABLE cmhead FROM admin;
GRANT ALL ON TABLE cmhead TO admin;
GRANT ALL ON TABLE cmhead TO xtrole;


--
-- TOC entry 9027 (class 0 OID 0)
-- Dependencies: 219
-- Name: shiptoinfo; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE shiptoinfo FROM PUBLIC;
REVOKE ALL ON TABLE shiptoinfo FROM admin;
GRANT ALL ON TABLE shiptoinfo TO admin;
GRANT ALL ON TABLE shiptoinfo TO xtrole;


--
-- TOC entry 9032 (class 0 OID 0)
-- Dependencies: 220
-- Name: taxzone; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE taxzone FROM PUBLIC;
REVOKE ALL ON TABLE taxzone FROM admin;
GRANT ALL ON TABLE taxzone TO admin;
GRANT ALL ON TABLE taxzone TO xtrole;



--
-- TOC entry 9034 (class 0 OID 0)
-- Dependencies: 221
-- Name: creditmemo; Type: ACL; Schema: api; Owner: admin
--

REVOKE ALL ON TABLE creditmemo FROM PUBLIC;
REVOKE ALL ON TABLE creditmemo FROM admin;
GRANT ALL ON TABLE creditmemo TO admin;
GRANT ALL ON TABLE creditmemo TO xtrole;



--
-- TOC entry 9036 (class 0 OID 0)
-- Dependencies: 222
-- Name: cmitem; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE cmitem FROM PUBLIC;
REVOKE ALL ON TABLE cmitem FROM admin;
GRANT ALL ON TABLE cmitem TO admin;
GRANT ALL ON TABLE cmitem TO xtrole;



--
-- TOC entry 9038 (class 0 OID 0)
-- Dependencies: 223
-- Name: creditmemoline; Type: ACL; Schema: api; Owner: admin
--

REVOKE ALL ON TABLE creditmemoline FROM PUBLIC;
REVOKE ALL ON TABLE creditmemoline FROM admin;
GRANT ALL ON TABLE creditmemoline TO admin;
GRANT ALL ON TABLE creditmemoline TO xtrole;



--
-- TOC entry 9046 (class 0 OID 0)
-- Dependencies: 224
-- Name: invchead; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE invchead FROM PUBLIC;
REVOKE ALL ON TABLE invchead FROM admin;
GRANT ALL ON TABLE invchead TO admin;
GRANT ALL ON TABLE invchead TO xtrole;


--
-- TOC entry 9049 (class 0 OID 0)
-- Dependencies: 225
-- Name: prj; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE prj FROM PUBLIC;
REVOKE ALL ON TABLE prj FROM admin;
GRANT ALL ON TABLE prj TO admin;
GRANT ALL ON TABLE prj TO xtrole;


--
-- TOC entry 9055 (class 0 OID 0)
-- Dependencies: 226
-- Name: saletype; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE saletype FROM PUBLIC;
REVOKE ALL ON TABLE saletype FROM admin;
GRANT ALL ON TABLE saletype TO admin;
GRANT ALL ON TABLE saletype TO xtrole;


--
-- TOC entry 9057 (class 0 OID 0)
-- Dependencies: 227
-- Name: shipzone; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE shipzone FROM PUBLIC;
REVOKE ALL ON TABLE shipzone FROM admin;
GRANT ALL ON TABLE shipzone TO admin;
GRANT ALL ON TABLE shipzone TO xtrole;



--
-- TOC entry 9059 (class 0 OID 0)
-- Dependencies: 228
-- Name: invoice; Type: ACL; Schema: api; Owner: admin
--

REVOKE ALL ON TABLE invoice FROM PUBLIC;
REVOKE ALL ON TABLE invoice FROM admin;
GRANT ALL ON TABLE invoice TO admin;
GRANT ALL ON TABLE invoice TO xtrole;



--
-- TOC entry 9061 (class 0 OID 0)
-- Dependencies: 229
-- Name: invcitem; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE invcitem FROM PUBLIC;
REVOKE ALL ON TABLE invcitem FROM admin;
GRANT ALL ON TABLE invcitem TO admin;
GRANT ALL ON TABLE invcitem TO xtrole;



--
-- TOC entry 9063 (class 0 OID 0)
-- Dependencies: 230
-- Name: invoiceline; Type: ACL; Schema: api; Owner: admin
--

REVOKE ALL ON TABLE invoiceline FROM PUBLIC;
REVOKE ALL ON TABLE invoiceline FROM admin;
GRANT ALL ON TABLE invoiceline TO admin;
GRANT ALL ON TABLE invoiceline TO xtrole;



--
-- TOC entry 9068 (class 0 OID 0)
-- Dependencies: 231
-- Name: ophead; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE ophead FROM PUBLIC;
REVOKE ALL ON TABLE ophead FROM admin;
GRANT ALL ON TABLE ophead TO admin;
GRANT ALL ON TABLE ophead TO xtrole;


--
-- TOC entry 9073 (class 0 OID 0)
-- Dependencies: 232
-- Name: prjtask; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE prjtask FROM PUBLIC;
REVOKE ALL ON TABLE prjtask FROM admin;
GRANT ALL ON TABLE prjtask TO admin;
GRANT ALL ON TABLE prjtask TO xtrole;


--
-- TOC entry 9078 (class 0 OID 0)
-- Dependencies: 233
-- Name: todoitem; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE todoitem FROM PUBLIC;
REVOKE ALL ON TABLE todoitem FROM admin;
GRANT ALL ON TABLE todoitem TO admin;
GRANT ALL ON TABLE todoitem TO xtrole;


--
-- TOC entry 9082 (class 0 OID 0)
-- Dependencies: 234
-- Name: addr; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE addr FROM PUBLIC;
REVOKE ALL ON TABLE addr FROM admin;
GRANT ALL ON TABLE addr TO admin;
GRANT ALL ON TABLE addr TO xtrole;



--
-- TOC entry 9084 (class 0 OID 0)
-- Dependencies: 235
-- Name: account; Type: ACL; Schema: api; Owner: admin
--

REVOKE ALL ON TABLE account FROM PUBLIC;
REVOKE ALL ON TABLE account FROM admin;
GRANT ALL ON TABLE account TO admin;
GRANT ALL ON TABLE account TO xtrole;



--
-- TOC entry 9086 (class 0 OID 0)
-- Dependencies: 236
-- Name: char; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE "char" FROM PUBLIC;
REVOKE ALL ON TABLE "char" FROM admin;
GRANT ALL ON TABLE "char" TO admin;
GRANT ALL ON TABLE "char" TO xtrole;


--
-- TOC entry 9088 (class 0 OID 0)
-- Dependencies: 237
-- Name: charass; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE charass FROM PUBLIC;
REVOKE ALL ON TABLE charass FROM admin;
GRANT ALL ON TABLE charass TO admin;
GRANT ALL ON TABLE charass TO xtrole;



--
-- TOC entry 9090 (class 0 OID 0)
-- Dependencies: 238
-- Name: accountchar; Type: ACL; Schema: api; Owner: admin
--

REVOKE ALL ON TABLE accountchar FROM PUBLIC;
REVOKE ALL ON TABLE accountchar FROM admin;
GRANT ALL ON TABLE accountchar TO admin;
GRANT ALL ON TABLE accountchar TO xtrole;



--
-- TOC entry 9092 (class 0 OID 0)
-- Dependencies: 239
-- Name: cmnttype; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE cmnttype FROM PUBLIC;
REVOKE ALL ON TABLE cmnttype FROM admin;
GRANT ALL ON TABLE cmnttype TO admin;
GRANT ALL ON TABLE cmnttype TO xtrole;


--
-- TOC entry 9094 (class 0 OID 0)
-- Dependencies: 240
-- Name: comment; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE comment FROM PUBLIC;
REVOKE ALL ON TABLE comment FROM admin;
GRANT ALL ON TABLE comment TO admin;
GRANT ALL ON TABLE comment TO xtrole;



--
-- TOC entry 9096 (class 0 OID 0)
-- Dependencies: 241
-- Name: accountcomment; Type: ACL; Schema: api; Owner: admin
--

REVOKE ALL ON TABLE accountcomment FROM PUBLIC;
REVOKE ALL ON TABLE accountcomment FROM admin;
GRANT ALL ON TABLE accountcomment TO admin;
GRANT ALL ON TABLE accountcomment TO xtrole;



--
-- TOC entry 9098 (class 0 OID 0)
-- Dependencies: 242
-- Name: docass; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE docass FROM PUBLIC;
REVOKE ALL ON TABLE docass FROM admin;
GRANT ALL ON TABLE docass TO admin;
GRANT ALL ON TABLE docass TO xtrole;


--
-- TOC entry 9099 (class 0 OID 0)
-- Dependencies: 243
-- Name: file; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE file FROM PUBLIC;
REVOKE ALL ON TABLE file FROM admin;
GRANT ALL ON TABLE file TO admin;
GRANT ALL ON TABLE file TO xtrole;


--
-- TOC entry 9100 (class 0 OID 0)
-- Dependencies: 244
-- Name: urlinfo; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE urlinfo FROM PUBLIC;
REVOKE ALL ON TABLE urlinfo FROM admin;
GRANT ALL ON TABLE urlinfo TO admin;
GRANT ALL ON TABLE urlinfo TO xtrole;


--
-- TOC entry 9101 (class 0 OID 0)
-- Dependencies: 245
-- Name: url; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE url FROM PUBLIC;
REVOKE ALL ON TABLE url FROM admin;
GRANT ALL ON TABLE url TO admin;
GRANT ALL ON TABLE url TO xtrole;



--
-- TOC entry 9103 (class 0 OID 0)
-- Dependencies: 246
-- Name: accountfile; Type: ACL; Schema: api; Owner: admin
--

REVOKE ALL ON TABLE accountfile FROM PUBLIC;
REVOKE ALL ON TABLE accountfile FROM admin;
GRANT ALL ON TABLE accountfile TO admin;
GRANT ALL ON TABLE accountfile TO xtrole;



--
-- TOC entry 9105 (class 0 OID 0)
-- Dependencies: 247
-- Name: docass_docass_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE docass_docass_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE docass_docass_id_seq FROM admin;
GRANT ALL ON SEQUENCE docass_docass_id_seq TO admin;
GRANT ALL ON SEQUENCE docass_docass_id_seq TO xtrole;


--
-- TOC entry 9107 (class 0 OID 0)
-- Dependencies: 248
-- Name: image; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE image FROM PUBLIC;
REVOKE ALL ON TABLE image FROM admin;
GRANT ALL ON TABLE image TO admin;
GRANT ALL ON TABLE image TO xtrole;


--
-- TOC entry 9109 (class 0 OID 0)
-- Dependencies: 249
-- Name: imageass; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE imageass FROM PUBLIC;
REVOKE ALL ON TABLE imageass FROM admin;
GRANT ALL ON TABLE imageass TO admin;
GRANT ALL ON TABLE imageass TO xtrole;



--
-- TOC entry 9111 (class 0 OID 0)
-- Dependencies: 250
-- Name: accountimage; Type: ACL; Schema: api; Owner: admin
--

REVOKE ALL ON TABLE accountimage FROM PUBLIC;
REVOKE ALL ON TABLE accountimage FROM admin;
GRANT ALL ON TABLE accountimage TO admin;
GRANT ALL ON TABLE accountimage TO xtrole;


--
-- TOC entry 9113 (class 0 OID 0)
-- Dependencies: 251
-- Name: address; Type: ACL; Schema: api; Owner: admin
--

REVOKE ALL ON TABLE address FROM PUBLIC;
REVOKE ALL ON TABLE address FROM admin;
GRANT ALL ON TABLE address TO admin;
GRANT ALL ON TABLE address TO xtrole;


--
-- TOC entry 9115 (class 0 OID 0)
-- Dependencies: 252
-- Name: addresschar; Type: ACL; Schema: api; Owner: admin
--

REVOKE ALL ON TABLE addresschar FROM PUBLIC;
REVOKE ALL ON TABLE addresschar FROM admin;
GRANT ALL ON TABLE addresschar TO admin;
GRANT ALL ON TABLE addresschar TO xtrole;


--
-- TOC entry 9117 (class 0 OID 0)
-- Dependencies: 253
-- Name: addresscomment; Type: ACL; Schema: api; Owner: admin
--

REVOKE ALL ON TABLE addresscomment FROM PUBLIC;
REVOKE ALL ON TABLE addresscomment FROM admin;
GRANT ALL ON TABLE addresscomment TO admin;
GRANT ALL ON TABLE addresscomment TO xtrole;



--
-- TOC entry 9119 (class 0 OID 0)
-- Dependencies: 254
-- Name: bomhead; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE bomhead FROM PUBLIC;
REVOKE ALL ON TABLE bomhead FROM admin;
GRANT ALL ON TABLE bomhead TO admin;
GRANT ALL ON TABLE bomhead TO xtrole;



--
-- TOC entry 9121 (class 0 OID 0)
-- Dependencies: 255
-- Name: bom; Type: ACL; Schema: api; Owner: admin
--

REVOKE ALL ON TABLE bom FROM PUBLIC;
REVOKE ALL ON TABLE bom FROM admin;
GRANT ALL ON TABLE bom TO admin;
GRANT ALL ON TABLE bom TO xtrole;


--
-- TOC entry 9123 (class 0 OID 0)
-- Dependencies: 256
-- Name: bomitem; Type: ACL; Schema: api; Owner: admin
--

REVOKE ALL ON TABLE bomitem FROM PUBLIC;
REVOKE ALL ON TABLE bomitem FROM admin;
GRANT ALL ON TABLE bomitem TO admin;
GRANT ALL ON TABLE bomitem TO xtrole;


--
-- TOC entry 9125 (class 0 OID 0)
-- Dependencies: 257
-- Name: bomitemcomment; Type: ACL; Schema: api; Owner: admin
--

REVOKE ALL ON TABLE bomitemcomment FROM PUBLIC;
REVOKE ALL ON TABLE bomitemcomment FROM admin;
GRANT ALL ON TABLE bomitemcomment TO admin;
GRANT ALL ON TABLE bomitemcomment TO xtrole;



--
-- TOC entry 9127 (class 0 OID 0)
-- Dependencies: 258
-- Name: bomitemsub; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE bomitemsub FROM PUBLIC;
REVOKE ALL ON TABLE bomitemsub FROM admin;
GRANT ALL ON TABLE bomitemsub TO admin;
GRANT ALL ON TABLE bomitemsub TO xtrole;



--
-- TOC entry 9129 (class 0 OID 0)
-- Dependencies: 259
-- Name: bomitemsubstitute; Type: ACL; Schema: api; Owner: admin
--

REVOKE ALL ON TABLE bomitemsubstitute FROM PUBLIC;
REVOKE ALL ON TABLE bomitemsubstitute FROM admin;
GRANT ALL ON TABLE bomitemsubstitute TO admin;
GRANT ALL ON TABLE bomitemsubstitute TO xtrole;



--
-- TOC entry 9130 (class 0 OID 0)
-- Dependencies: 260
-- Name: budghead; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE budghead FROM PUBLIC;
REVOKE ALL ON TABLE budghead FROM admin;
GRANT ALL ON TABLE budghead TO admin;
GRANT ALL ON TABLE budghead TO xtrole;



--
-- TOC entry 9132 (class 0 OID 0)
-- Dependencies: 261
-- Name: budget; Type: ACL; Schema: api; Owner: admin
--

REVOKE ALL ON TABLE budget FROM PUBLIC;
REVOKE ALL ON TABLE budget FROM admin;
GRANT ALL ON TABLE budget TO admin;
GRANT ALL ON TABLE budget TO xtrole;



--
-- TOC entry 9134 (class 0 OID 0)
-- Dependencies: 262
-- Name: accnt; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE accnt FROM PUBLIC;
REVOKE ALL ON TABLE accnt FROM admin;
GRANT ALL ON TABLE accnt TO admin;
GRANT ALL ON TABLE accnt TO xtrole;


--
-- TOC entry 9135 (class 0 OID 0)
-- Dependencies: 263
-- Name: budgitem; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE budgitem FROM PUBLIC;
REVOKE ALL ON TABLE budgitem FROM admin;
GRANT ALL ON TABLE budgitem TO admin;
GRANT ALL ON TABLE budgitem TO xtrole;


--
-- TOC entry 9137 (class 0 OID 0)
-- Dependencies: 264
-- Name: period; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE period FROM PUBLIC;
REVOKE ALL ON TABLE period FROM admin;
GRANT ALL ON TABLE period TO admin;
GRANT ALL ON TABLE period TO xtrole;



--
-- TOC entry 9139 (class 0 OID 0)
-- Dependencies: 265
-- Name: budgetentry; Type: ACL; Schema: api; Owner: admin
--

REVOKE ALL ON TABLE budgetentry FROM PUBLIC;
REVOKE ALL ON TABLE budgetentry FROM admin;
GRANT ALL ON TABLE budgetentry TO admin;
GRANT ALL ON TABLE budgetentry TO xtrole;



--
-- TOC entry 9141 (class 0 OID 0)
-- Dependencies: 266
-- Name: bankaccnt; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE bankaccnt FROM PUBLIC;
REVOKE ALL ON TABLE bankaccnt FROM admin;
GRANT ALL ON TABLE bankaccnt TO admin;
GRANT ALL ON TABLE bankaccnt TO xtrole;


--
-- TOC entry 9143 (class 0 OID 0)
-- Dependencies: 267
-- Name: cashrcpt; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE cashrcpt FROM PUBLIC;
REVOKE ALL ON TABLE cashrcpt FROM admin;
GRANT ALL ON TABLE cashrcpt TO admin;
GRANT ALL ON TABLE cashrcpt TO xtrole;



--
-- TOC entry 9145 (class 0 OID 0)
-- Dependencies: 268
-- Name: cashreceipt; Type: ACL; Schema: api; Owner: admin
--

REVOKE ALL ON TABLE cashreceipt FROM PUBLIC;
REVOKE ALL ON TABLE cashreceipt FROM admin;
GRANT ALL ON TABLE cashreceipt TO admin;
GRANT ALL ON TABLE cashreceipt TO xtrole;



--
-- TOC entry 9147 (class 0 OID 0)
-- Dependencies: 269
-- Name: cashrcptitem; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE cashrcptitem FROM PUBLIC;
REVOKE ALL ON TABLE cashrcptitem FROM admin;
GRANT ALL ON TABLE cashrcptitem TO admin;
GRANT ALL ON TABLE cashrcptitem TO xtrole;



--
-- TOC entry 9149 (class 0 OID 0)
-- Dependencies: 270
-- Name: cashreceiptapply; Type: ACL; Schema: api; Owner: admin
--

REVOKE ALL ON TABLE cashreceiptapply FROM PUBLIC;
REVOKE ALL ON TABLE cashreceiptapply FROM admin;
GRANT ALL ON TABLE cashreceiptapply TO admin;
GRANT ALL ON TABLE cashreceiptapply TO xtrole;



--
-- TOC entry 9151 (class 0 OID 0)
-- Dependencies: 271
-- Name: cashrcptmisc; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE cashrcptmisc FROM PUBLIC;
REVOKE ALL ON TABLE cashrcptmisc FROM admin;
GRANT ALL ON TABLE cashrcptmisc TO admin;
GRANT ALL ON TABLE cashrcptmisc TO xtrole;



--
-- TOC entry 9153 (class 0 OID 0)
-- Dependencies: 272
-- Name: cashreceiptapplymisc; Type: ACL; Schema: api; Owner: admin
--

REVOKE ALL ON TABLE cashreceiptapplymisc FROM PUBLIC;
REVOKE ALL ON TABLE cashreceiptapplymisc FROM admin;
GRANT ALL ON TABLE cashreceiptapplymisc TO admin;
GRANT ALL ON TABLE cashreceiptapplymisc TO xtrole;


--
-- TOC entry 9155 (class 0 OID 0)
-- Dependencies: 273
-- Name: contact; Type: ACL; Schema: api; Owner: admin
--

REVOKE ALL ON TABLE contact FROM PUBLIC;
REVOKE ALL ON TABLE contact FROM admin;
GRANT ALL ON TABLE contact TO admin;
GRANT ALL ON TABLE contact TO xtrole;


--
-- TOC entry 9157 (class 0 OID 0)
-- Dependencies: 274
-- Name: contactchar; Type: ACL; Schema: api; Owner: admin
--

REVOKE ALL ON TABLE contactchar FROM PUBLIC;
REVOKE ALL ON TABLE contactchar FROM admin;
GRANT ALL ON TABLE contactchar TO admin;
GRANT ALL ON TABLE contactchar TO xtrole;


--
-- TOC entry 9159 (class 0 OID 0)
-- Dependencies: 275
-- Name: contactcomment; Type: ACL; Schema: api; Owner: admin
--

REVOKE ALL ON TABLE contactcomment FROM PUBLIC;
REVOKE ALL ON TABLE contactcomment FROM admin;
GRANT ALL ON TABLE contactcomment TO admin;
GRANT ALL ON TABLE contactcomment TO xtrole;


--
-- TOC entry 9161 (class 0 OID 0)
-- Dependencies: 276
-- Name: custchar; Type: ACL; Schema: api; Owner: admin
--

REVOKE ALL ON TABLE custchar FROM PUBLIC;
REVOKE ALL ON TABLE custchar FROM admin;
GRANT ALL ON TABLE custchar TO admin;
GRANT ALL ON TABLE custchar TO xtrole;


--
-- TOC entry 9163 (class 0 OID 0)
-- Dependencies: 277
-- Name: custcomment; Type: ACL; Schema: api; Owner: admin
--

REVOKE ALL ON TABLE custcomment FROM PUBLIC;
REVOKE ALL ON TABLE custcomment FROM admin;
GRANT ALL ON TABLE custcomment TO admin;
GRANT ALL ON TABLE custcomment TO xtrole;



--
-- TOC entry 9165 (class 0 OID 0)
-- Dependencies: 278
-- Name: ccard; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE ccard FROM PUBLIC;
REVOKE ALL ON TABLE ccard FROM admin;
GRANT ALL ON TABLE ccard TO admin;
GRANT ALL ON TABLE ccard TO xtrole;



--
-- TOC entry 9167 (class 0 OID 0)
-- Dependencies: 279
-- Name: custcreditcard; Type: ACL; Schema: api; Owner: admin
--

REVOKE ALL ON TABLE custcreditcard FROM PUBLIC;
REVOKE ALL ON TABLE custcreditcard FROM admin;
GRANT ALL ON TABLE custcreditcard TO admin;
GRANT ALL ON TABLE custcreditcard TO xtrole;



--
-- TOC entry 9169 (class 0 OID 0)
-- Dependencies: 280
-- Name: custtype; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE custtype FROM PUBLIC;
REVOKE ALL ON TABLE custtype FROM admin;
GRANT ALL ON TABLE custtype TO admin;
GRANT ALL ON TABLE custtype TO xtrole;


--
-- TOC entry 9171 (class 0 OID 0)
-- Dependencies: 281
-- Name: shipchrg; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE shipchrg FROM PUBLIC;
REVOKE ALL ON TABLE shipchrg FROM admin;
GRANT ALL ON TABLE shipchrg TO admin;
GRANT ALL ON TABLE shipchrg TO xtrole;


--
-- TOC entry 9174 (class 0 OID 0)
-- Dependencies: 282
-- Name: shipform; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE shipform FROM PUBLIC;
REVOKE ALL ON TABLE shipform FROM admin;
GRANT ALL ON TABLE shipform TO admin;
GRANT ALL ON TABLE shipform TO xtrole;



--
-- TOC entry 9176 (class 0 OID 0)
-- Dependencies: 283
-- Name: customer; Type: ACL; Schema: api; Owner: admin
--

REVOKE ALL ON TABLE customer FROM PUBLIC;
REVOKE ALL ON TABLE customer FROM admin;
GRANT ALL ON TABLE customer TO admin;
GRANT ALL ON TABLE customer TO xtrole;



--
-- TOC entry 9179 (class 0 OID 0)
-- Dependencies: 284
-- Name: taxauth; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE taxauth FROM PUBLIC;
REVOKE ALL ON TABLE taxauth FROM admin;
GRANT ALL ON TABLE taxauth TO admin;
GRANT ALL ON TABLE taxauth TO xtrole;


--
-- TOC entry 9182 (class 0 OID 0)
-- Dependencies: 285
-- Name: taxreg; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE taxreg FROM PUBLIC;
REVOKE ALL ON TABLE taxreg FROM admin;
GRANT ALL ON TABLE taxreg TO admin;
GRANT ALL ON TABLE taxreg TO xtrole;



--
-- TOC entry 9184 (class 0 OID 0)
-- Dependencies: 286
-- Name: customertaxreg; Type: ACL; Schema: api; Owner: admin
--

REVOKE ALL ON TABLE customertaxreg FROM PUBLIC;
REVOKE ALL ON TABLE customertaxreg FROM admin;
GRANT ALL ON TABLE customertaxreg TO admin;
GRANT ALL ON TABLE customertaxreg TO xtrole;


--
-- TOC entry 9186 (class 0 OID 0)
-- Dependencies: 287
-- Name: customertype; Type: ACL; Schema: api; Owner: admin
--

REVOKE ALL ON TABLE customertype FROM PUBLIC;
REVOKE ALL ON TABLE customertype FROM admin;
GRANT ALL ON TABLE customertype TO admin;
GRANT ALL ON TABLE customertype TO xtrole;


--
-- TOC entry 9188 (class 0 OID 0)
-- Dependencies: 288
-- Name: customertypechar; Type: ACL; Schema: api; Owner: admin
--

REVOKE ALL ON TABLE customertypechar FROM PUBLIC;
REVOKE ALL ON TABLE customertypechar FROM admin;
GRANT ALL ON TABLE customertypechar TO admin;
GRANT ALL ON TABLE customertypechar TO xtrole;


--
-- TOC entry 9190 (class 0 OID 0)
-- Dependencies: 289
-- Name: custshipto; Type: ACL; Schema: api; Owner: admin
--

REVOKE ALL ON TABLE custshipto FROM PUBLIC;
REVOKE ALL ON TABLE custshipto FROM admin;
GRANT ALL ON TABLE custshipto TO admin;
GRANT ALL ON TABLE custshipto TO xtrole;


--
-- TOC entry 9192 (class 0 OID 0)
-- Dependencies: 290
-- Name: custtax; Type: ACL; Schema: api; Owner: admin
--

REVOKE ALL ON TABLE custtax FROM PUBLIC;
REVOKE ALL ON TABLE custtax FROM admin;
GRANT ALL ON TABLE custtax TO admin;
GRANT ALL ON TABLE custtax TO xtrole;



--
-- TOC entry 9194 (class 0 OID 0)
-- Dependencies: 291
-- Name: dept; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE dept FROM PUBLIC;
REVOKE ALL ON TABLE dept FROM admin;
GRANT ALL ON TABLE dept TO admin;
GRANT ALL ON TABLE dept TO xtrole;


--
-- TOC entry 9203 (class 0 OID 0)
-- Dependencies: 292
-- Name: emp; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE emp FROM PUBLIC;
REVOKE ALL ON TABLE emp FROM admin;
GRANT ALL ON TABLE emp TO admin;
GRANT ALL ON TABLE emp TO xtrole;


--
-- TOC entry 9205 (class 0 OID 0)
-- Dependencies: 293
-- Name: shift; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE shift FROM PUBLIC;
REVOKE ALL ON TABLE shift FROM admin;
GRANT ALL ON TABLE shift TO admin;
GRANT ALL ON TABLE shift TO xtrole;



--
-- TOC entry 9207 (class 0 OID 0)
-- Dependencies: 294
-- Name: employee; Type: ACL; Schema: api; Owner: admin
--

REVOKE ALL ON TABLE employee FROM PUBLIC;
REVOKE ALL ON TABLE employee FROM admin;
GRANT ALL ON TABLE employee TO admin;
GRANT ALL ON TABLE employee TO xtrole;


--
-- TOC entry 9209 (class 0 OID 0)
-- Dependencies: 295
-- Name: employeechar; Type: ACL; Schema: api; Owner: admin
--

REVOKE ALL ON TABLE employeechar FROM PUBLIC;
REVOKE ALL ON TABLE employeechar FROM admin;
GRANT ALL ON TABLE employeechar TO admin;
GRANT ALL ON TABLE employeechar TO xtrole;


--
-- TOC entry 9211 (class 0 OID 0)
-- Dependencies: 296
-- Name: employeecomment; Type: ACL; Schema: api; Owner: admin
--

REVOKE ALL ON TABLE employeecomment FROM PUBLIC;
REVOKE ALL ON TABLE employeecomment FROM admin;
GRANT ALL ON TABLE employeecomment TO admin;
GRANT ALL ON TABLE employeecomment TO xtrole;



--
-- TOC entry 9213 (class 0 OID 0)
-- Dependencies: 297
-- Name: shipdata; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE shipdata FROM PUBLIC;
REVOKE ALL ON TABLE shipdata FROM admin;
GRANT ALL ON TABLE shipdata TO admin;
GRANT ALL ON TABLE shipdata TO xtrole;



--
-- TOC entry 9215 (class 0 OID 0)
-- Dependencies: 298
-- Name: extshipmaint; Type: ACL; Schema: api; Owner: admin
--

REVOKE ALL ON TABLE extshipmaint FROM PUBLIC;
REVOKE ALL ON TABLE extshipmaint FROM admin;
GRANT ALL ON TABLE extshipmaint TO admin;
GRANT ALL ON TABLE extshipmaint TO xtrole;



--
-- TOC entry 9217 (class 0 OID 0)
-- Dependencies: 299
-- Name: freightclass; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE freightclass FROM PUBLIC;
REVOKE ALL ON TABLE freightclass FROM admin;
GRANT ALL ON TABLE freightclass TO admin;
GRANT ALL ON TABLE freightclass TO xtrole;


--
-- TOC entry 9218 (class 0 OID 0)
-- Dependencies: 300
-- Name: ipsfreight; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE ipsfreight FROM PUBLIC;
REVOKE ALL ON TABLE ipsfreight FROM admin;
GRANT ALL ON TABLE ipsfreight TO admin;
GRANT ALL ON TABLE ipsfreight TO xtrole;


--
-- TOC entry 9220 (class 0 OID 0)
-- Dependencies: 301
-- Name: ipshead; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE ipshead FROM PUBLIC;
REVOKE ALL ON TABLE ipshead FROM admin;
GRANT ALL ON TABLE ipshead TO admin;
GRANT ALL ON TABLE ipshead TO xtrole;



--
-- TOC entry 9222 (class 0 OID 0)
-- Dependencies: 302
-- Name: freightpricingscheduleitem; Type: ACL; Schema: api; Owner: admin
--

REVOKE ALL ON TABLE freightpricingscheduleitem FROM PUBLIC;
REVOKE ALL ON TABLE freightpricingscheduleitem FROM admin;
GRANT ALL ON TABLE freightpricingscheduleitem TO admin;
GRANT ALL ON TABLE freightpricingscheduleitem TO xtrole;


--
-- TOC entry 9224 (class 0 OID 0)
-- Dependencies: 303
-- Name: glaccount; Type: ACL; Schema: api; Owner: admin
--

REVOKE ALL ON TABLE glaccount FROM PUBLIC;
REVOKE ALL ON TABLE glaccount FROM admin;
GRANT ALL ON TABLE glaccount TO admin;
GRANT ALL ON TABLE glaccount TO xtrole;



--
-- TOC entry 9226 (class 0 OID 0)
-- Dependencies: 304
-- Name: incdtcat; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE incdtcat FROM PUBLIC;
REVOKE ALL ON TABLE incdtcat FROM admin;
GRANT ALL ON TABLE incdtcat TO admin;
GRANT ALL ON TABLE incdtcat TO xtrole;


--
-- TOC entry 9228 (class 0 OID 0)
-- Dependencies: 305
-- Name: incdtpriority; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE incdtpriority FROM PUBLIC;
REVOKE ALL ON TABLE incdtpriority FROM admin;
GRANT ALL ON TABLE incdtpriority TO admin;
GRANT ALL ON TABLE incdtpriority TO xtrole;


--
-- TOC entry 9230 (class 0 OID 0)
-- Dependencies: 306
-- Name: incdtresolution; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE incdtresolution FROM PUBLIC;
REVOKE ALL ON TABLE incdtresolution FROM admin;
GRANT ALL ON TABLE incdtresolution TO admin;
GRANT ALL ON TABLE incdtresolution TO xtrole;


--
-- TOC entry 9232 (class 0 OID 0)
-- Dependencies: 307
-- Name: incdtseverity; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE incdtseverity FROM PUBLIC;
REVOKE ALL ON TABLE incdtseverity FROM admin;
GRANT ALL ON TABLE incdtseverity TO admin;
GRANT ALL ON TABLE incdtseverity TO xtrole;



--
-- TOC entry 9234 (class 0 OID 0)
-- Dependencies: 308
-- Name: incident; Type: ACL; Schema: api; Owner: admin
--

REVOKE ALL ON TABLE incident FROM PUBLIC;
REVOKE ALL ON TABLE incident FROM admin;
GRANT ALL ON TABLE incident TO admin;
GRANT ALL ON TABLE incident TO xtrole;


--
-- TOC entry 9236 (class 0 OID 0)
-- Dependencies: 309
-- Name: incidentchar; Type: ACL; Schema: api; Owner: admin
--

REVOKE ALL ON TABLE incidentchar FROM PUBLIC;
REVOKE ALL ON TABLE incidentchar FROM admin;
GRANT ALL ON TABLE incidentchar TO admin;
GRANT ALL ON TABLE incidentchar TO xtrole;


--
-- TOC entry 9238 (class 0 OID 0)
-- Dependencies: 310
-- Name: incidentcomment; Type: ACL; Schema: api; Owner: admin
--

REVOKE ALL ON TABLE incidentcomment FROM PUBLIC;
REVOKE ALL ON TABLE incidentcomment FROM admin;
GRANT ALL ON TABLE incidentcomment TO admin;
GRANT ALL ON TABLE incidentcomment TO xtrole;


--
-- TOC entry 9240 (class 0 OID 0)
-- Dependencies: 311
-- Name: incidentfile; Type: ACL; Schema: api; Owner: admin
--

REVOKE ALL ON TABLE incidentfile FROM PUBLIC;
REVOKE ALL ON TABLE incidentfile FROM admin;
GRANT ALL ON TABLE incidentfile TO admin;
GRANT ALL ON TABLE incidentfile TO xtrole;


--
-- TOC entry 9242 (class 0 OID 0)
-- Dependencies: 312
-- Name: incidentimage; Type: ACL; Schema: api; Owner: admin
--

REVOKE ALL ON TABLE incidentimage FROM PUBLIC;
REVOKE ALL ON TABLE incidentimage FROM admin;
GRANT ALL ON TABLE incidentimage TO admin;
GRANT ALL ON TABLE incidentimage TO xtrole;



--
-- TOC entry 9244 (class 0 OID 0)
-- Dependencies: 313
-- Name: classcode; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE classcode FROM PUBLIC;
REVOKE ALL ON TABLE classcode FROM admin;
GRANT ALL ON TABLE classcode TO admin;
GRANT ALL ON TABLE classcode TO xtrole;


--
-- TOC entry 9246 (class 0 OID 0)
-- Dependencies: 314
-- Name: prodcat; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE prodcat FROM PUBLIC;
REVOKE ALL ON TABLE prodcat FROM admin;
GRANT ALL ON TABLE prodcat TO admin;
GRANT ALL ON TABLE prodcat TO xtrole;



--
-- TOC entry 9248 (class 0 OID 0)
-- Dependencies: 315
-- Name: item; Type: ACL; Schema: api; Owner: admin
--

REVOKE ALL ON TABLE item FROM PUBLIC;
REVOKE ALL ON TABLE item FROM admin;
GRANT ALL ON TABLE item TO admin;
GRANT ALL ON TABLE item TO xtrole;



--
-- TOC entry 9251 (class 0 OID 0)
-- Dependencies: 316
-- Name: itemalias; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE itemalias FROM PUBLIC;
REVOKE ALL ON TABLE itemalias FROM admin;
GRANT ALL ON TABLE itemalias TO admin;
GRANT ALL ON TABLE itemalias TO xtrole;



--
-- TOC entry 9253 (class 0 OID 0)
-- Dependencies: 317
-- Name: itemalias; Type: ACL; Schema: api; Owner: admin
--

REVOKE ALL ON TABLE itemalias FROM PUBLIC;
REVOKE ALL ON TABLE itemalias FROM admin;
GRANT ALL ON TABLE itemalias TO admin;
GRANT ALL ON TABLE itemalias TO xtrole;


--
-- TOC entry 9255 (class 0 OID 0)
-- Dependencies: 318
-- Name: itemchar; Type: ACL; Schema: api; Owner: admin
--

REVOKE ALL ON TABLE itemchar FROM PUBLIC;
REVOKE ALL ON TABLE itemchar FROM admin;
GRANT ALL ON TABLE itemchar TO admin;
GRANT ALL ON TABLE itemchar TO xtrole;


--
-- TOC entry 9257 (class 0 OID 0)
-- Dependencies: 319
-- Name: itemcomment; Type: ACL; Schema: api; Owner: admin
--

REVOKE ALL ON TABLE itemcomment FROM PUBLIC;
REVOKE ALL ON TABLE itemcomment FROM admin;
GRANT ALL ON TABLE itemcomment TO admin;
GRANT ALL ON TABLE itemcomment TO xtrole;



--
-- TOC entry 9259 (class 0 OID 0)
-- Dependencies: 320
-- Name: costelem; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE costelem FROM PUBLIC;
REVOKE ALL ON TABLE costelem FROM admin;
GRANT ALL ON TABLE costelem TO admin;
GRANT ALL ON TABLE costelem TO xtrole;


--
-- TOC entry 9261 (class 0 OID 0)
-- Dependencies: 321
-- Name: itemcost; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE itemcost FROM PUBLIC;
REVOKE ALL ON TABLE itemcost FROM admin;
GRANT ALL ON TABLE itemcost TO admin;
GRANT ALL ON TABLE itemcost TO xtrole;



--
-- TOC entry 9263 (class 0 OID 0)
-- Dependencies: 322
-- Name: itemcost; Type: ACL; Schema: api; Owner: admin
--

REVOKE ALL ON TABLE itemcost FROM PUBLIC;
REVOKE ALL ON TABLE itemcost FROM admin;
GRANT ALL ON TABLE itemcost TO admin;
GRANT ALL ON TABLE itemcost TO xtrole;


--
-- TOC entry 9265 (class 0 OID 0)
-- Dependencies: 323
-- Name: itemfile; Type: ACL; Schema: api; Owner: admin
--

REVOKE ALL ON TABLE itemfile FROM PUBLIC;
REVOKE ALL ON TABLE itemfile FROM admin;
GRANT ALL ON TABLE itemfile TO admin;
GRANT ALL ON TABLE itemfile TO xtrole;


--
-- TOC entry 9267 (class 0 OID 0)
-- Dependencies: 324
-- Name: itemimage; Type: ACL; Schema: api; Owner: admin
--

REVOKE ALL ON TABLE itemimage FROM PUBLIC;
REVOKE ALL ON TABLE itemimage FROM admin;
GRANT ALL ON TABLE itemimage TO admin;
GRANT ALL ON TABLE itemimage TO xtrole;



--
-- TOC entry 9269 (class 0 OID 0)
-- Dependencies: 325
-- Name: costcat; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE costcat FROM PUBLIC;
REVOKE ALL ON TABLE costcat FROM admin;
GRANT ALL ON TABLE costcat TO admin;
GRANT ALL ON TABLE costcat TO xtrole;


--
-- TOC entry 9271 (class 0 OID 0)
-- Dependencies: 326
-- Name: plancode; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE plancode FROM PUBLIC;
REVOKE ALL ON TABLE plancode FROM admin;
GRANT ALL ON TABLE plancode TO admin;
GRANT ALL ON TABLE plancode TO xtrole;



--
-- TOC entry 9273 (class 0 OID 0)
-- Dependencies: 327
-- Name: itemsite; Type: ACL; Schema: api; Owner: admin
--

REVOKE ALL ON TABLE itemsite FROM PUBLIC;
REVOKE ALL ON TABLE itemsite FROM admin;
GRANT ALL ON TABLE itemsite TO admin;
GRANT ALL ON TABLE itemsite TO xtrole;


--
-- TOC entry 9275 (class 0 OID 0)
-- Dependencies: 328
-- Name: itemsitecomment; Type: ACL; Schema: api; Owner: admin
--

REVOKE ALL ON TABLE itemsitecomment FROM PUBLIC;
REVOKE ALL ON TABLE itemsitecomment FROM admin;
GRANT ALL ON TABLE itemsitecomment TO admin;
GRANT ALL ON TABLE itemsitecomment TO xtrole;



--
-- TOC entry 9284 (class 0 OID 0)
-- Dependencies: 329
-- Name: contrct; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE contrct FROM PUBLIC;
REVOKE ALL ON TABLE contrct FROM admin;
GRANT ALL ON TABLE contrct TO admin;
GRANT ALL ON TABLE contrct TO xtrole;


--
-- TOC entry 9289 (class 0 OID 0)
-- Dependencies: 330
-- Name: itemsrc; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE itemsrc FROM PUBLIC;
REVOKE ALL ON TABLE itemsrc FROM admin;
GRANT ALL ON TABLE itemsrc TO admin;
GRANT ALL ON TABLE itemsrc TO xtrole;



--
-- TOC entry 9291 (class 0 OID 0)
-- Dependencies: 331
-- Name: itemsource; Type: ACL; Schema: api; Owner: admin
--

REVOKE ALL ON TABLE itemsource FROM PUBLIC;
REVOKE ALL ON TABLE itemsource FROM admin;
GRANT ALL ON TABLE itemsource TO admin;
GRANT ALL ON TABLE itemsource TO xtrole;



--
-- TOC entry 9298 (class 0 OID 0)
-- Dependencies: 332
-- Name: itemsrcp; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE itemsrcp FROM PUBLIC;
REVOKE ALL ON TABLE itemsrcp FROM admin;
GRANT ALL ON TABLE itemsrcp TO admin;
GRANT ALL ON TABLE itemsrcp TO xtrole;



--
-- TOC entry 9300 (class 0 OID 0)
-- Dependencies: 333
-- Name: itemsourceprice; Type: ACL; Schema: api; Owner: admin
--

REVOKE ALL ON TABLE itemsourceprice FROM PUBLIC;
REVOKE ALL ON TABLE itemsourceprice FROM admin;
GRANT ALL ON TABLE itemsourceprice TO admin;
GRANT ALL ON TABLE itemsourceprice TO xtrole;



--
-- TOC entry 9302 (class 0 OID 0)
-- Dependencies: 334
-- Name: itemsub; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE itemsub FROM PUBLIC;
REVOKE ALL ON TABLE itemsub FROM admin;
GRANT ALL ON TABLE itemsub TO admin;
GRANT ALL ON TABLE itemsub TO xtrole;



--
-- TOC entry 9304 (class 0 OID 0)
-- Dependencies: 335
-- Name: itemsubstitute; Type: ACL; Schema: api; Owner: admin
--

REVOKE ALL ON TABLE itemsubstitute FROM PUBLIC;
REVOKE ALL ON TABLE itemsubstitute FROM admin;
GRANT ALL ON TABLE itemsubstitute TO admin;
GRANT ALL ON TABLE itemsubstitute TO xtrole;



--
-- TOC entry 9306 (class 0 OID 0)
-- Dependencies: 336
-- Name: itemtax; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE itemtax FROM PUBLIC;
REVOKE ALL ON TABLE itemtax FROM admin;
GRANT ALL ON TABLE itemtax TO admin;
GRANT ALL ON TABLE itemtax TO xtrole;



--
-- TOC entry 9308 (class 0 OID 0)
-- Dependencies: 337
-- Name: itemtaxtype; Type: ACL; Schema: api; Owner: admin
--

REVOKE ALL ON TABLE itemtaxtype FROM PUBLIC;
REVOKE ALL ON TABLE itemtaxtype FROM admin;
GRANT ALL ON TABLE itemtaxtype TO admin;
GRANT ALL ON TABLE itemtaxtype TO xtrole;



--
-- TOC entry 9310 (class 0 OID 0)
-- Dependencies: 338
-- Name: itemuomconv; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE itemuomconv FROM PUBLIC;
REVOKE ALL ON TABLE itemuomconv FROM admin;
GRANT ALL ON TABLE itemuomconv TO admin;
GRANT ALL ON TABLE itemuomconv TO xtrole;



--
-- TOC entry 9312 (class 0 OID 0)
-- Dependencies: 339
-- Name: itemuomconversion; Type: ACL; Schema: api; Owner: admin
--

REVOKE ALL ON TABLE itemuomconversion FROM PUBLIC;
REVOKE ALL ON TABLE itemuomconversion FROM admin;
GRANT ALL ON TABLE itemuomconversion TO admin;
GRANT ALL ON TABLE itemuomconversion TO xtrole;



--
-- TOC entry 9314 (class 0 OID 0)
-- Dependencies: 340
-- Name: gltrans; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE gltrans FROM PUBLIC;
REVOKE ALL ON TABLE gltrans FROM admin;
GRANT ALL ON TABLE gltrans TO admin;
GRANT ALL ON TABLE gltrans TO xtrole;



--
-- TOC entry 9316 (class 0 OID 0)
-- Dependencies: 341
-- Name: journalentry; Type: ACL; Schema: api; Owner: admin
--

REVOKE ALL ON TABLE journalentry FROM PUBLIC;
REVOKE ALL ON TABLE journalentry FROM admin;
GRANT ALL ON TABLE journalentry TO admin;
GRANT ALL ON TABLE journalentry TO xtrole;



--
-- TOC entry 9318 (class 0 OID 0)
-- Dependencies: 342
-- Name: location; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE location FROM PUBLIC;
REVOKE ALL ON TABLE location FROM admin;
GRANT ALL ON TABLE location TO admin;
GRANT ALL ON TABLE location TO xtrole;


--
-- TOC entry 9320 (class 0 OID 0)
-- Dependencies: 343
-- Name: whsezone; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE whsezone FROM PUBLIC;
REVOKE ALL ON TABLE whsezone FROM admin;
GRANT ALL ON TABLE whsezone TO admin;
GRANT ALL ON TABLE whsezone TO xtrole;



--
-- TOC entry 9322 (class 0 OID 0)
-- Dependencies: 344
-- Name: location; Type: ACL; Schema: api; Owner: admin
--

REVOKE ALL ON TABLE location FROM PUBLIC;
REVOKE ALL ON TABLE location FROM admin;
GRANT ALL ON TABLE location TO admin;
GRANT ALL ON TABLE location TO xtrole;


--
-- TOC entry 9324 (class 0 OID 0)
-- Dependencies: 345
-- Name: misccounttag; Type: ACL; Schema: api; Owner: admin
--

REVOKE ALL ON TABLE misccounttag FROM PUBLIC;
REVOKE ALL ON TABLE misccounttag FROM admin;
GRANT ALL ON TABLE misccounttag TO admin;
GRANT ALL ON TABLE misccounttag TO xtrole;


--
-- TOC entry 9326 (class 0 OID 0)
-- Dependencies: 346
-- Name: pricingschedule; Type: ACL; Schema: api; Owner: admin
--

REVOKE ALL ON TABLE pricingschedule FROM PUBLIC;
REVOKE ALL ON TABLE pricingschedule FROM admin;
GRANT ALL ON TABLE pricingschedule TO admin;
GRANT ALL ON TABLE pricingschedule TO xtrole;



--
-- TOC entry 9328 (class 0 OID 0)
-- Dependencies: 347
-- Name: ipsass; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE ipsass FROM PUBLIC;
REVOKE ALL ON TABLE ipsass FROM admin;
GRANT ALL ON TABLE ipsass TO admin;
GRANT ALL ON TABLE ipsass TO xtrole;



--
-- TOC entry 9330 (class 0 OID 0)
-- Dependencies: 348
-- Name: pricingscheduleassign; Type: ACL; Schema: api; Owner: admin
--

REVOKE ALL ON TABLE pricingscheduleassign FROM PUBLIC;
REVOKE ALL ON TABLE pricingscheduleassign FROM admin;
GRANT ALL ON TABLE pricingscheduleassign TO admin;
GRANT ALL ON TABLE pricingscheduleassign TO xtrole;



--
-- TOC entry 9335 (class 0 OID 0)
-- Dependencies: 349
-- Name: ipsiteminfo; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE ipsiteminfo FROM PUBLIC;
REVOKE ALL ON TABLE ipsiteminfo FROM admin;
GRANT ALL ON TABLE ipsiteminfo TO admin;
GRANT ALL ON TABLE ipsiteminfo TO xtrole;



--
-- TOC entry 9337 (class 0 OID 0)
-- Dependencies: 350
-- Name: pricingscheduleitem; Type: ACL; Schema: api; Owner: admin
--

REVOKE ALL ON TABLE pricingscheduleitem FROM PUBLIC;
REVOKE ALL ON TABLE pricingscheduleitem FROM admin;
GRANT ALL ON TABLE pricingscheduleitem TO admin;
GRANT ALL ON TABLE pricingscheduleitem TO xtrole;



--
-- TOC entry 9339 (class 0 OID 0)
-- Dependencies: 351
-- Name: ipsitemchar; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE ipsitemchar FROM PUBLIC;
REVOKE ALL ON TABLE ipsitemchar FROM admin;
GRANT ALL ON TABLE ipsitemchar TO admin;
GRANT ALL ON TABLE ipsitemchar TO xtrole;



--
-- TOC entry 9341 (class 0 OID 0)
-- Dependencies: 352
-- Name: pricingscheduleitemchar; Type: ACL; Schema: api; Owner: admin
--

REVOKE ALL ON TABLE pricingscheduleitemchar FROM PUBLIC;
REVOKE ALL ON TABLE pricingscheduleitemchar FROM admin;
GRANT ALL ON TABLE pricingscheduleitemchar TO admin;
GRANT ALL ON TABLE pricingscheduleitemchar TO xtrole;


--
-- TOC entry 9343 (class 0 OID 0)
-- Dependencies: 353
-- Name: project; Type: ACL; Schema: api; Owner: admin
--

REVOKE ALL ON TABLE project FROM PUBLIC;
REVOKE ALL ON TABLE project FROM admin;
GRANT ALL ON TABLE project TO admin;
GRANT ALL ON TABLE project TO xtrole;


--
-- TOC entry 9345 (class 0 OID 0)
-- Dependencies: 354
-- Name: projectcomment; Type: ACL; Schema: api; Owner: admin
--

REVOKE ALL ON TABLE projectcomment FROM PUBLIC;
REVOKE ALL ON TABLE projectcomment FROM admin;
GRANT ALL ON TABLE projectcomment TO admin;
GRANT ALL ON TABLE projectcomment TO xtrole;



--
-- TOC entry 9346 (class 0 OID 0)
-- Dependencies: 355
-- Name: cust_cust_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE cust_cust_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE cust_cust_id_seq FROM admin;
GRANT ALL ON SEQUENCE cust_cust_id_seq TO admin;
GRANT ALL ON SEQUENCE cust_cust_id_seq TO xtrole;


--
-- TOC entry 9348 (class 0 OID 0)
-- Dependencies: 356
-- Name: prospect; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE prospect FROM PUBLIC;
REVOKE ALL ON TABLE prospect FROM admin;
GRANT ALL ON TABLE prospect TO admin;
GRANT ALL ON TABLE prospect TO xtrole;



--
-- TOC entry 9350 (class 0 OID 0)
-- Dependencies: 357
-- Name: prospect; Type: ACL; Schema: api; Owner: admin
--

REVOKE ALL ON TABLE prospect FROM PUBLIC;
REVOKE ALL ON TABLE prospect FROM admin;
GRANT ALL ON TABLE prospect TO admin;
GRANT ALL ON TABLE prospect TO xtrole;



--
-- TOC entry 9352 (class 0 OID 0)
-- Dependencies: 358
-- Name: expcat; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE expcat FROM PUBLIC;
REVOKE ALL ON TABLE expcat FROM admin;
GRANT ALL ON TABLE expcat TO admin;
GRANT ALL ON TABLE expcat TO xtrole;


--
-- TOC entry 9355 (class 0 OID 0)
-- Dependencies: 359
-- Name: womatl; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE womatl FROM PUBLIC;
REVOKE ALL ON TABLE womatl FROM admin;
GRANT ALL ON TABLE womatl TO admin;
GRANT ALL ON TABLE womatl TO xtrole;



--
-- TOC entry 9357 (class 0 OID 0)
-- Dependencies: 360
-- Name: purchaseline; Type: ACL; Schema: api; Owner: admin
--

REVOKE ALL ON TABLE purchaseline FROM PUBLIC;
REVOKE ALL ON TABLE purchaseline FROM admin;
GRANT ALL ON TABLE purchaseline TO admin;
GRANT ALL ON TABLE purchaseline TO xtrole;


--
-- TOC entry 9359 (class 0 OID 0)
-- Dependencies: 361
-- Name: purchaselinechar; Type: ACL; Schema: api; Owner: admin
--

REVOKE ALL ON TABLE purchaselinechar FROM PUBLIC;
REVOKE ALL ON TABLE purchaselinechar FROM admin;
GRANT ALL ON TABLE purchaselinechar TO admin;
GRANT ALL ON TABLE purchaselinechar TO xtrole;


--
-- TOC entry 9361 (class 0 OID 0)
-- Dependencies: 362
-- Name: purchaselinecomment; Type: ACL; Schema: api; Owner: admin
--

REVOKE ALL ON TABLE purchaselinecomment FROM PUBLIC;
REVOKE ALL ON TABLE purchaselinecomment FROM admin;
GRANT ALL ON TABLE purchaselinecomment TO admin;
GRANT ALL ON TABLE purchaselinecomment TO xtrole;



--
-- TOC entry 9364 (class 0 OID 0)
-- Dependencies: 363
-- Name: tax; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE tax FROM PUBLIC;
REVOKE ALL ON TABLE tax FROM admin;
GRANT ALL ON TABLE tax TO admin;
GRANT ALL ON TABLE tax TO xtrole;


--
-- TOC entry 9366 (class 0 OID 0)
-- Dependencies: 364
-- Name: vendaddrinfo; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE vendaddrinfo FROM PUBLIC;
REVOKE ALL ON TABLE vendaddrinfo FROM admin;
GRANT ALL ON TABLE vendaddrinfo TO admin;
GRANT ALL ON TABLE vendaddrinfo TO xtrole;



--
-- TOC entry 9368 (class 0 OID 0)
-- Dependencies: 365
-- Name: purchaseorder; Type: ACL; Schema: api; Owner: admin
--

REVOKE ALL ON TABLE purchaseorder FROM PUBLIC;
REVOKE ALL ON TABLE purchaseorder FROM admin;
GRANT ALL ON TABLE purchaseorder TO admin;
GRANT ALL ON TABLE purchaseorder TO xtrole;


--
-- TOC entry 9370 (class 0 OID 0)
-- Dependencies: 366
-- Name: purchaseordercomment; Type: ACL; Schema: api; Owner: admin
--

REVOKE ALL ON TABLE purchaseordercomment FROM PUBLIC;
REVOKE ALL ON TABLE purchaseordercomment FROM admin;
GRANT ALL ON TABLE purchaseordercomment TO admin;
GRANT ALL ON TABLE purchaseordercomment TO xtrole;



--
-- TOC entry 9374 (class 0 OID 0)
-- Dependencies: 367
-- Name: quhead; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE quhead FROM PUBLIC;
REVOKE ALL ON TABLE quhead FROM admin;
GRANT ALL ON TABLE quhead TO admin;
GRANT ALL ON TABLE quhead TO xtrole;



--
-- TOC entry 9376 (class 0 OID 0)
-- Dependencies: 368
-- Name: quote; Type: ACL; Schema: api; Owner: admin
--

REVOKE ALL ON TABLE quote FROM PUBLIC;
REVOKE ALL ON TABLE quote FROM admin;
GRANT ALL ON TABLE quote TO admin;
GRANT ALL ON TABLE quote TO xtrole;


--
-- TOC entry 9378 (class 0 OID 0)
-- Dependencies: 369
-- Name: quotecomment; Type: ACL; Schema: api; Owner: admin
--

REVOKE ALL ON TABLE quotecomment FROM PUBLIC;
REVOKE ALL ON TABLE quotecomment FROM admin;
GRANT ALL ON TABLE quotecomment TO admin;
GRANT ALL ON TABLE quotecomment TO xtrole;



--
-- TOC entry 9381 (class 0 OID 0)
-- Dependencies: 370
-- Name: quitem; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE quitem FROM PUBLIC;
REVOKE ALL ON TABLE quitem FROM admin;
GRANT ALL ON TABLE quitem TO admin;
GRANT ALL ON TABLE quitem TO xtrole;



--
-- TOC entry 9383 (class 0 OID 0)
-- Dependencies: 371
-- Name: quoteline; Type: ACL; Schema: api; Owner: admin
--

REVOKE ALL ON TABLE quoteline FROM PUBLIC;
REVOKE ALL ON TABLE quoteline FROM admin;
GRANT ALL ON TABLE quoteline TO admin;
GRANT ALL ON TABLE quoteline TO xtrole;


--
-- TOC entry 9385 (class 0 OID 0)
-- Dependencies: 372
-- Name: quotelinechar; Type: ACL; Schema: api; Owner: admin
--

REVOKE ALL ON TABLE quotelinechar FROM PUBLIC;
REVOKE ALL ON TABLE quotelinechar FROM admin;
GRANT ALL ON TABLE quotelinechar TO admin;
GRANT ALL ON TABLE quotelinechar TO xtrole;


--
-- TOC entry 9387 (class 0 OID 0)
-- Dependencies: 373
-- Name: quotelinecomment; Type: ACL; Schema: api; Owner: admin
--

REVOKE ALL ON TABLE quotelinecomment FROM PUBLIC;
REVOKE ALL ON TABLE quotelinecomment FROM admin;
GRANT ALL ON TABLE quotelinecomment TO admin;
GRANT ALL ON TABLE quotelinecomment TO xtrole;



--
-- TOC entry 9388 (class 0 OID 0)
-- Dependencies: 374
-- Name: aropenalloc; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE aropenalloc FROM PUBLIC;
REVOKE ALL ON TABLE aropenalloc FROM admin;
GRANT ALL ON TABLE aropenalloc TO admin;
GRANT ALL ON TABLE aropenalloc TO xtrole;



--
-- TOC entry 9390 (class 0 OID 0)
-- Dependencies: 375
-- Name: salescredit; Type: ACL; Schema: api; Owner: admin
--

REVOKE ALL ON TABLE salescredit FROM PUBLIC;
REVOKE ALL ON TABLE salescredit FROM admin;
GRANT ALL ON TABLE salescredit TO admin;
GRANT ALL ON TABLE salescredit TO xtrole;



--
-- TOC entry 9395 (class 0 OID 0)
-- Dependencies: 376
-- Name: cohist; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE cohist FROM PUBLIC;
REVOKE ALL ON TABLE cohist FROM admin;
GRANT ALL ON TABLE cohist TO admin;
GRANT ALL ON TABLE cohist TO xtrole;


--
-- TOC entry 9407 (class 0 OID 0)
-- Dependencies: 377
-- Name: taxhist; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE taxhist FROM PUBLIC;
REVOKE ALL ON TABLE taxhist FROM admin;
GRANT ALL ON TABLE taxhist TO admin;
GRANT ALL ON TABLE taxhist TO xtrole;


--
-- TOC entry 9408 (class 0 OID 0)
-- Dependencies: 379
-- Name: cohisttax; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE cohisttax FROM PUBLIC;
REVOKE ALL ON TABLE cohisttax FROM admin;
GRANT ALL ON TABLE cohisttax TO admin;
GRANT ALL ON TABLE cohisttax TO xtrole;



--
-- TOC entry 9410 (class 0 OID 0)
-- Dependencies: 380
-- Name: saleshistory; Type: ACL; Schema: api; Owner: admin
--

REVOKE ALL ON TABLE saleshistory FROM PUBLIC;
REVOKE ALL ON TABLE saleshistory FROM admin;
GRANT ALL ON TABLE saleshistory TO admin;
GRANT ALL ON TABLE saleshistory TO xtrole;


--
-- TOC entry 9412 (class 0 OID 0)
-- Dependencies: 381
-- Name: saleslinechar; Type: ACL; Schema: api; Owner: admin
--

REVOKE ALL ON TABLE saleslinechar FROM PUBLIC;
REVOKE ALL ON TABLE saleslinechar FROM admin;
GRANT ALL ON TABLE saleslinechar TO admin;
GRANT ALL ON TABLE saleslinechar TO xtrole;


--
-- TOC entry 9414 (class 0 OID 0)
-- Dependencies: 382
-- Name: saleslinecomment; Type: ACL; Schema: api; Owner: admin
--

REVOKE ALL ON TABLE saleslinecomment FROM PUBLIC;
REVOKE ALL ON TABLE saleslinecomment FROM admin;
GRANT ALL ON TABLE saleslinecomment TO admin;
GRANT ALL ON TABLE saleslinecomment TO xtrole;


--
-- TOC entry 9416 (class 0 OID 0)
-- Dependencies: 383
-- Name: salesorder; Type: ACL; Schema: api; Owner: admin
--

REVOKE ALL ON TABLE salesorder FROM PUBLIC;
REVOKE ALL ON TABLE salesorder FROM admin;
GRANT ALL ON TABLE salesorder TO admin;
GRANT ALL ON TABLE salesorder TO xtrole;


--
-- TOC entry 9418 (class 0 OID 0)
-- Dependencies: 384
-- Name: salesordercomment; Type: ACL; Schema: api; Owner: admin
--

REVOKE ALL ON TABLE salesordercomment FROM PUBLIC;
REVOKE ALL ON TABLE salesordercomment FROM admin;
GRANT ALL ON TABLE salesordercomment TO admin;
GRANT ALL ON TABLE salesordercomment TO xtrole;


--
-- TOC entry 9420 (class 0 OID 0)
-- Dependencies: 385
-- Name: salesrep; Type: ACL; Schema: api; Owner: admin
--

REVOKE ALL ON TABLE salesrep FROM PUBLIC;
REVOKE ALL ON TABLE salesrep FROM admin;
GRANT ALL ON TABLE salesrep TO admin;
GRANT ALL ON TABLE salesrep TO xtrole;



--
-- TOC entry 9422 (class 0 OID 0)
-- Dependencies: 386
-- Name: shipvia; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE shipvia FROM PUBLIC;
REVOKE ALL ON TABLE shipvia FROM admin;
GRANT ALL ON TABLE shipvia TO admin;
GRANT ALL ON TABLE shipvia TO xtrole;


--
-- TOC entry 9424 (class 0 OID 0)
-- Dependencies: 387
-- Name: sitetype; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE sitetype FROM PUBLIC;
REVOKE ALL ON TABLE sitetype FROM admin;
GRANT ALL ON TABLE sitetype TO admin;
GRANT ALL ON TABLE sitetype TO xtrole;



--
-- TOC entry 9426 (class 0 OID 0)
-- Dependencies: 388
-- Name: site; Type: ACL; Schema: api; Owner: admin
--

REVOKE ALL ON TABLE site FROM PUBLIC;
REVOKE ALL ON TABLE site FROM admin;
GRANT ALL ON TABLE site TO admin;
GRANT ALL ON TABLE site TO xtrole;


--
-- TOC entry 9428 (class 0 OID 0)
-- Dependencies: 389
-- Name: sitezone; Type: ACL; Schema: api; Owner: admin
--

REVOKE ALL ON TABLE sitezone FROM PUBLIC;
REVOKE ALL ON TABLE sitezone FROM admin;
GRANT ALL ON TABLE sitezone TO admin;
GRANT ALL ON TABLE sitezone TO xtrole;


--
-- TOC entry 9430 (class 0 OID 0)
-- Dependencies: 390
-- Name: task; Type: ACL; Schema: api; Owner: admin
--

REVOKE ALL ON TABLE task FROM PUBLIC;
REVOKE ALL ON TABLE task FROM admin;
GRANT ALL ON TABLE task TO admin;
GRANT ALL ON TABLE task TO xtrole;


--
-- TOC entry 9432 (class 0 OID 0)
-- Dependencies: 391
-- Name: taskcomment; Type: ACL; Schema: api; Owner: admin
--

REVOKE ALL ON TABLE taskcomment FROM PUBLIC;
REVOKE ALL ON TABLE taskcomment FROM admin;
GRANT ALL ON TABLE taskcomment TO admin;
GRANT ALL ON TABLE taskcomment TO xtrole;


--
-- TOC entry 9434 (class 0 OID 0)
-- Dependencies: 392
-- Name: todo; Type: ACL; Schema: api; Owner: admin
--

REVOKE ALL ON TABLE todo FROM PUBLIC;
REVOKE ALL ON TABLE todo FROM admin;
GRANT ALL ON TABLE todo TO admin;
GRANT ALL ON TABLE todo TO xtrole;



--
-- TOC entry 9436 (class 0 OID 0)
-- Dependencies: 393
-- Name: vendtype; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE vendtype FROM PUBLIC;
REVOKE ALL ON TABLE vendtype FROM admin;
GRANT ALL ON TABLE vendtype TO admin;
GRANT ALL ON TABLE vendtype TO xtrole;



--
-- TOC entry 9438 (class 0 OID 0)
-- Dependencies: 394
-- Name: vendor; Type: ACL; Schema: api; Owner: admin
--

REVOKE ALL ON TABLE vendor FROM PUBLIC;
REVOKE ALL ON TABLE vendor FROM admin;
GRANT ALL ON TABLE vendor TO admin;
GRANT ALL ON TABLE vendor TO xtrole;


--
-- TOC entry 9440 (class 0 OID 0)
-- Dependencies: 395
-- Name: vendoraddress; Type: ACL; Schema: api; Owner: admin
--

REVOKE ALL ON TABLE vendoraddress FROM PUBLIC;
REVOKE ALL ON TABLE vendoraddress FROM admin;
GRANT ALL ON TABLE vendoraddress TO admin;
GRANT ALL ON TABLE vendoraddress TO xtrole;


--
-- TOC entry 9442 (class 0 OID 0)
-- Dependencies: 396
-- Name: vendortype; Type: ACL; Schema: api; Owner: admin
--

REVOKE ALL ON TABLE vendortype FROM PUBLIC;
REVOKE ALL ON TABLE vendortype FROM admin;
GRANT ALL ON TABLE vendortype TO admin;
GRANT ALL ON TABLE vendortype TO xtrole;



--
-- TOC entry 9444 (class 0 OID 0)
-- Dependencies: 397
-- Name: cmd; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE cmd FROM PUBLIC;
REVOKE ALL ON TABLE cmd FROM admin;
GRANT ALL ON TABLE cmd TO admin;
GRANT ALL ON TABLE cmd TO xtrole;


--
-- TOC entry 9446 (class 0 OID 0)
-- Dependencies: 398
-- Name: cmd_cmd_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE cmd_cmd_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE cmd_cmd_id_seq FROM admin;
GRANT ALL ON SEQUENCE cmd_cmd_id_seq TO admin;
GRANT ALL ON SEQUENCE cmd_cmd_id_seq TO xtrole;



--
-- TOC entry 9447 (class 0 OID 0)
-- Dependencies: 399
-- Name: pkgcmd; Type: ACL; Schema: fixcountry; Owner: admin
--

REVOKE ALL ON TABLE pkgcmd FROM PUBLIC;
REVOKE ALL ON TABLE pkgcmd FROM admin;
GRANT ALL ON TABLE pkgcmd TO admin;
GRANT ALL ON TABLE pkgcmd TO xtrole;



--
-- TOC entry 9449 (class 0 OID 0)
-- Dependencies: 400
-- Name: cmdarg; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE cmdarg FROM PUBLIC;
REVOKE ALL ON TABLE cmdarg FROM admin;
GRANT ALL ON TABLE cmdarg TO admin;
GRANT ALL ON TABLE cmdarg TO xtrole;


--
-- TOC entry 9451 (class 0 OID 0)
-- Dependencies: 401
-- Name: cmdarg_cmdarg_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE cmdarg_cmdarg_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE cmdarg_cmdarg_id_seq FROM admin;
GRANT ALL ON SEQUENCE cmdarg_cmdarg_id_seq TO admin;
GRANT ALL ON SEQUENCE cmdarg_cmdarg_id_seq TO xtrole;



--
-- TOC entry 9452 (class 0 OID 0)
-- Dependencies: 402
-- Name: pkgcmdarg; Type: ACL; Schema: fixcountry; Owner: admin
--

REVOKE ALL ON TABLE pkgcmdarg FROM PUBLIC;
REVOKE ALL ON TABLE pkgcmdarg FROM admin;
GRANT ALL ON TABLE pkgcmdarg TO admin;
GRANT ALL ON TABLE pkgcmdarg TO xtrole;



--
-- TOC entry 9453 (class 0 OID 0)
-- Dependencies: 403
-- Name: image_image_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE image_image_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE image_image_id_seq FROM admin;
GRANT ALL ON SEQUENCE image_image_id_seq TO admin;
GRANT ALL ON SEQUENCE image_image_id_seq TO xtrole;



--
-- TOC entry 9454 (class 0 OID 0)
-- Dependencies: 404
-- Name: pkgimage; Type: ACL; Schema: fixcountry; Owner: admin
--

REVOKE ALL ON TABLE pkgimage FROM PUBLIC;
REVOKE ALL ON TABLE pkgimage FROM admin;
GRANT ALL ON TABLE pkgimage TO admin;
GRANT ALL ON TABLE pkgimage TO xtrole;



--
-- TOC entry 9456 (class 0 OID 0)
-- Dependencies: 405
-- Name: metasql; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE metasql FROM PUBLIC;
REVOKE ALL ON TABLE metasql FROM admin;
GRANT ALL ON TABLE metasql TO admin;
GRANT ALL ON TABLE metasql TO xtrole;


--
-- TOC entry 9458 (class 0 OID 0)
-- Dependencies: 406
-- Name: metasql_metasql_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE metasql_metasql_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE metasql_metasql_id_seq FROM admin;
GRANT ALL ON SEQUENCE metasql_metasql_id_seq TO admin;
GRANT ALL ON SEQUENCE metasql_metasql_id_seq TO xtrole;



--
-- TOC entry 9459 (class 0 OID 0)
-- Dependencies: 407
-- Name: pkgmetasql; Type: ACL; Schema: fixcountry; Owner: admin
--

REVOKE ALL ON TABLE pkgmetasql FROM PUBLIC;
REVOKE ALL ON TABLE pkgmetasql FROM admin;
GRANT ALL ON TABLE pkgmetasql TO admin;
GRANT ALL ON TABLE pkgmetasql TO xtrole;



--
-- TOC entry 9461 (class 0 OID 0)
-- Dependencies: 408
-- Name: priv; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE priv FROM PUBLIC;
REVOKE ALL ON TABLE priv FROM admin;
GRANT ALL ON TABLE priv TO admin;
GRANT ALL ON TABLE priv TO xtrole;


--
-- TOC entry 9462 (class 0 OID 0)
-- Dependencies: 409
-- Name: priv_priv_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE priv_priv_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE priv_priv_id_seq FROM admin;
GRANT ALL ON SEQUENCE priv_priv_id_seq TO admin;
GRANT ALL ON SEQUENCE priv_priv_id_seq TO xtrole;



--
-- TOC entry 9463 (class 0 OID 0)
-- Dependencies: 410
-- Name: pkgpriv; Type: ACL; Schema: fixcountry; Owner: admin
--

REVOKE ALL ON TABLE pkgpriv FROM PUBLIC;
REVOKE ALL ON TABLE pkgpriv FROM admin;
GRANT ALL ON TABLE pkgpriv TO admin;
GRANT ALL ON TABLE pkgpriv TO xtrole;



--
-- TOC entry 9465 (class 0 OID 0)
-- Dependencies: 411
-- Name: report; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE report FROM PUBLIC;
REVOKE ALL ON TABLE report FROM admin;
GRANT ALL ON TABLE report TO admin;
GRANT ALL ON TABLE report TO xtrole;


--
-- TOC entry 9466 (class 0 OID 0)
-- Dependencies: 412
-- Name: report_report_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE report_report_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE report_report_id_seq FROM admin;
GRANT ALL ON SEQUENCE report_report_id_seq TO admin;
GRANT ALL ON SEQUENCE report_report_id_seq TO xtrole;



--
-- TOC entry 9467 (class 0 OID 0)
-- Dependencies: 413
-- Name: pkgreport; Type: ACL; Schema: fixcountry; Owner: admin
--

REVOKE ALL ON TABLE pkgreport FROM PUBLIC;
REVOKE ALL ON TABLE pkgreport FROM admin;
GRANT ALL ON TABLE pkgreport TO admin;
GRANT ALL ON TABLE pkgreport TO xtrole;



--
-- TOC entry 9468 (class 0 OID 0)
-- Dependencies: 414
-- Name: script; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE script FROM PUBLIC;
REVOKE ALL ON TABLE script FROM admin;
GRANT ALL ON TABLE script TO admin;
GRANT ALL ON TABLE script TO xtrole;


--
-- TOC entry 9470 (class 0 OID 0)
-- Dependencies: 415
-- Name: script_script_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE script_script_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE script_script_id_seq FROM admin;
GRANT ALL ON SEQUENCE script_script_id_seq TO admin;
GRANT ALL ON SEQUENCE script_script_id_seq TO xtrole;



--
-- TOC entry 9471 (class 0 OID 0)
-- Dependencies: 416
-- Name: pkgscript; Type: ACL; Schema: fixcountry; Owner: admin
--

REVOKE ALL ON TABLE pkgscript FROM PUBLIC;
REVOKE ALL ON TABLE pkgscript FROM admin;
GRANT ALL ON TABLE pkgscript TO admin;
GRANT ALL ON TABLE pkgscript TO xtrole;



--
-- TOC entry 9472 (class 0 OID 0)
-- Dependencies: 417
-- Name: uiform; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE uiform FROM PUBLIC;
REVOKE ALL ON TABLE uiform FROM admin;
GRANT ALL ON TABLE uiform TO admin;
GRANT ALL ON TABLE uiform TO xtrole;


--
-- TOC entry 9474 (class 0 OID 0)
-- Dependencies: 418
-- Name: uiform_uiform_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE uiform_uiform_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE uiform_uiform_id_seq FROM admin;
GRANT ALL ON SEQUENCE uiform_uiform_id_seq TO admin;
GRANT ALL ON SEQUENCE uiform_uiform_id_seq TO xtrole;



--
-- TOC entry 9475 (class 0 OID 0)
-- Dependencies: 419
-- Name: pkguiform; Type: ACL; Schema: fixcountry; Owner: admin
--

REVOKE ALL ON TABLE pkguiform FROM PUBLIC;
REVOKE ALL ON TABLE pkguiform FROM admin;
GRANT ALL ON TABLE pkguiform TO admin;
GRANT ALL ON TABLE pkguiform TO xtrole;



--
-- TOC entry 9477 (class 0 OID 0)
-- Dependencies: 420
-- Name: acalitem; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE acalitem FROM PUBLIC;
REVOKE ALL ON TABLE acalitem FROM admin;
GRANT ALL ON TABLE acalitem TO admin;
GRANT ALL ON TABLE acalitem TO xtrole;


--
-- TOC entry 9478 (class 0 OID 0)
-- Dependencies: 421
-- Name: accnt_accnt_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE accnt_accnt_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE accnt_accnt_id_seq FROM admin;
GRANT ALL ON SEQUENCE accnt_accnt_id_seq TO admin;
GRANT ALL ON SEQUENCE accnt_accnt_id_seq TO xtrole;


--
-- TOC entry 9480 (class 0 OID 0)
-- Dependencies: 422
-- Name: addr_addr_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE addr_addr_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE addr_addr_id_seq FROM admin;
GRANT ALL ON SEQUENCE addr_addr_id_seq TO admin;
GRANT ALL ON SEQUENCE addr_addr_id_seq TO xtrole;


--
-- TOC entry 9481 (class 0 OID 0)
-- Dependencies: 423
-- Name: address; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE address FROM PUBLIC;
REVOKE ALL ON TABLE address FROM admin;
GRANT ALL ON TABLE address TO admin;
GRANT ALL ON TABLE address TO xtrole;


--
-- TOC entry 9483 (class 0 OID 0)
-- Dependencies: 424
-- Name: alarm; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE alarm FROM PUBLIC;
REVOKE ALL ON TABLE alarm FROM admin;
GRANT ALL ON TABLE alarm TO admin;
GRANT ALL ON TABLE alarm TO xtrole;


--
-- TOC entry 9485 (class 0 OID 0)
-- Dependencies: 425
-- Name: alarm_alarm_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE alarm_alarm_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE alarm_alarm_id_seq FROM admin;
GRANT ALL ON SEQUENCE alarm_alarm_id_seq TO admin;
GRANT ALL ON SEQUENCE alarm_alarm_id_seq TO xtrole;


--
-- TOC entry 9487 (class 0 OID 0)
-- Dependencies: 426
-- Name: apaccnt; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE apaccnt FROM PUBLIC;
REVOKE ALL ON TABLE apaccnt FROM admin;
GRANT ALL ON TABLE apaccnt TO admin;
GRANT ALL ON TABLE apaccnt TO xtrole;


--
-- TOC entry 9489 (class 0 OID 0)
-- Dependencies: 427
-- Name: apaccnt_apaccnt_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE apaccnt_apaccnt_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE apaccnt_apaccnt_id_seq FROM admin;
GRANT ALL ON SEQUENCE apaccnt_apaccnt_id_seq TO admin;
GRANT ALL ON SEQUENCE apaccnt_apaccnt_id_seq TO xtrole;


--
-- TOC entry 9492 (class 0 OID 0)
-- Dependencies: 428
-- Name: apapply; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE apapply FROM PUBLIC;
REVOKE ALL ON TABLE apapply FROM admin;
GRANT ALL ON TABLE apapply TO admin;
GRANT ALL ON TABLE apapply TO xtrole;


--
-- TOC entry 9494 (class 0 OID 0)
-- Dependencies: 429
-- Name: apapply_apapply_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE apapply_apapply_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE apapply_apapply_id_seq FROM admin;
GRANT ALL ON SEQUENCE apapply_apapply_id_seq TO admin;
GRANT ALL ON SEQUENCE apapply_apapply_id_seq TO xtrole;


--
-- TOC entry 9496 (class 0 OID 0)
-- Dependencies: 430
-- Name: checkhead; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE checkhead FROM PUBLIC;
REVOKE ALL ON TABLE checkhead FROM admin;
GRANT ALL ON TABLE checkhead TO admin;
GRANT ALL ON TABLE checkhead TO xtrole;


--
-- TOC entry 9497 (class 0 OID 0)
-- Dependencies: 431
-- Name: apchk; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE apchk FROM PUBLIC;
REVOKE ALL ON TABLE apchk FROM admin;
GRANT ALL ON TABLE apchk TO admin;
GRANT ALL ON TABLE apchk TO xtrole;


--
-- TOC entry 9499 (class 0 OID 0)
-- Dependencies: 432
-- Name: checkitem; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE checkitem FROM PUBLIC;
REVOKE ALL ON TABLE checkitem FROM admin;
GRANT ALL ON TABLE checkitem TO admin;
GRANT ALL ON TABLE checkitem TO xtrole;


--
-- TOC entry 9500 (class 0 OID 0)
-- Dependencies: 433
-- Name: apchkitem; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE apchkitem FROM PUBLIC;
REVOKE ALL ON TABLE apchkitem FROM admin;
GRANT ALL ON TABLE apchkitem TO admin;
GRANT ALL ON TABLE apchkitem TO xtrole;


--
-- TOC entry 9502 (class 0 OID 0)
-- Dependencies: 434
-- Name: apcreditapply; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE apcreditapply FROM PUBLIC;
REVOKE ALL ON TABLE apcreditapply FROM admin;
GRANT ALL ON TABLE apcreditapply TO admin;
GRANT ALL ON TABLE apcreditapply TO xtrole;


--
-- TOC entry 9504 (class 0 OID 0)
-- Dependencies: 435
-- Name: apcreditapply_apcreditapply_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE apcreditapply_apcreditapply_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE apcreditapply_apcreditapply_id_seq FROM admin;
GRANT ALL ON SEQUENCE apcreditapply_apcreditapply_id_seq TO admin;
GRANT ALL ON SEQUENCE apcreditapply_apcreditapply_id_seq TO xtrole;


--
-- TOC entry 9505 (class 0 OID 0)
-- Dependencies: 436
-- Name: apmemo; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE apmemo FROM PUBLIC;
REVOKE ALL ON TABLE apmemo FROM admin;
GRANT ALL ON TABLE apmemo TO admin;
GRANT ALL ON TABLE apmemo TO xtrole;


--
-- TOC entry 9506 (class 0 OID 0)
-- Dependencies: 437
-- Name: apopen_apopen_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE apopen_apopen_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE apopen_apopen_id_seq FROM admin;
GRANT ALL ON SEQUENCE apopen_apopen_id_seq TO admin;
GRANT ALL ON SEQUENCE apopen_apopen_id_seq TO xtrole;


--
-- TOC entry 9507 (class 0 OID 0)
-- Dependencies: 438
-- Name: apopentax; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE apopentax FROM PUBLIC;
REVOKE ALL ON TABLE apopentax FROM admin;
GRANT ALL ON TABLE apopentax TO admin;
GRANT ALL ON TABLE apopentax TO xtrole;


--
-- TOC entry 9509 (class 0 OID 0)
-- Dependencies: 439
-- Name: apselect; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE apselect FROM PUBLIC;
REVOKE ALL ON TABLE apselect FROM admin;
GRANT ALL ON TABLE apselect TO admin;
GRANT ALL ON TABLE apselect TO xtrole;


--
-- TOC entry 9511 (class 0 OID 0)
-- Dependencies: 440
-- Name: apselect_apselect_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE apselect_apselect_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE apselect_apselect_id_seq FROM admin;
GRANT ALL ON SEQUENCE apselect_apselect_id_seq TO admin;
GRANT ALL ON SEQUENCE apselect_apselect_id_seq TO xtrole;


--
-- TOC entry 9513 (class 0 OID 0)
-- Dependencies: 441
-- Name: araccnt; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE araccnt FROM PUBLIC;
REVOKE ALL ON TABLE araccnt FROM admin;
GRANT ALL ON TABLE araccnt TO admin;
GRANT ALL ON TABLE araccnt TO xtrole;


--
-- TOC entry 9514 (class 0 OID 0)
-- Dependencies: 442
-- Name: araccnt_araccnt_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE araccnt_araccnt_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE araccnt_araccnt_id_seq FROM admin;
GRANT ALL ON SEQUENCE araccnt_araccnt_id_seq TO admin;
GRANT ALL ON SEQUENCE araccnt_araccnt_id_seq TO xtrole;


--
-- TOC entry 9516 (class 0 OID 0)
-- Dependencies: 443
-- Name: arapply; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE arapply FROM PUBLIC;
REVOKE ALL ON TABLE arapply FROM admin;
GRANT ALL ON TABLE arapply TO admin;
GRANT ALL ON TABLE arapply TO xtrole;


--
-- TOC entry 9518 (class 0 OID 0)
-- Dependencies: 444
-- Name: arapply_arapply_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE arapply_arapply_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE arapply_arapply_id_seq FROM admin;
GRANT ALL ON SEQUENCE arapply_arapply_id_seq TO admin;
GRANT ALL ON SEQUENCE arapply_arapply_id_seq TO xtrole;


--
-- TOC entry 9520 (class 0 OID 0)
-- Dependencies: 445
-- Name: cashrcptitem_cashrcptitem_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE cashrcptitem_cashrcptitem_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE cashrcptitem_cashrcptitem_id_seq FROM admin;
GRANT ALL ON SEQUENCE cashrcptitem_cashrcptitem_id_seq TO admin;
GRANT ALL ON SEQUENCE cashrcptitem_cashrcptitem_id_seq TO xtrole;


--
-- TOC entry 9522 (class 0 OID 0)
-- Dependencies: 446
-- Name: arcreditapply; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE arcreditapply FROM PUBLIC;
REVOKE ALL ON TABLE arcreditapply FROM admin;
GRANT ALL ON TABLE arcreditapply TO admin;
GRANT ALL ON TABLE arcreditapply TO xtrole;


--
-- TOC entry 9524 (class 0 OID 0)
-- Dependencies: 447
-- Name: arcreditapply_arcreditapply_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE arcreditapply_arcreditapply_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE arcreditapply_arcreditapply_id_seq FROM admin;
GRANT ALL ON SEQUENCE arcreditapply_arcreditapply_id_seq TO admin;
GRANT ALL ON SEQUENCE arcreditapply_arcreditapply_id_seq TO xtrole;


--
-- TOC entry 9525 (class 0 OID 0)
-- Dependencies: 448
-- Name: armemo; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE armemo FROM PUBLIC;
REVOKE ALL ON TABLE armemo FROM admin;
GRANT ALL ON TABLE armemo TO admin;
GRANT ALL ON TABLE armemo TO xtrole;


--
-- TOC entry 9526 (class 0 OID 0)
-- Dependencies: 449
-- Name: aropen_aropen_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE aropen_aropen_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE aropen_aropen_id_seq FROM admin;
GRANT ALL ON SEQUENCE aropen_aropen_id_seq TO admin;
GRANT ALL ON SEQUENCE aropen_aropen_id_seq TO xtrole;


--
-- TOC entry 9527 (class 0 OID 0)
-- Dependencies: 450
-- Name: aropentax; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE aropentax FROM PUBLIC;
REVOKE ALL ON TABLE aropentax FROM admin;
GRANT ALL ON TABLE aropentax TO admin;
GRANT ALL ON TABLE aropentax TO xtrole;


--
-- TOC entry 9529 (class 0 OID 0)
-- Dependencies: 451
-- Name: asohist; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE asohist FROM PUBLIC;
REVOKE ALL ON TABLE asohist FROM admin;
GRANT ALL ON TABLE asohist TO admin;
GRANT ALL ON TABLE asohist TO xtrole;


--
-- TOC entry 9531 (class 0 OID 0)
-- Dependencies: 452
-- Name: asohist_asohist_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE asohist_asohist_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE asohist_asohist_id_seq FROM admin;
GRANT ALL ON SEQUENCE asohist_asohist_id_seq TO admin;
GRANT ALL ON SEQUENCE asohist_asohist_id_seq TO xtrole;


--
-- TOC entry 9532 (class 0 OID 0)
-- Dependencies: 453
-- Name: asohisttax; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE asohisttax FROM PUBLIC;
REVOKE ALL ON TABLE asohisttax FROM admin;
GRANT ALL ON TABLE asohisttax TO admin;
GRANT ALL ON TABLE asohisttax TO xtrole;


--
-- TOC entry 9541 (class 0 OID 0)
-- Dependencies: 454
-- Name: atlasmap; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE atlasmap FROM PUBLIC;
REVOKE ALL ON TABLE atlasmap FROM admin;
GRANT ALL ON TABLE atlasmap TO admin;
GRANT ALL ON TABLE atlasmap TO xtrole;


--
-- TOC entry 9543 (class 0 OID 0)
-- Dependencies: 455
-- Name: atlasmap_atlasmap_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE atlasmap_atlasmap_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE atlasmap_atlasmap_id_seq FROM admin;
GRANT ALL ON SEQUENCE atlasmap_atlasmap_id_seq TO admin;
GRANT ALL ON SEQUENCE atlasmap_atlasmap_id_seq TO xtrole;


--
-- TOC entry 9544 (class 0 OID 0)
-- Dependencies: 456
-- Name: backup_usr; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE backup_usr FROM PUBLIC;
REVOKE ALL ON TABLE backup_usr FROM admin;
GRANT ALL ON TABLE backup_usr TO admin;
GRANT ALL ON TABLE backup_usr TO xtrole;


--
-- TOC entry 9546 (class 0 OID 0)
-- Dependencies: 457
-- Name: bankaccnt_bankaccnt_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE bankaccnt_bankaccnt_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE bankaccnt_bankaccnt_id_seq FROM admin;
GRANT ALL ON SEQUENCE bankaccnt_bankaccnt_id_seq TO admin;
GRANT ALL ON SEQUENCE bankaccnt_bankaccnt_id_seq TO xtrole;


--
-- TOC entry 9548 (class 0 OID 0)
-- Dependencies: 458
-- Name: bankadj; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE bankadj FROM PUBLIC;
REVOKE ALL ON TABLE bankadj FROM admin;
GRANT ALL ON TABLE bankadj TO admin;
GRANT ALL ON TABLE bankadj TO xtrole;


--
-- TOC entry 9550 (class 0 OID 0)
-- Dependencies: 459
-- Name: bankadj_bankadj_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE bankadj_bankadj_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE bankadj_bankadj_id_seq FROM admin;
GRANT ALL ON SEQUENCE bankadj_bankadj_id_seq TO admin;
GRANT ALL ON SEQUENCE bankadj_bankadj_id_seq TO xtrole;


--
-- TOC entry 9552 (class 0 OID 0)
-- Dependencies: 460
-- Name: bankadjtype; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE bankadjtype FROM PUBLIC;
REVOKE ALL ON TABLE bankadjtype FROM admin;
GRANT ALL ON TABLE bankadjtype TO admin;
GRANT ALL ON TABLE bankadjtype TO xtrole;


--
-- TOC entry 9554 (class 0 OID 0)
-- Dependencies: 461
-- Name: bankadjtype_bankadjtype_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE bankadjtype_bankadjtype_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE bankadjtype_bankadjtype_id_seq FROM admin;
GRANT ALL ON SEQUENCE bankadjtype_bankadjtype_id_seq TO admin;
GRANT ALL ON SEQUENCE bankadjtype_bankadjtype_id_seq TO xtrole;


--
-- TOC entry 9556 (class 0 OID 0)
-- Dependencies: 462
-- Name: bankrec; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE bankrec FROM PUBLIC;
REVOKE ALL ON TABLE bankrec FROM admin;
GRANT ALL ON TABLE bankrec TO admin;
GRANT ALL ON TABLE bankrec TO xtrole;


--
-- TOC entry 9558 (class 0 OID 0)
-- Dependencies: 463
-- Name: bankrec_bankrec_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE bankrec_bankrec_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE bankrec_bankrec_id_seq FROM admin;
GRANT ALL ON SEQUENCE bankrec_bankrec_id_seq TO admin;
GRANT ALL ON SEQUENCE bankrec_bankrec_id_seq TO xtrole;


--
-- TOC entry 9560 (class 0 OID 0)
-- Dependencies: 464
-- Name: bankrecitem; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE bankrecitem FROM PUBLIC;
REVOKE ALL ON TABLE bankrecitem FROM admin;
GRANT ALL ON TABLE bankrecitem TO admin;
GRANT ALL ON TABLE bankrecitem TO xtrole;


--
-- TOC entry 9562 (class 0 OID 0)
-- Dependencies: 465
-- Name: bankrecitem_bankrecitem_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE bankrecitem_bankrecitem_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE bankrecitem_bankrecitem_id_seq FROM admin;
GRANT ALL ON SEQUENCE bankrecitem_bankrecitem_id_seq TO admin;
GRANT ALL ON SEQUENCE bankrecitem_bankrecitem_id_seq TO xtrole;


--
-- TOC entry 9563 (class 0 OID 0)
-- Dependencies: 466
-- Name: bomhead_bomhead_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE bomhead_bomhead_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE bomhead_bomhead_id_seq FROM admin;
GRANT ALL ON SEQUENCE bomhead_bomhead_id_seq TO admin;
GRANT ALL ON SEQUENCE bomhead_bomhead_id_seq TO xtrole;


--
-- TOC entry 9564 (class 0 OID 0)
-- Dependencies: 467
-- Name: bomitem_bomitem_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE bomitem_bomitem_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE bomitem_bomitem_id_seq FROM admin;
GRANT ALL ON SEQUENCE bomitem_bomitem_id_seq TO admin;
GRANT ALL ON SEQUENCE bomitem_bomitem_id_seq TO xtrole;


--
-- TOC entry 9566 (class 0 OID 0)
-- Dependencies: 468
-- Name: bomitemcost; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE bomitemcost FROM PUBLIC;
REVOKE ALL ON TABLE bomitemcost FROM admin;
GRANT ALL ON TABLE bomitemcost TO admin;
GRANT ALL ON TABLE bomitemcost TO xtrole;


--
-- TOC entry 9568 (class 0 OID 0)
-- Dependencies: 469
-- Name: bomitemcost_bomitemcost_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE bomitemcost_bomitemcost_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE bomitemcost_bomitemcost_id_seq FROM admin;
GRANT ALL ON SEQUENCE bomitemcost_bomitemcost_id_seq TO admin;
GRANT ALL ON SEQUENCE bomitemcost_bomitemcost_id_seq TO xtrole;


--
-- TOC entry 9570 (class 0 OID 0)
-- Dependencies: 470
-- Name: bomitemsub_bomitemsub_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE bomitemsub_bomitemsub_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE bomitemsub_bomitemsub_id_seq FROM admin;
GRANT ALL ON SEQUENCE bomitemsub_bomitemsub_id_seq TO admin;
GRANT ALL ON SEQUENCE bomitemsub_bomitemsub_id_seq TO xtrole;


--
-- TOC entry 9574 (class 0 OID 0)
-- Dependencies: 471
-- Name: bomwork; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE bomwork FROM PUBLIC;
REVOKE ALL ON TABLE bomwork FROM admin;
GRANT ALL ON TABLE bomwork TO admin;
GRANT ALL ON TABLE bomwork TO xtrole;


--
-- TOC entry 9576 (class 0 OID 0)
-- Dependencies: 472
-- Name: bomwork_bomwork_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE bomwork_bomwork_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE bomwork_bomwork_id_seq FROM admin;
GRANT ALL ON SEQUENCE bomwork_bomwork_id_seq TO admin;
GRANT ALL ON SEQUENCE bomwork_bomwork_id_seq TO xtrole;


--
-- TOC entry 9577 (class 0 OID 0)
-- Dependencies: 473
-- Name: budget; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE budget FROM PUBLIC;
REVOKE ALL ON TABLE budget FROM admin;
GRANT ALL ON TABLE budget TO admin;
GRANT ALL ON TABLE budget TO xtrole;


--
-- TOC entry 9579 (class 0 OID 0)
-- Dependencies: 474
-- Name: budghead_budghead_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE budghead_budghead_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE budghead_budghead_id_seq FROM admin;
GRANT ALL ON SEQUENCE budghead_budghead_id_seq TO admin;
GRANT ALL ON SEQUENCE budghead_budghead_id_seq TO xtrole;


--
-- TOC entry 9581 (class 0 OID 0)
-- Dependencies: 475
-- Name: budgitem_budgitem_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE budgitem_budgitem_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE budgitem_budgitem_id_seq FROM admin;
GRANT ALL ON SEQUENCE budgitem_budgitem_id_seq TO admin;
GRANT ALL ON SEQUENCE budgitem_budgitem_id_seq TO xtrole;


--
-- TOC entry 9583 (class 0 OID 0)
-- Dependencies: 476
-- Name: calhead; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE calhead FROM PUBLIC;
REVOKE ALL ON TABLE calhead FROM admin;
GRANT ALL ON TABLE calhead TO admin;
GRANT ALL ON TABLE calhead TO xtrole;


--
-- TOC entry 9584 (class 0 OID 0)
-- Dependencies: 477
-- Name: calhead_calhead_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE calhead_calhead_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE calhead_calhead_id_seq FROM admin;
GRANT ALL ON SEQUENCE calhead_calhead_id_seq TO admin;
GRANT ALL ON SEQUENCE calhead_calhead_id_seq TO xtrole;


--
-- TOC entry 9585 (class 0 OID 0)
-- Dependencies: 478
-- Name: carrier_carrier_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE carrier_carrier_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE carrier_carrier_id_seq FROM admin;
GRANT ALL ON SEQUENCE carrier_carrier_id_seq TO admin;
GRANT ALL ON SEQUENCE carrier_carrier_id_seq TO xtrole;


--
-- TOC entry 9587 (class 0 OID 0)
-- Dependencies: 479
-- Name: cashrcpt_cashrcpt_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE cashrcpt_cashrcpt_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE cashrcpt_cashrcpt_id_seq FROM admin;
GRANT ALL ON SEQUENCE cashrcpt_cashrcpt_id_seq TO admin;
GRANT ALL ON SEQUENCE cashrcpt_cashrcpt_id_seq TO xtrole;


--
-- TOC entry 9589 (class 0 OID 0)
-- Dependencies: 480
-- Name: cashrcptmisc_cashrcptmisc_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE cashrcptmisc_cashrcptmisc_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE cashrcptmisc_cashrcptmisc_id_seq FROM admin;
GRANT ALL ON SEQUENCE cashrcptmisc_cashrcptmisc_id_seq TO admin;
GRANT ALL ON SEQUENCE cashrcptmisc_cashrcptmisc_id_seq TO xtrole;


--
-- TOC entry 9591 (class 0 OID 0)
-- Dependencies: 481
-- Name: ccard_ccard_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE ccard_ccard_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE ccard_ccard_id_seq FROM admin;
GRANT ALL ON SEQUENCE ccard_ccard_id_seq TO admin;
GRANT ALL ON SEQUENCE ccard_ccard_id_seq TO xtrole;


--
-- TOC entry 9593 (class 0 OID 0)
-- Dependencies: 482
-- Name: ccardaud; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE ccardaud FROM PUBLIC;
REVOKE ALL ON TABLE ccardaud FROM admin;
GRANT ALL ON TABLE ccardaud TO admin;
GRANT ALL ON TABLE ccardaud TO xtrole;


--
-- TOC entry 9595 (class 0 OID 0)
-- Dependencies: 483
-- Name: ccardaud_ccardaud_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE ccardaud_ccardaud_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE ccardaud_ccardaud_id_seq FROM admin;
GRANT ALL ON SEQUENCE ccardaud_ccardaud_id_seq TO admin;
GRANT ALL ON SEQUENCE ccardaud_ccardaud_id_seq TO xtrole;


--
-- TOC entry 9596 (class 0 OID 0)
-- Dependencies: 484
-- Name: ccbank; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE ccbank FROM PUBLIC;
REVOKE ALL ON TABLE ccbank FROM admin;
GRANT ALL ON TABLE ccbank TO admin;
GRANT ALL ON TABLE ccbank TO xtrole;


--
-- TOC entry 9598 (class 0 OID 0)
-- Dependencies: 485
-- Name: ccbank_ccbank_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE ccbank_ccbank_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE ccbank_ccbank_id_seq FROM admin;
GRANT ALL ON SEQUENCE ccbank_ccbank_id_seq TO admin;
GRANT ALL ON SEQUENCE ccbank_ccbank_id_seq TO xtrole;


--
-- TOC entry 9626 (class 0 OID 0)
-- Dependencies: 486
-- Name: ccpay; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE ccpay FROM PUBLIC;
REVOKE ALL ON TABLE ccpay FROM admin;
GRANT ALL ON TABLE ccpay TO admin;
GRANT ALL ON TABLE ccpay TO xtrole;


--
-- TOC entry 9628 (class 0 OID 0)
-- Dependencies: 487
-- Name: ccpay_ccpay_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE ccpay_ccpay_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE ccpay_ccpay_id_seq FROM admin;
GRANT ALL ON SEQUENCE ccpay_ccpay_id_seq TO admin;
GRANT ALL ON SEQUENCE ccpay_ccpay_id_seq TO xtrole;


--
-- TOC entry 9630 (class 0 OID 0)
-- Dependencies: 488
-- Name: char_char_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE char_char_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE char_char_id_seq FROM admin;
GRANT ALL ON SEQUENCE char_char_id_seq TO admin;
GRANT ALL ON SEQUENCE char_char_id_seq TO xtrole;


--
-- TOC entry 9632 (class 0 OID 0)
-- Dependencies: 489
-- Name: charass_charass_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE charass_charass_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE charass_charass_id_seq FROM admin;
GRANT ALL ON SEQUENCE charass_charass_id_seq TO admin;
GRANT ALL ON SEQUENCE charass_charass_id_seq TO xtrole;


--
-- TOC entry 9638 (class 0 OID 0)
-- Dependencies: 490
-- Name: charopt; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE charopt FROM PUBLIC;
REVOKE ALL ON TABLE charopt FROM admin;
GRANT ALL ON TABLE charopt TO admin;
GRANT ALL ON TABLE charopt TO xtrole;


--
-- TOC entry 9640 (class 0 OID 0)
-- Dependencies: 491
-- Name: charopt_charopt_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE charopt_charopt_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE charopt_charopt_id_seq FROM admin;
GRANT ALL ON SEQUENCE charopt_charopt_id_seq TO admin;
GRANT ALL ON SEQUENCE charopt_charopt_id_seq TO xtrole;


--
-- TOC entry 9642 (class 0 OID 0)
-- Dependencies: 492
-- Name: checkhead_checkhead_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE checkhead_checkhead_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE checkhead_checkhead_id_seq FROM admin;
GRANT ALL ON SEQUENCE checkhead_checkhead_id_seq TO admin;
GRANT ALL ON SEQUENCE checkhead_checkhead_id_seq TO xtrole;


--
-- TOC entry 9644 (class 0 OID 0)
-- Dependencies: 493
-- Name: checkitem_checkitem_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE checkitem_checkitem_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE checkitem_checkitem_id_seq FROM admin;
GRANT ALL ON SEQUENCE checkitem_checkitem_id_seq TO admin;
GRANT ALL ON SEQUENCE checkitem_checkitem_id_seq TO xtrole;


--
-- TOC entry 9645 (class 0 OID 0)
-- Dependencies: 494
-- Name: checkrecip; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE checkrecip FROM PUBLIC;
REVOKE ALL ON TABLE checkrecip FROM admin;
GRANT ALL ON TABLE checkrecip TO admin;
GRANT ALL ON TABLE checkrecip TO xtrole;


--
-- TOC entry 9646 (class 0 OID 0)
-- Dependencies: 495
-- Name: classcode_classcode_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE classcode_classcode_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE classcode_classcode_id_seq FROM admin;
GRANT ALL ON SEQUENCE classcode_classcode_id_seq TO admin;
GRANT ALL ON SEQUENCE classcode_classcode_id_seq TO xtrole;


--
-- TOC entry 9647 (class 0 OID 0)
-- Dependencies: 496
-- Name: cmhead_cmhead_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE cmhead_cmhead_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE cmhead_cmhead_id_seq FROM admin;
GRANT ALL ON SEQUENCE cmhead_cmhead_id_seq TO admin;
GRANT ALL ON SEQUENCE cmhead_cmhead_id_seq TO xtrole;


--
-- TOC entry 9648 (class 0 OID 0)
-- Dependencies: 497
-- Name: cmheadtax; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE cmheadtax FROM PUBLIC;
REVOKE ALL ON TABLE cmheadtax FROM admin;
GRANT ALL ON TABLE cmheadtax TO admin;
GRANT ALL ON TABLE cmheadtax TO xtrole;


--
-- TOC entry 9649 (class 0 OID 0)
-- Dependencies: 498
-- Name: cmitem_cmitem_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE cmitem_cmitem_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE cmitem_cmitem_id_seq FROM admin;
GRANT ALL ON SEQUENCE cmitem_cmitem_id_seq TO admin;
GRANT ALL ON SEQUENCE cmitem_cmitem_id_seq TO xtrole;


--
-- TOC entry 9650 (class 0 OID 0)
-- Dependencies: 499
-- Name: cmitemtax; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE cmitemtax FROM PUBLIC;
REVOKE ALL ON TABLE cmitemtax FROM admin;
GRANT ALL ON TABLE cmitemtax TO admin;
GRANT ALL ON TABLE cmitemtax TO xtrole;


--
-- TOC entry 9652 (class 0 OID 0)
-- Dependencies: 500
-- Name: cmnttype_cmnttype_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE cmnttype_cmnttype_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE cmnttype_cmnttype_id_seq FROM admin;
GRANT ALL ON SEQUENCE cmnttype_cmnttype_id_seq TO admin;
GRANT ALL ON SEQUENCE cmnttype_cmnttype_id_seq TO xtrole;


--
-- TOC entry 9654 (class 0 OID 0)
-- Dependencies: 501
-- Name: cmnttypesource; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE cmnttypesource FROM PUBLIC;
REVOKE ALL ON TABLE cmnttypesource FROM admin;
GRANT ALL ON TABLE cmnttypesource TO admin;
GRANT ALL ON TABLE cmnttypesource TO xtrole;


--
-- TOC entry 9656 (class 0 OID 0)
-- Dependencies: 502
-- Name: cmnttypesource_cmnttypesource_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE cmnttypesource_cmnttypesource_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE cmnttypesource_cmnttypesource_id_seq FROM admin;
GRANT ALL ON SEQUENCE cmnttypesource_cmnttypesource_id_seq TO admin;
GRANT ALL ON SEQUENCE cmnttypesource_cmnttypesource_id_seq TO xtrole;


--
-- TOC entry 9658 (class 0 OID 0)
-- Dependencies: 503
-- Name: cntct_cntct_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE cntct_cntct_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE cntct_cntct_id_seq FROM admin;
GRANT ALL ON SEQUENCE cntct_cntct_id_seq TO admin;
GRANT ALL ON SEQUENCE cntct_cntct_id_seq TO xtrole;


--
-- TOC entry 9659 (class 0 OID 0)
-- Dependencies: 504
-- Name: cntctaddr; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE cntctaddr FROM PUBLIC;
REVOKE ALL ON TABLE cntctaddr FROM admin;
GRANT ALL ON TABLE cntctaddr TO admin;
GRANT ALL ON TABLE cntctaddr TO xtrole;


--
-- TOC entry 9661 (class 0 OID 0)
-- Dependencies: 505
-- Name: cntctaddr_cntctaddr_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE cntctaddr_cntctaddr_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE cntctaddr_cntctaddr_id_seq FROM admin;
GRANT ALL ON SEQUENCE cntctaddr_cntctaddr_id_seq TO admin;
GRANT ALL ON SEQUENCE cntctaddr_cntctaddr_id_seq TO xtrole;


--
-- TOC entry 9662 (class 0 OID 0)
-- Dependencies: 506
-- Name: cntctdata; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE cntctdata FROM PUBLIC;
REVOKE ALL ON TABLE cntctdata FROM admin;
GRANT ALL ON TABLE cntctdata TO admin;
GRANT ALL ON TABLE cntctdata TO xtrole;


--
-- TOC entry 9664 (class 0 OID 0)
-- Dependencies: 507
-- Name: cntctdata_cntctdata_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE cntctdata_cntctdata_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE cntctdata_cntctdata_id_seq FROM admin;
GRANT ALL ON SEQUENCE cntctdata_cntctdata_id_seq TO admin;
GRANT ALL ON SEQUENCE cntctdata_cntctdata_id_seq TO xtrole;


--
-- TOC entry 9670 (class 0 OID 0)
-- Dependencies: 508
-- Name: cntcteml; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE cntcteml FROM PUBLIC;
REVOKE ALL ON TABLE cntcteml FROM admin;
GRANT ALL ON TABLE cntcteml TO admin;
GRANT ALL ON TABLE cntcteml TO xtrole;


--
-- TOC entry 9672 (class 0 OID 0)
-- Dependencies: 509
-- Name: cntcteml_cntcteml_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE cntcteml_cntcteml_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE cntcteml_cntcteml_id_seq FROM admin;
GRANT ALL ON SEQUENCE cntcteml_cntcteml_id_seq TO admin;
GRANT ALL ON SEQUENCE cntcteml_cntcteml_id_seq TO xtrole;


--
-- TOC entry 9673 (class 0 OID 0)
-- Dependencies: 510
-- Name: cntctmrgd; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE cntctmrgd FROM PUBLIC;
REVOKE ALL ON TABLE cntctmrgd FROM admin;
GRANT ALL ON TABLE cntctmrgd TO admin;
GRANT ALL ON TABLE cntctmrgd TO xtrole;


--
-- TOC entry 9674 (class 0 OID 0)
-- Dependencies: 511
-- Name: cntctsel; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE cntctsel FROM PUBLIC;
REVOKE ALL ON TABLE cntctsel FROM admin;
GRANT ALL ON TABLE cntctsel TO admin;
GRANT ALL ON TABLE cntctsel TO xtrole;


--
-- TOC entry 9675 (class 0 OID 0)
-- Dependencies: 512
-- Name: cntslip_cntslip_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE cntslip_cntslip_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE cntslip_cntslip_id_seq FROM admin;
GRANT ALL ON SEQUENCE cntslip_cntslip_id_seq TO admin;
GRANT ALL ON SEQUENCE cntslip_cntslip_id_seq TO xtrole;


--
-- TOC entry 9677 (class 0 OID 0)
-- Dependencies: 513
-- Name: cobill; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE cobill FROM PUBLIC;
REVOKE ALL ON TABLE cobill FROM admin;
GRANT ALL ON TABLE cobill TO admin;
GRANT ALL ON TABLE cobill TO xtrole;


--
-- TOC entry 9678 (class 0 OID 0)
-- Dependencies: 514
-- Name: cobill_cobill_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE cobill_cobill_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE cobill_cobill_id_seq FROM admin;
GRANT ALL ON SEQUENCE cobill_cobill_id_seq TO admin;
GRANT ALL ON SEQUENCE cobill_cobill_id_seq TO xtrole;


--
-- TOC entry 9679 (class 0 OID 0)
-- Dependencies: 515
-- Name: cobilltax; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE cobilltax FROM PUBLIC;
REVOKE ALL ON TABLE cobilltax FROM admin;
GRANT ALL ON TABLE cobilltax TO admin;
GRANT ALL ON TABLE cobilltax TO xtrole;


--
-- TOC entry 9681 (class 0 OID 0)
-- Dependencies: 516
-- Name: cobmisc; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE cobmisc FROM PUBLIC;
REVOKE ALL ON TABLE cobmisc FROM admin;
GRANT ALL ON TABLE cobmisc TO admin;
GRANT ALL ON TABLE cobmisc TO xtrole;


--
-- TOC entry 9682 (class 0 OID 0)
-- Dependencies: 517
-- Name: cobmisc_cobmisc_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE cobmisc_cobmisc_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE cobmisc_cobmisc_id_seq FROM admin;
GRANT ALL ON SEQUENCE cobmisc_cobmisc_id_seq TO admin;
GRANT ALL ON SEQUENCE cobmisc_cobmisc_id_seq TO xtrole;


--
-- TOC entry 9683 (class 0 OID 0)
-- Dependencies: 518
-- Name: cobmisctax; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE cobmisctax FROM PUBLIC;
REVOKE ALL ON TABLE cobmisctax FROM admin;
GRANT ALL ON TABLE cobmisctax TO admin;
GRANT ALL ON TABLE cobmisctax TO xtrole;


--
-- TOC entry 9684 (class 0 OID 0)
-- Dependencies: 519
-- Name: cohead_cohead_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE cohead_cohead_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE cohead_cohead_id_seq FROM admin;
GRANT ALL ON SEQUENCE cohead_cohead_id_seq TO admin;
GRANT ALL ON SEQUENCE cohead_cohead_id_seq TO xtrole;


--
-- TOC entry 9685 (class 0 OID 0)
-- Dependencies: 520
-- Name: cohist_cohist_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE cohist_cohist_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE cohist_cohist_id_seq FROM admin;
GRANT ALL ON SEQUENCE cohist_cohist_id_seq TO admin;
GRANT ALL ON SEQUENCE cohist_cohist_id_seq TO xtrole;


--
-- TOC entry 9686 (class 0 OID 0)
-- Dependencies: 521
-- Name: coitem_coitem_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE coitem_coitem_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE coitem_coitem_id_seq FROM admin;
GRANT ALL ON SEQUENCE coitem_coitem_id_seq TO admin;
GRANT ALL ON SEQUENCE coitem_coitem_id_seq TO xtrole;


--
-- TOC entry 9687 (class 0 OID 0)
-- Dependencies: 522
-- Name: comment_comment_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE comment_comment_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE comment_comment_id_seq FROM admin;
GRANT ALL ON SEQUENCE comment_comment_id_seq TO admin;
GRANT ALL ON SEQUENCE comment_comment_id_seq TO xtrole;


--
-- TOC entry 9689 (class 0 OID 0)
-- Dependencies: 523
-- Name: company; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE company FROM PUBLIC;
REVOKE ALL ON TABLE company FROM admin;
GRANT ALL ON TABLE company TO admin;
GRANT ALL ON TABLE company TO xtrole;


--
-- TOC entry 9691 (class 0 OID 0)
-- Dependencies: 524
-- Name: company_company_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE company_company_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE company_company_id_seq FROM admin;
GRANT ALL ON SEQUENCE company_company_id_seq TO admin;
GRANT ALL ON SEQUENCE company_company_id_seq TO xtrole;


--
-- TOC entry 9693 (class 0 OID 0)
-- Dependencies: 525
-- Name: contrct_contrct_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE contrct_contrct_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE contrct_contrct_id_seq FROM admin;
GRANT ALL ON SEQUENCE contrct_contrct_id_seq TO admin;
GRANT ALL ON SEQUENCE contrct_contrct_id_seq TO xtrole;


--
-- TOC entry 9695 (class 0 OID 0)
-- Dependencies: 526
-- Name: shiphead; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE shiphead FROM PUBLIC;
REVOKE ALL ON TABLE shiphead FROM admin;
GRANT ALL ON TABLE shiphead TO admin;
GRANT ALL ON TABLE shiphead TO xtrole;


--
-- TOC entry 9697 (class 0 OID 0)
-- Dependencies: 527
-- Name: shipitem; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE shipitem FROM PUBLIC;
REVOKE ALL ON TABLE shipitem FROM admin;
GRANT ALL ON TABLE shipitem TO admin;
GRANT ALL ON TABLE shipitem TO xtrole;


--
-- TOC entry 9698 (class 0 OID 0)
-- Dependencies: 528
-- Name: coship; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE coship FROM PUBLIC;
REVOKE ALL ON TABLE coship FROM admin;
GRANT ALL ON TABLE coship TO admin;
GRANT ALL ON TABLE coship TO xtrole;


--
-- TOC entry 9699 (class 0 OID 0)
-- Dependencies: 529
-- Name: coship_coship_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE coship_coship_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE coship_coship_id_seq FROM admin;
GRANT ALL ON SEQUENCE coship_coship_id_seq TO admin;
GRANT ALL ON SEQUENCE coship_coship_id_seq TO xtrole;


--
-- TOC entry 9700 (class 0 OID 0)
-- Dependencies: 530
-- Name: cosmisc; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE cosmisc FROM PUBLIC;
REVOKE ALL ON TABLE cosmisc FROM admin;
GRANT ALL ON TABLE cosmisc TO admin;
GRANT ALL ON TABLE cosmisc TO xtrole;


--
-- TOC entry 9701 (class 0 OID 0)
-- Dependencies: 531
-- Name: cosmisc_cosmisc_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE cosmisc_cosmisc_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE cosmisc_cosmisc_id_seq FROM admin;
GRANT ALL ON SEQUENCE cosmisc_cosmisc_id_seq TO admin;
GRANT ALL ON SEQUENCE cosmisc_cosmisc_id_seq TO xtrole;


--
-- TOC entry 9702 (class 0 OID 0)
-- Dependencies: 532
-- Name: cosrc_cosrc_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE cosrc_cosrc_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE cosrc_cosrc_id_seq FROM admin;
GRANT ALL ON SEQUENCE cosrc_cosrc_id_seq TO admin;
GRANT ALL ON SEQUENCE cosrc_cosrc_id_seq TO xtrole;


--
-- TOC entry 9703 (class 0 OID 0)
-- Dependencies: 533
-- Name: costcat_costcat_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE costcat_costcat_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE costcat_costcat_id_seq FROM admin;
GRANT ALL ON SEQUENCE costcat_costcat_id_seq TO admin;
GRANT ALL ON SEQUENCE costcat_costcat_id_seq TO xtrole;


--
-- TOC entry 9704 (class 0 OID 0)
-- Dependencies: 534
-- Name: costelem_costelem_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE costelem_costelem_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE costelem_costelem_id_seq FROM admin;
GRANT ALL ON SEQUENCE costelem_costelem_id_seq TO admin;
GRANT ALL ON SEQUENCE costelem_costelem_id_seq TO xtrole;


--
-- TOC entry 9706 (class 0 OID 0)
-- Dependencies: 535
-- Name: costhist; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE costhist FROM PUBLIC;
REVOKE ALL ON TABLE costhist FROM admin;
GRANT ALL ON TABLE costhist TO admin;
GRANT ALL ON TABLE costhist TO xtrole;


--
-- TOC entry 9707 (class 0 OID 0)
-- Dependencies: 536
-- Name: costhist_costhist_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE costhist_costhist_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE costhist_costhist_id_seq FROM admin;
GRANT ALL ON SEQUENCE costhist_costhist_id_seq TO admin;
GRANT ALL ON SEQUENCE costhist_costhist_id_seq TO xtrole;


--
-- TOC entry 9709 (class 0 OID 0)
-- Dependencies: 537
-- Name: costupdate; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE costupdate FROM PUBLIC;
REVOKE ALL ON TABLE costupdate FROM admin;
GRANT ALL ON TABLE costupdate TO admin;
GRANT ALL ON TABLE costupdate TO xtrole;


--
-- TOC entry 9711 (class 0 OID 0)
-- Dependencies: 538
-- Name: country; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE country FROM PUBLIC;
REVOKE ALL ON TABLE country FROM admin;
GRANT ALL ON TABLE country TO admin;
GRANT ALL ON TABLE country TO xtrole;


--
-- TOC entry 9713 (class 0 OID 0)
-- Dependencies: 539
-- Name: country_country_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE country_country_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE country_country_id_seq FROM admin;
GRANT ALL ON SEQUENCE country_country_id_seq TO admin;
GRANT ALL ON SEQUENCE country_country_id_seq TO xtrole;


--
-- TOC entry 9717 (class 0 OID 0)
-- Dependencies: 540
-- Name: salesaccnt; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE salesaccnt FROM PUBLIC;
REVOKE ALL ON TABLE salesaccnt FROM admin;
GRANT ALL ON TABLE salesaccnt TO admin;
GRANT ALL ON TABLE salesaccnt TO xtrole;


--
-- TOC entry 9718 (class 0 OID 0)
-- Dependencies: 541
-- Name: creditmemoeditlist; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE creditmemoeditlist FROM PUBLIC;
REVOKE ALL ON TABLE creditmemoeditlist FROM admin;
GRANT ALL ON TABLE creditmemoeditlist TO admin;
GRANT ALL ON TABLE creditmemoeditlist TO xtrole;


--
-- TOC entry 9720 (class 0 OID 0)
-- Dependencies: 542
-- Name: creditmemoitem; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE creditmemoitem FROM PUBLIC;
REVOKE ALL ON TABLE creditmemoitem FROM admin;
GRANT ALL ON TABLE creditmemoitem TO admin;
GRANT ALL ON TABLE creditmemoitem TO xtrole;


--
-- TOC entry 9722 (class 0 OID 0)
-- Dependencies: 543
-- Name: crmacct_crmacct_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE crmacct_crmacct_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE crmacct_crmacct_id_seq FROM admin;
GRANT ALL ON SEQUENCE crmacct_crmacct_id_seq TO admin;
GRANT ALL ON SEQUENCE crmacct_crmacct_id_seq TO xtrole;


--
-- TOC entry 9726 (class 0 OID 0)
-- Dependencies: 544
-- Name: crmacctsel; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE crmacctsel FROM PUBLIC;
REVOKE ALL ON TABLE crmacctsel FROM admin;
GRANT ALL ON TABLE crmacctsel TO admin;
GRANT ALL ON TABLE crmacctsel TO xtrole;


--
-- TOC entry 9728 (class 0 OID 0)
-- Dependencies: 545
-- Name: curr_rate; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE curr_rate FROM PUBLIC;
REVOKE ALL ON TABLE curr_rate FROM admin;
GRANT ALL ON TABLE curr_rate TO admin;
GRANT ALL ON TABLE curr_rate TO xtrole;


--
-- TOC entry 9730 (class 0 OID 0)
-- Dependencies: 546
-- Name: curr_rate_curr_rate_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE curr_rate_curr_rate_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE curr_rate_curr_rate_id_seq FROM admin;
GRANT ALL ON SEQUENCE curr_rate_curr_rate_id_seq TO admin;
GRANT ALL ON SEQUENCE curr_rate_curr_rate_id_seq TO xtrole;


--
-- TOC entry 9732 (class 0 OID 0)
-- Dependencies: 547
-- Name: curr_symbol_curr_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE curr_symbol_curr_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE curr_symbol_curr_id_seq FROM admin;
GRANT ALL ON SEQUENCE curr_symbol_curr_id_seq TO admin;
GRANT ALL ON SEQUENCE curr_symbol_curr_id_seq TO xtrole;


--
-- TOC entry 9733 (class 0 OID 0)
-- Dependencies: 548
-- Name: cust; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE cust FROM PUBLIC;
REVOKE ALL ON TABLE cust FROM admin;
GRANT ALL ON TABLE cust TO admin;
GRANT ALL ON TABLE cust TO xtrole;


--
-- TOC entry 9734 (class 0 OID 0)
-- Dependencies: 549
-- Name: cust_serial_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE cust_serial_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE cust_serial_seq FROM admin;
GRANT ALL ON SEQUENCE cust_serial_seq TO admin;
GRANT ALL ON SEQUENCE cust_serial_seq TO xtrole;


--
-- TOC entry 9742 (class 0 OID 0)
-- Dependencies: 550
-- Name: custform; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE custform FROM PUBLIC;
REVOKE ALL ON TABLE custform FROM admin;
GRANT ALL ON TABLE custform TO admin;
GRANT ALL ON TABLE custform TO xtrole;


--
-- TOC entry 9743 (class 0 OID 0)
-- Dependencies: 551
-- Name: custform_custform_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE custform_custform_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE custform_custform_id_seq FROM admin;
GRANT ALL ON SEQUENCE custform_custform_id_seq TO admin;
GRANT ALL ON SEQUENCE custform_custform_id_seq TO xtrole;


--
-- TOC entry 9745 (class 0 OID 0)
-- Dependencies: 552
-- Name: custgrp; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE custgrp FROM PUBLIC;
REVOKE ALL ON TABLE custgrp FROM admin;
GRANT ALL ON TABLE custgrp TO admin;
GRANT ALL ON TABLE custgrp TO xtrole;


--
-- TOC entry 9746 (class 0 OID 0)
-- Dependencies: 553
-- Name: custgrp_custgrp_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE custgrp_custgrp_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE custgrp_custgrp_id_seq FROM admin;
GRANT ALL ON SEQUENCE custgrp_custgrp_id_seq TO admin;
GRANT ALL ON SEQUENCE custgrp_custgrp_id_seq TO xtrole;


--
-- TOC entry 9748 (class 0 OID 0)
-- Dependencies: 554
-- Name: custgrpitem; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE custgrpitem FROM PUBLIC;
REVOKE ALL ON TABLE custgrpitem FROM admin;
GRANT ALL ON TABLE custgrpitem TO admin;
GRANT ALL ON TABLE custgrpitem TO xtrole;


--
-- TOC entry 9749 (class 0 OID 0)
-- Dependencies: 555
-- Name: custgrpitem_custgrpitem_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE custgrpitem_custgrpitem_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE custgrpitem_custgrpitem_id_seq FROM admin;
GRANT ALL ON SEQUENCE custgrpitem_custgrpitem_id_seq TO admin;
GRANT ALL ON SEQUENCE custgrpitem_custgrpitem_id_seq TO xtrole;


--
-- TOC entry 9750 (class 0 OID 0)
-- Dependencies: 556
-- Name: custtype_custtype_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE custtype_custtype_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE custtype_custtype_id_seq FROM admin;
GRANT ALL ON SEQUENCE custtype_custtype_id_seq TO admin;
GRANT ALL ON SEQUENCE custtype_custtype_id_seq TO xtrole;


--
-- TOC entry 9752 (class 0 OID 0)
-- Dependencies: 557
-- Name: dept_dept_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE dept_dept_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE dept_dept_id_seq FROM admin;
GRANT ALL ON SEQUENCE dept_dept_id_seq TO admin;
GRANT ALL ON SEQUENCE dept_dept_id_seq TO xtrole;


--
-- TOC entry 9754 (class 0 OID 0)
-- Dependencies: 558
-- Name: destination; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE destination FROM PUBLIC;
REVOKE ALL ON TABLE destination FROM admin;
GRANT ALL ON TABLE destination TO admin;
GRANT ALL ON TABLE destination TO xtrole;


--
-- TOC entry 9755 (class 0 OID 0)
-- Dependencies: 559
-- Name: destination_destination_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE destination_destination_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE destination_destination_id_seq FROM admin;
GRANT ALL ON SEQUENCE destination_destination_id_seq TO admin;
GRANT ALL ON SEQUENCE destination_destination_id_seq TO xtrole;


--
-- TOC entry 9757 (class 0 OID 0)
-- Dependencies: 560
-- Name: wo; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE wo FROM PUBLIC;
REVOKE ALL ON TABLE wo FROM admin;
GRANT ALL ON TABLE wo TO admin;
GRANT ALL ON TABLE wo TO xtrole;


--
-- TOC entry 9758 (class 0 OID 0)
-- Dependencies: 561
-- Name: docinfo; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE docinfo FROM PUBLIC;
REVOKE ALL ON TABLE docinfo FROM admin;
GRANT ALL ON TABLE docinfo TO admin;
GRANT ALL ON TABLE docinfo TO xtrole;


--
-- TOC entry 9760 (class 0 OID 0)
-- Dependencies: 562
-- Name: emp_emp_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE emp_emp_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE emp_emp_id_seq FROM admin;
GRANT ALL ON SEQUENCE emp_emp_id_seq TO admin;
GRANT ALL ON SEQUENCE emp_emp_id_seq TO xtrole;


--
-- TOC entry 9761 (class 0 OID 0)
-- Dependencies: 563
-- Name: empgrp; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE empgrp FROM PUBLIC;
REVOKE ALL ON TABLE empgrp FROM admin;
GRANT ALL ON TABLE empgrp TO admin;
GRANT ALL ON TABLE empgrp TO xtrole;


--
-- TOC entry 9763 (class 0 OID 0)
-- Dependencies: 564
-- Name: empgrp_empgrp_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE empgrp_empgrp_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE empgrp_empgrp_id_seq FROM admin;
GRANT ALL ON SEQUENCE empgrp_empgrp_id_seq TO admin;
GRANT ALL ON SEQUENCE empgrp_empgrp_id_seq TO xtrole;


--
-- TOC entry 9764 (class 0 OID 0)
-- Dependencies: 565
-- Name: empgrpitem; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE empgrpitem FROM PUBLIC;
REVOKE ALL ON TABLE empgrpitem FROM admin;
GRANT ALL ON TABLE empgrpitem TO admin;
GRANT ALL ON TABLE empgrpitem TO xtrole;


--
-- TOC entry 9766 (class 0 OID 0)
-- Dependencies: 566
-- Name: empgrpitem_empgrpitem_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE empgrpitem_empgrpitem_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE empgrpitem_empgrpitem_id_seq FROM admin;
GRANT ALL ON SEQUENCE empgrpitem_empgrpitem_id_seq TO admin;
GRANT ALL ON SEQUENCE empgrpitem_empgrpitem_id_seq TO xtrole;


--
-- TOC entry 9768 (class 0 OID 0)
-- Dependencies: 567
-- Name: evntlog; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE evntlog FROM PUBLIC;
REVOKE ALL ON TABLE evntlog FROM admin;
GRANT ALL ON TABLE evntlog TO admin;
GRANT ALL ON TABLE evntlog TO xtrole;


--
-- TOC entry 9769 (class 0 OID 0)
-- Dependencies: 568
-- Name: evntlog_evntlog_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE evntlog_evntlog_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE evntlog_evntlog_id_seq FROM admin;
GRANT ALL ON SEQUENCE evntlog_evntlog_id_seq TO admin;
GRANT ALL ON SEQUENCE evntlog_evntlog_id_seq TO xtrole;


--
-- TOC entry 9771 (class 0 OID 0)
-- Dependencies: 569
-- Name: evntnot; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE evntnot FROM PUBLIC;
REVOKE ALL ON TABLE evntnot FROM admin;
GRANT ALL ON TABLE evntnot TO admin;
GRANT ALL ON TABLE evntnot TO xtrole;


--
-- TOC entry 9772 (class 0 OID 0)
-- Dependencies: 570
-- Name: evntnot_evntnot_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE evntnot_evntnot_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE evntnot_evntnot_id_seq FROM admin;
GRANT ALL ON SEQUENCE evntnot_evntnot_id_seq TO admin;
GRANT ALL ON SEQUENCE evntnot_evntnot_id_seq TO xtrole;


--
-- TOC entry 9774 (class 0 OID 0)
-- Dependencies: 571
-- Name: evnttype; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE evnttype FROM PUBLIC;
REVOKE ALL ON TABLE evnttype FROM admin;
GRANT ALL ON TABLE evnttype TO admin;
GRANT ALL ON TABLE evnttype TO xtrole;


--
-- TOC entry 9775 (class 0 OID 0)
-- Dependencies: 572
-- Name: evnttype_evnttype_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE evnttype_evnttype_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE evnttype_evnttype_id_seq FROM admin;
GRANT ALL ON SEQUENCE evnttype_evnttype_id_seq TO admin;
GRANT ALL ON SEQUENCE evnttype_evnttype_id_seq TO xtrole;


--
-- TOC entry 9777 (class 0 OID 0)
-- Dependencies: 573
-- Name: expcat_expcat_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE expcat_expcat_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE expcat_expcat_id_seq FROM admin;
GRANT ALL ON SEQUENCE expcat_expcat_id_seq TO admin;
GRANT ALL ON SEQUENCE expcat_expcat_id_seq TO xtrole;


--
-- TOC entry 9779 (class 0 OID 0)
-- Dependencies: 574
-- Name: file_file_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE file_file_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE file_file_id_seq FROM admin;
GRANT ALL ON SEQUENCE file_file_id_seq TO admin;
GRANT ALL ON SEQUENCE file_file_id_seq TO xtrole;


--
-- TOC entry 9780 (class 0 OID 0)
-- Dependencies: 575
-- Name: filter; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE filter FROM PUBLIC;
REVOKE ALL ON TABLE filter FROM admin;
GRANT ALL ON TABLE filter TO admin;
GRANT ALL ON TABLE filter TO xtrole;


--
-- TOC entry 9782 (class 0 OID 0)
-- Dependencies: 576
-- Name: filter_filter_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE filter_filter_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE filter_filter_id_seq FROM admin;
GRANT ALL ON SEQUENCE filter_filter_id_seq TO admin;
GRANT ALL ON SEQUENCE filter_filter_id_seq TO xtrole;


--
-- TOC entry 9784 (class 0 OID 0)
-- Dependencies: 577
-- Name: fincharg; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE fincharg FROM PUBLIC;
REVOKE ALL ON TABLE fincharg FROM admin;
GRANT ALL ON TABLE fincharg TO admin;
GRANT ALL ON TABLE fincharg TO xtrole;


--
-- TOC entry 9786 (class 0 OID 0)
-- Dependencies: 578
-- Name: fincharg_fincharg_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE fincharg_fincharg_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE fincharg_fincharg_id_seq FROM admin;
GRANT ALL ON SEQUENCE fincharg_fincharg_id_seq TO admin;
GRANT ALL ON SEQUENCE fincharg_fincharg_id_seq TO xtrole;


--
-- TOC entry 9788 (class 0 OID 0)
-- Dependencies: 579
-- Name: flhead; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE flhead FROM PUBLIC;
REVOKE ALL ON TABLE flhead FROM admin;
GRANT ALL ON TABLE flhead TO admin;
GRANT ALL ON TABLE flhead TO xtrole;


--
-- TOC entry 9790 (class 0 OID 0)
-- Dependencies: 580
-- Name: flitem; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE flitem FROM PUBLIC;
REVOKE ALL ON TABLE flitem FROM admin;
GRANT ALL ON TABLE flitem TO admin;
GRANT ALL ON TABLE flitem TO xtrole;


--
-- TOC entry 9791 (class 0 OID 0)
-- Dependencies: 581
-- Name: flaccnt; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE flaccnt FROM PUBLIC;
REVOKE ALL ON TABLE flaccnt FROM admin;
GRANT ALL ON TABLE flaccnt TO admin;
GRANT ALL ON TABLE flaccnt TO xtrole;


--
-- TOC entry 9792 (class 0 OID 0)
-- Dependencies: 582
-- Name: flcol; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE flcol FROM PUBLIC;
REVOKE ALL ON TABLE flcol FROM admin;
GRANT ALL ON TABLE flcol TO admin;
GRANT ALL ON TABLE flcol TO xtrole;


--
-- TOC entry 9794 (class 0 OID 0)
-- Dependencies: 583
-- Name: flcol_flcol_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE flcol_flcol_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE flcol_flcol_id_seq FROM admin;
GRANT ALL ON SEQUENCE flcol_flcol_id_seq TO admin;
GRANT ALL ON SEQUENCE flcol_flcol_id_seq TO xtrole;


--
-- TOC entry 9796 (class 0 OID 0)
-- Dependencies: 584
-- Name: flgrp; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE flgrp FROM PUBLIC;
REVOKE ALL ON TABLE flgrp FROM admin;
GRANT ALL ON TABLE flgrp TO admin;
GRANT ALL ON TABLE flgrp TO xtrole;


--
-- TOC entry 9798 (class 0 OID 0)
-- Dependencies: 585
-- Name: flgrp_flgrp_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE flgrp_flgrp_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE flgrp_flgrp_id_seq FROM admin;
GRANT ALL ON SEQUENCE flgrp_flgrp_id_seq TO admin;
GRANT ALL ON SEQUENCE flgrp_flgrp_id_seq TO xtrole;


--
-- TOC entry 9800 (class 0 OID 0)
-- Dependencies: 586
-- Name: flhead_flhead_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE flhead_flhead_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE flhead_flhead_id_seq FROM admin;
GRANT ALL ON SEQUENCE flhead_flhead_id_seq TO admin;
GRANT ALL ON SEQUENCE flhead_flhead_id_seq TO xtrole;


--
-- TOC entry 9802 (class 0 OID 0)
-- Dependencies: 587
-- Name: flitem_flitem_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE flitem_flitem_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE flitem_flitem_id_seq FROM admin;
GRANT ALL ON SEQUENCE flitem_flitem_id_seq TO admin;
GRANT ALL ON SEQUENCE flitem_flitem_id_seq TO xtrole;


--
-- TOC entry 9803 (class 0 OID 0)
-- Dependencies: 588
-- Name: flnotes; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE flnotes FROM PUBLIC;
REVOKE ALL ON TABLE flnotes FROM admin;
GRANT ALL ON TABLE flnotes TO admin;
GRANT ALL ON TABLE flnotes TO xtrole;


--
-- TOC entry 9805 (class 0 OID 0)
-- Dependencies: 589
-- Name: flnotes_flnotes_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE flnotes_flnotes_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE flnotes_flnotes_id_seq FROM admin;
GRANT ALL ON SEQUENCE flnotes_flnotes_id_seq TO admin;
GRANT ALL ON SEQUENCE flnotes_flnotes_id_seq TO xtrole;


--
-- TOC entry 9807 (class 0 OID 0)
-- Dependencies: 590
-- Name: flrpt; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE flrpt FROM PUBLIC;
REVOKE ALL ON TABLE flrpt FROM admin;
GRANT ALL ON TABLE flrpt TO admin;
GRANT ALL ON TABLE flrpt TO xtrole;


--
-- TOC entry 9809 (class 0 OID 0)
-- Dependencies: 591
-- Name: flrpt_flrpt_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE flrpt_flrpt_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE flrpt_flrpt_id_seq FROM admin;
GRANT ALL ON SEQUENCE flrpt_flrpt_id_seq TO admin;
GRANT ALL ON SEQUENCE flrpt_flrpt_id_seq TO xtrole;


--
-- TOC entry 9811 (class 0 OID 0)
-- Dependencies: 592
-- Name: flspec; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE flspec FROM PUBLIC;
REVOKE ALL ON TABLE flspec FROM admin;
GRANT ALL ON TABLE flspec TO admin;
GRANT ALL ON TABLE flspec TO xtrole;


--
-- TOC entry 9813 (class 0 OID 0)
-- Dependencies: 593
-- Name: flspec_flspec_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE flspec_flspec_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE flspec_flspec_id_seq FROM admin;
GRANT ALL ON SEQUENCE flspec_flspec_id_seq TO admin;
GRANT ALL ON SEQUENCE flspec_flspec_id_seq TO xtrole;


--
-- TOC entry 9816 (class 0 OID 0)
-- Dependencies: 594
-- Name: form; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE form FROM PUBLIC;
REVOKE ALL ON TABLE form FROM admin;
GRANT ALL ON TABLE form TO admin;
GRANT ALL ON TABLE form TO xtrole;


--
-- TOC entry 9817 (class 0 OID 0)
-- Dependencies: 595
-- Name: form_form_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE form_form_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE form_form_id_seq FROM admin;
GRANT ALL ON SEQUENCE form_form_id_seq TO admin;
GRANT ALL ON SEQUENCE form_form_id_seq TO xtrole;


--
-- TOC entry 9819 (class 0 OID 0)
-- Dependencies: 596
-- Name: freightclass_freightclass_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE freightclass_freightclass_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE freightclass_freightclass_id_seq FROM admin;
GRANT ALL ON SEQUENCE freightclass_freightclass_id_seq TO admin;
GRANT ALL ON SEQUENCE freightclass_freightclass_id_seq TO xtrole;


--
-- TOC entry 9821 (class 0 OID 0)
-- Dependencies: 597
-- Name: glseries; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE glseries FROM PUBLIC;
REVOKE ALL ON TABLE glseries FROM admin;
GRANT ALL ON TABLE glseries TO admin;
GRANT ALL ON TABLE glseries TO xtrole;


--
-- TOC entry 9822 (class 0 OID 0)
-- Dependencies: 598
-- Name: glseries_glseries_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE glseries_glseries_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE glseries_glseries_id_seq FROM admin;
GRANT ALL ON SEQUENCE glseries_glseries_id_seq TO admin;
GRANT ALL ON SEQUENCE glseries_glseries_id_seq TO xtrole;


--
-- TOC entry 9823 (class 0 OID 0)
-- Dependencies: 599
-- Name: gltrans_gltrans_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE gltrans_gltrans_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE gltrans_gltrans_id_seq FROM admin;
GRANT ALL ON SEQUENCE gltrans_gltrans_id_seq TO admin;
GRANT ALL ON SEQUENCE gltrans_gltrans_id_seq TO xtrole;


--
-- TOC entry 9824 (class 0 OID 0)
-- Dependencies: 600
-- Name: gltrans_sequence_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE gltrans_sequence_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE gltrans_sequence_seq FROM admin;
GRANT ALL ON SEQUENCE gltrans_sequence_seq TO admin;
GRANT ALL ON SEQUENCE gltrans_sequence_seq TO xtrole;


--
-- TOC entry 9826 (class 0 OID 0)
-- Dependencies: 601
-- Name: grp; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE grp FROM PUBLIC;
REVOKE ALL ON TABLE grp FROM admin;
GRANT ALL ON TABLE grp TO admin;
GRANT ALL ON TABLE grp TO xtrole;


--
-- TOC entry 9828 (class 0 OID 0)
-- Dependencies: 602
-- Name: grp_grp_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE grp_grp_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE grp_grp_id_seq FROM admin;
GRANT ALL ON SEQUENCE grp_grp_id_seq TO admin;
GRANT ALL ON SEQUENCE grp_grp_id_seq TO xtrole;


--
-- TOC entry 9830 (class 0 OID 0)
-- Dependencies: 603
-- Name: grppriv; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE grppriv FROM PUBLIC;
REVOKE ALL ON TABLE grppriv FROM admin;
GRANT ALL ON TABLE grppriv TO admin;
GRANT ALL ON TABLE grppriv TO xtrole;


--
-- TOC entry 9832 (class 0 OID 0)
-- Dependencies: 604
-- Name: grppriv_grppriv_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE grppriv_grppriv_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE grppriv_grppriv_id_seq FROM admin;
GRANT ALL ON SEQUENCE grppriv_grppriv_id_seq TO admin;
GRANT ALL ON SEQUENCE grppriv_grppriv_id_seq TO xtrole;


--
-- TOC entry 9834 (class 0 OID 0)
-- Dependencies: 605
-- Name: hnfc; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE hnfc FROM PUBLIC;
REVOKE ALL ON TABLE hnfc FROM admin;
GRANT ALL ON TABLE hnfc TO admin;
GRANT ALL ON TABLE hnfc TO xtrole;


--
-- TOC entry 9836 (class 0 OID 0)
-- Dependencies: 606
-- Name: hnfc_hnfc_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE hnfc_hnfc_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE hnfc_hnfc_id_seq FROM admin;
GRANT ALL ON SEQUENCE hnfc_hnfc_id_seq TO admin;
GRANT ALL ON SEQUENCE hnfc_hnfc_id_seq TO xtrole;


--
-- TOC entry 9838 (class 0 OID 0)
-- Dependencies: 607
-- Name: incdt_incdt_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE incdt_incdt_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE incdt_incdt_id_seq FROM admin;
GRANT ALL ON SEQUENCE incdt_incdt_id_seq TO admin;
GRANT ALL ON SEQUENCE incdt_incdt_id_seq TO xtrole;


--
-- TOC entry 9840 (class 0 OID 0)
-- Dependencies: 608
-- Name: incdtcat_incdtcat_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE incdtcat_incdtcat_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE incdtcat_incdtcat_id_seq FROM admin;
GRANT ALL ON SEQUENCE incdtcat_incdtcat_id_seq TO admin;
GRANT ALL ON SEQUENCE incdtcat_incdtcat_id_seq TO xtrole;


--
-- TOC entry 9842 (class 0 OID 0)
-- Dependencies: 609
-- Name: incdthist; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE incdthist FROM PUBLIC;
REVOKE ALL ON TABLE incdthist FROM admin;
GRANT ALL ON TABLE incdthist TO admin;
GRANT ALL ON TABLE incdthist TO xtrole;


--
-- TOC entry 9844 (class 0 OID 0)
-- Dependencies: 610
-- Name: incdthist_incdthist_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE incdthist_incdthist_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE incdthist_incdthist_id_seq FROM admin;
GRANT ALL ON SEQUENCE incdthist_incdthist_id_seq TO admin;
GRANT ALL ON SEQUENCE incdthist_incdthist_id_seq TO xtrole;


--
-- TOC entry 9846 (class 0 OID 0)
-- Dependencies: 611
-- Name: incdtpriority_incdtpriority_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE incdtpriority_incdtpriority_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE incdtpriority_incdtpriority_id_seq FROM admin;
GRANT ALL ON SEQUENCE incdtpriority_incdtpriority_id_seq TO admin;
GRANT ALL ON SEQUENCE incdtpriority_incdtpriority_id_seq TO xtrole;


--
-- TOC entry 9848 (class 0 OID 0)
-- Dependencies: 612
-- Name: incdtresolution_incdtresolution_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE incdtresolution_incdtresolution_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE incdtresolution_incdtresolution_id_seq FROM admin;
GRANT ALL ON SEQUENCE incdtresolution_incdtresolution_id_seq TO admin;
GRANT ALL ON SEQUENCE incdtresolution_incdtresolution_id_seq TO xtrole;


--
-- TOC entry 9850 (class 0 OID 0)
-- Dependencies: 613
-- Name: incdtseverity_incdtseverity_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE incdtseverity_incdtseverity_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE incdtseverity_incdtseverity_id_seq FROM admin;
GRANT ALL ON SEQUENCE incdtseverity_incdtseverity_id_seq TO admin;
GRANT ALL ON SEQUENCE incdtseverity_incdtseverity_id_seq TO xtrole;


--
-- TOC entry 9852 (class 0 OID 0)
-- Dependencies: 614
-- Name: invbal_invbal_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE invbal_invbal_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE invbal_invbal_id_seq FROM admin;
GRANT ALL ON SEQUENCE invbal_invbal_id_seq TO admin;
GRANT ALL ON SEQUENCE invbal_invbal_id_seq TO xtrole;


--
-- TOC entry 9853 (class 0 OID 0)
-- Dependencies: 615
-- Name: invc_invc_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE invc_invc_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE invc_invc_id_seq FROM admin;
GRANT ALL ON SEQUENCE invc_invc_id_seq TO admin;
GRANT ALL ON SEQUENCE invc_invc_id_seq TO xtrole;


--
-- TOC entry 9855 (class 0 OID 0)
-- Dependencies: 616
-- Name: invchead_invchead_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE invchead_invchead_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE invchead_invchead_id_seq FROM admin;
GRANT ALL ON SEQUENCE invchead_invchead_id_seq TO admin;
GRANT ALL ON SEQUENCE invchead_invchead_id_seq TO xtrole;


--
-- TOC entry 9856 (class 0 OID 0)
-- Dependencies: 617
-- Name: invcheadtax; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE invcheadtax FROM PUBLIC;
REVOKE ALL ON TABLE invcheadtax FROM admin;
GRANT ALL ON TABLE invcheadtax TO admin;
GRANT ALL ON TABLE invcheadtax TO xtrole;


--
-- TOC entry 9858 (class 0 OID 0)
-- Dependencies: 618
-- Name: invcitem_invcitem_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE invcitem_invcitem_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE invcitem_invcitem_id_seq FROM admin;
GRANT ALL ON SEQUENCE invcitem_invcitem_id_seq TO admin;
GRANT ALL ON SEQUENCE invcitem_invcitem_id_seq TO xtrole;


--
-- TOC entry 9859 (class 0 OID 0)
-- Dependencies: 619
-- Name: invcitemtax; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE invcitemtax FROM PUBLIC;
REVOKE ALL ON TABLE invcitemtax FROM admin;
GRANT ALL ON TABLE invcitemtax TO admin;
GRANT ALL ON TABLE invcitemtax TO xtrole;


--
-- TOC entry 9860 (class 0 OID 0)
-- Dependencies: 620
-- Name: invcnt_invcnt_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE invcnt_invcnt_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE invcnt_invcnt_id_seq FROM admin;
GRANT ALL ON SEQUENCE invcnt_invcnt_id_seq TO admin;
GRANT ALL ON SEQUENCE invcnt_invcnt_id_seq TO xtrole;


--
-- TOC entry 9862 (class 0 OID 0)
-- Dependencies: 621
-- Name: invdetail; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE invdetail FROM PUBLIC;
REVOKE ALL ON TABLE invdetail FROM admin;
GRANT ALL ON TABLE invdetail TO admin;
GRANT ALL ON TABLE invdetail TO xtrole;


--
-- TOC entry 9863 (class 0 OID 0)
-- Dependencies: 622
-- Name: invdetail_invdetail_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE invdetail_invdetail_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE invdetail_invdetail_id_seq FROM admin;
GRANT ALL ON SEQUENCE invdetail_invdetail_id_seq TO admin;
GRANT ALL ON SEQUENCE invdetail_invdetail_id_seq TO xtrole;


--
-- TOC entry 9865 (class 0 OID 0)
-- Dependencies: 623
-- Name: invhist; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE invhist FROM PUBLIC;
REVOKE ALL ON TABLE invhist FROM admin;
GRANT ALL ON TABLE invhist TO admin;
GRANT ALL ON TABLE invhist TO xtrole;


--
-- TOC entry 9866 (class 0 OID 0)
-- Dependencies: 624
-- Name: invhist_invhist_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE invhist_invhist_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE invhist_invhist_id_seq FROM admin;
GRANT ALL ON SEQUENCE invhist_invhist_id_seq TO admin;
GRANT ALL ON SEQUENCE invhist_invhist_id_seq TO xtrole;


--
-- TOC entry 9868 (class 0 OID 0)
-- Dependencies: 625
-- Name: invhistexpcat; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE invhistexpcat FROM PUBLIC;
REVOKE ALL ON TABLE invhistexpcat FROM admin;
GRANT ALL ON TABLE invhistexpcat TO admin;
GRANT ALL ON TABLE invhistexpcat TO xtrole;


--
-- TOC entry 9870 (class 0 OID 0)
-- Dependencies: 626
-- Name: invhistexpcat_invhistexpcat_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE invhistexpcat_invhistexpcat_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE invhistexpcat_invhistexpcat_id_seq FROM admin;
GRANT ALL ON SEQUENCE invhistexpcat_invhistexpcat_id_seq TO admin;
GRANT ALL ON SEQUENCE invhistexpcat_invhistexpcat_id_seq TO xtrole;


--
-- TOC entry 9872 (class 0 OID 0)
-- Dependencies: 627
-- Name: invoiceitem; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE invoiceitem FROM PUBLIC;
REVOKE ALL ON TABLE invoiceitem FROM admin;
GRANT ALL ON TABLE invoiceitem TO admin;
GRANT ALL ON TABLE invoiceitem TO xtrole;


--
-- TOC entry 9874 (class 0 OID 0)
-- Dependencies: 628
-- Name: ipsass_ipsass_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE ipsass_ipsass_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE ipsass_ipsass_id_seq FROM admin;
GRANT ALL ON SEQUENCE ipsass_ipsass_id_seq TO admin;
GRANT ALL ON SEQUENCE ipsass_ipsass_id_seq TO xtrole;


--
-- TOC entry 9875 (class 0 OID 0)
-- Dependencies: 629
-- Name: ipsctyp_ipsctyp_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE ipsctyp_ipsctyp_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE ipsctyp_ipsctyp_id_seq FROM admin;
GRANT ALL ON SEQUENCE ipsctyp_ipsctyp_id_seq TO admin;
GRANT ALL ON SEQUENCE ipsctyp_ipsctyp_id_seq TO xtrole;


--
-- TOC entry 9876 (class 0 OID 0)
-- Dependencies: 630
-- Name: ipscust_ipscust_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE ipscust_ipscust_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE ipscust_ipscust_id_seq FROM admin;
GRANT ALL ON SEQUENCE ipscust_ipscust_id_seq TO admin;
GRANT ALL ON SEQUENCE ipscust_ipscust_id_seq TO xtrole;


--
-- TOC entry 9878 (class 0 OID 0)
-- Dependencies: 631
-- Name: ipsfreight_ipsfreight_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE ipsfreight_ipsfreight_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE ipsfreight_ipsfreight_id_seq FROM admin;
GRANT ALL ON SEQUENCE ipsfreight_ipsfreight_id_seq TO admin;
GRANT ALL ON SEQUENCE ipsfreight_ipsfreight_id_seq TO xtrole;


--
-- TOC entry 9879 (class 0 OID 0)
-- Dependencies: 632
-- Name: ipshead_ipshead_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE ipshead_ipshead_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE ipshead_ipshead_id_seq FROM admin;
GRANT ALL ON SEQUENCE ipshead_ipshead_id_seq TO admin;
GRANT ALL ON SEQUENCE ipshead_ipshead_id_seq TO xtrole;


--
-- TOC entry 9880 (class 0 OID 0)
-- Dependencies: 633
-- Name: ipsitem_ipsitem_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE ipsitem_ipsitem_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE ipsitem_ipsitem_id_seq FROM admin;
GRANT ALL ON SEQUENCE ipsitem_ipsitem_id_seq TO admin;
GRANT ALL ON SEQUENCE ipsitem_ipsitem_id_seq TO xtrole;


--
-- TOC entry 9882 (class 0 OID 0)
-- Dependencies: 634
-- Name: ipsitemchar_ipsitemchar_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE ipsitemchar_ipsitemchar_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE ipsitemchar_ipsitemchar_id_seq FROM admin;
GRANT ALL ON SEQUENCE ipsitemchar_ipsitemchar_id_seq TO admin;
GRANT ALL ON SEQUENCE ipsitemchar_ipsitemchar_id_seq TO xtrole;


--
-- TOC entry 9883 (class 0 OID 0)
-- Dependencies: 635
-- Name: ipsprice; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE ipsprice FROM PUBLIC;
REVOKE ALL ON TABLE ipsprice FROM admin;
GRANT ALL ON TABLE ipsprice TO admin;
GRANT ALL ON TABLE ipsprice TO xtrole;


--
-- TOC entry 9885 (class 0 OID 0)
-- Dependencies: 636
-- Name: ipsprodcat_bak; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE ipsprodcat_bak FROM PUBLIC;
REVOKE ALL ON TABLE ipsprodcat_bak FROM admin;
GRANT ALL ON TABLE ipsprodcat_bak TO admin;
GRANT ALL ON TABLE ipsprodcat_bak TO xtrole;


--
-- TOC entry 9887 (class 0 OID 0)
-- Dependencies: 637
-- Name: ipsprodcat_ipsprodcat_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE ipsprodcat_ipsprodcat_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE ipsprodcat_ipsprodcat_id_seq FROM admin;
GRANT ALL ON SEQUENCE ipsprodcat_ipsprodcat_id_seq TO admin;
GRANT ALL ON SEQUENCE ipsprodcat_ipsprodcat_id_seq TO xtrole;


--
-- TOC entry 9888 (class 0 OID 0)
-- Dependencies: 638
-- Name: item_item_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE item_item_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE item_item_id_seq FROM admin;
GRANT ALL ON SEQUENCE item_item_id_seq TO admin;
GRANT ALL ON SEQUENCE item_item_id_seq TO xtrole;


--
-- TOC entry 9889 (class 0 OID 0)
-- Dependencies: 639
-- Name: itemalias_itemalias_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE itemalias_itemalias_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE itemalias_itemalias_id_seq FROM admin;
GRANT ALL ON SEQUENCE itemalias_itemalias_id_seq TO admin;
GRANT ALL ON SEQUENCE itemalias_itemalias_id_seq TO xtrole;


--
-- TOC entry 9890 (class 0 OID 0)
-- Dependencies: 640
-- Name: itematr_itematr_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE itematr_itematr_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE itematr_itematr_id_seq FROM admin;
GRANT ALL ON SEQUENCE itematr_itematr_id_seq TO admin;
GRANT ALL ON SEQUENCE itematr_itematr_id_seq TO xtrole;


--
-- TOC entry 9891 (class 0 OID 0)
-- Dependencies: 641
-- Name: itemcost_itemcost_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE itemcost_itemcost_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE itemcost_itemcost_id_seq FROM admin;
GRANT ALL ON SEQUENCE itemcost_itemcost_id_seq TO admin;
GRANT ALL ON SEQUENCE itemcost_itemcost_id_seq TO xtrole;


--
-- TOC entry 9892 (class 0 OID 0)
-- Dependencies: 642
-- Name: itemfrez_itemfrez_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE itemfrez_itemfrez_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE itemfrez_itemfrez_seq FROM admin;
GRANT ALL ON SEQUENCE itemfrez_itemfrez_seq TO admin;
GRANT ALL ON SEQUENCE itemfrez_itemfrez_seq TO xtrole;


--
-- TOC entry 9894 (class 0 OID 0)
-- Dependencies: 643
-- Name: itemgrp; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE itemgrp FROM PUBLIC;
REVOKE ALL ON TABLE itemgrp FROM admin;
GRANT ALL ON TABLE itemgrp TO admin;
GRANT ALL ON TABLE itemgrp TO xtrole;


--
-- TOC entry 9895 (class 0 OID 0)
-- Dependencies: 644
-- Name: itemgrp_itemgrp_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE itemgrp_itemgrp_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE itemgrp_itemgrp_id_seq FROM admin;
GRANT ALL ON SEQUENCE itemgrp_itemgrp_id_seq TO admin;
GRANT ALL ON SEQUENCE itemgrp_itemgrp_id_seq TO xtrole;


--
-- TOC entry 9897 (class 0 OID 0)
-- Dependencies: 645
-- Name: itemgrpitem; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE itemgrpitem FROM PUBLIC;
REVOKE ALL ON TABLE itemgrpitem FROM admin;
GRANT ALL ON TABLE itemgrpitem TO admin;
GRANT ALL ON TABLE itemgrpitem TO xtrole;


--
-- TOC entry 9898 (class 0 OID 0)
-- Dependencies: 646
-- Name: itemgrpitem_itemgrpitem_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE itemgrpitem_itemgrpitem_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE itemgrpitem_itemgrpitem_id_seq FROM admin;
GRANT ALL ON SEQUENCE itemgrpitem_itemgrpitem_id_seq TO admin;
GRANT ALL ON SEQUENCE itemgrpitem_itemgrpitem_id_seq TO xtrole;


--
-- TOC entry 9900 (class 0 OID 0)
-- Dependencies: 647
-- Name: itemimage; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE itemimage FROM PUBLIC;
REVOKE ALL ON TABLE itemimage FROM admin;
GRANT ALL ON TABLE itemimage TO admin;
GRANT ALL ON TABLE itemimage TO xtrole;


--
-- TOC entry 9901 (class 0 OID 0)
-- Dependencies: 648
-- Name: itemimage_itemimage_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE itemimage_itemimage_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE itemimage_itemimage_id_seq FROM admin;
GRANT ALL ON SEQUENCE itemimage_itemimage_id_seq TO admin;
GRANT ALL ON SEQUENCE itemimage_itemimage_id_seq TO xtrole;


--
-- TOC entry 9903 (class 0 OID 0)
-- Dependencies: 649
-- Name: itemloc; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE itemloc FROM PUBLIC;
REVOKE ALL ON TABLE itemloc FROM admin;
GRANT ALL ON TABLE itemloc TO admin;
GRANT ALL ON TABLE itemloc TO xtrole;


--
-- TOC entry 9904 (class 0 OID 0)
-- Dependencies: 650
-- Name: itemloc_itemloc_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE itemloc_itemloc_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE itemloc_itemloc_id_seq FROM admin;
GRANT ALL ON SEQUENCE itemloc_itemloc_id_seq TO admin;
GRANT ALL ON SEQUENCE itemloc_itemloc_id_seq TO xtrole;


--
-- TOC entry 9905 (class 0 OID 0)
-- Dependencies: 651
-- Name: itemloc_series_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE itemloc_series_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE itemloc_series_seq FROM admin;
GRANT ALL ON SEQUENCE itemloc_series_seq TO admin;
GRANT ALL ON SEQUENCE itemloc_series_seq TO xtrole;


--
-- TOC entry 9907 (class 0 OID 0)
-- Dependencies: 652
-- Name: itemlocdist; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE itemlocdist FROM PUBLIC;
REVOKE ALL ON TABLE itemlocdist FROM admin;
GRANT ALL ON TABLE itemlocdist TO admin;
GRANT ALL ON TABLE itemlocdist TO xtrole;


--
-- TOC entry 9908 (class 0 OID 0)
-- Dependencies: 653
-- Name: itemlocdist_itemlocdist_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE itemlocdist_itemlocdist_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE itemlocdist_itemlocdist_id_seq FROM admin;
GRANT ALL ON SEQUENCE itemlocdist_itemlocdist_id_seq TO admin;
GRANT ALL ON SEQUENCE itemlocdist_itemlocdist_id_seq TO xtrole;


--
-- TOC entry 9910 (class 0 OID 0)
-- Dependencies: 654
-- Name: itemlocpost; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE itemlocpost FROM PUBLIC;
REVOKE ALL ON TABLE itemlocpost FROM admin;
GRANT ALL ON TABLE itemlocpost TO admin;
GRANT ALL ON TABLE itemlocpost TO xtrole;


--
-- TOC entry 9912 (class 0 OID 0)
-- Dependencies: 655
-- Name: itemlocpost_itemlocpost_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE itemlocpost_itemlocpost_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE itemlocpost_itemlocpost_id_seq FROM admin;
GRANT ALL ON SEQUENCE itemlocpost_itemlocpost_id_seq TO admin;
GRANT ALL ON SEQUENCE itemlocpost_itemlocpost_id_seq TO xtrole;


--
-- TOC entry 9913 (class 0 OID 0)
-- Dependencies: 656
-- Name: itemopn_itemopn_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE itemopn_itemopn_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE itemopn_itemopn_id_seq FROM admin;
GRANT ALL ON SEQUENCE itemopn_itemopn_id_seq TO admin;
GRANT ALL ON SEQUENCE itemopn_itemopn_id_seq TO xtrole;


--
-- TOC entry 9914 (class 0 OID 0)
-- Dependencies: 657
-- Name: itemsite_itemsite_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE itemsite_itemsite_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE itemsite_itemsite_id_seq FROM admin;
GRANT ALL ON SEQUENCE itemsite_itemsite_id_seq TO admin;
GRANT ALL ON SEQUENCE itemsite_itemsite_id_seq TO xtrole;


--
-- TOC entry 9915 (class 0 OID 0)
-- Dependencies: 658
-- Name: itemsrc_itemsrc_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE itemsrc_itemsrc_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE itemsrc_itemsrc_id_seq FROM admin;
GRANT ALL ON SEQUENCE itemsrc_itemsrc_id_seq TO admin;
GRANT ALL ON SEQUENCE itemsrc_itemsrc_id_seq TO xtrole;


--
-- TOC entry 9916 (class 0 OID 0)
-- Dependencies: 659
-- Name: itemsrcp_itemsrcp_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE itemsrcp_itemsrcp_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE itemsrcp_itemsrcp_id_seq FROM admin;
GRANT ALL ON SEQUENCE itemsrcp_itemsrcp_id_seq TO admin;
GRANT ALL ON SEQUENCE itemsrcp_itemsrcp_id_seq TO xtrole;


--
-- TOC entry 9917 (class 0 OID 0)
-- Dependencies: 660
-- Name: itemsub_itemsub_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE itemsub_itemsub_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE itemsub_itemsub_id_seq FROM admin;
GRANT ALL ON SEQUENCE itemsub_itemsub_id_seq TO admin;
GRANT ALL ON SEQUENCE itemsub_itemsub_id_seq TO xtrole;


--
-- TOC entry 9919 (class 0 OID 0)
-- Dependencies: 661
-- Name: itemtax_itemtax_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE itemtax_itemtax_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE itemtax_itemtax_id_seq FROM admin;
GRANT ALL ON SEQUENCE itemtax_itemtax_id_seq TO admin;
GRANT ALL ON SEQUENCE itemtax_itemtax_id_seq TO xtrole;


--
-- TOC entry 9921 (class 0 OID 0)
-- Dependencies: 662
-- Name: itemtrans; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE itemtrans FROM PUBLIC;
REVOKE ALL ON TABLE itemtrans FROM admin;
GRANT ALL ON TABLE itemtrans TO admin;
GRANT ALL ON TABLE itemtrans TO xtrole;


--
-- TOC entry 9923 (class 0 OID 0)
-- Dependencies: 663
-- Name: itemtrans_itemtrans_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE itemtrans_itemtrans_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE itemtrans_itemtrans_id_seq FROM admin;
GRANT ALL ON SEQUENCE itemtrans_itemtrans_id_seq TO admin;
GRANT ALL ON SEQUENCE itemtrans_itemtrans_id_seq TO xtrole;


--
-- TOC entry 9925 (class 0 OID 0)
-- Dependencies: 664
-- Name: itemuom; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE itemuom FROM PUBLIC;
REVOKE ALL ON TABLE itemuom FROM admin;
GRANT ALL ON TABLE itemuom TO admin;
GRANT ALL ON TABLE itemuom TO xtrole;


--
-- TOC entry 9927 (class 0 OID 0)
-- Dependencies: 665
-- Name: itemuom_itemuom_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE itemuom_itemuom_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE itemuom_itemuom_id_seq FROM admin;
GRANT ALL ON SEQUENCE itemuom_itemuom_id_seq TO admin;
GRANT ALL ON SEQUENCE itemuom_itemuom_id_seq TO xtrole;


--
-- TOC entry 9929 (class 0 OID 0)
-- Dependencies: 666
-- Name: itemuomconv_itemuomconv_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE itemuomconv_itemuomconv_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE itemuomconv_itemuomconv_id_seq FROM admin;
GRANT ALL ON SEQUENCE itemuomconv_itemuomconv_id_seq TO admin;
GRANT ALL ON SEQUENCE itemuomconv_itemuomconv_id_seq TO xtrole;


--
-- TOC entry 9930 (class 0 OID 0)
-- Dependencies: 667
-- Name: journal_number_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE journal_number_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE journal_number_seq FROM admin;
GRANT ALL ON SEQUENCE journal_number_seq TO admin;
GRANT ALL ON SEQUENCE journal_number_seq TO xtrole;


--
-- TOC entry 9932 (class 0 OID 0)
-- Dependencies: 668
-- Name: jrnluse; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE jrnluse FROM PUBLIC;
REVOKE ALL ON TABLE jrnluse FROM admin;
GRANT ALL ON TABLE jrnluse TO admin;
GRANT ALL ON TABLE jrnluse TO xtrole;


--
-- TOC entry 9933 (class 0 OID 0)
-- Dependencies: 669
-- Name: jrnluse_jrnluse_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE jrnluse_jrnluse_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE jrnluse_jrnluse_id_seq FROM admin;
GRANT ALL ON SEQUENCE jrnluse_jrnluse_id_seq TO admin;
GRANT ALL ON SEQUENCE jrnluse_jrnluse_id_seq TO xtrole;


--
-- TOC entry 9934 (class 0 OID 0)
-- Dependencies: 670
-- Name: labeldef; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE labeldef FROM PUBLIC;
REVOKE ALL ON TABLE labeldef FROM admin;
GRANT ALL ON TABLE labeldef TO admin;
GRANT ALL ON TABLE labeldef TO xtrole;


--
-- TOC entry 9936 (class 0 OID 0)
-- Dependencies: 671
-- Name: labeldef_labeldef_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE labeldef_labeldef_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE labeldef_labeldef_id_seq FROM admin;
GRANT ALL ON SEQUENCE labeldef_labeldef_id_seq TO admin;
GRANT ALL ON SEQUENCE labeldef_labeldef_id_seq TO xtrole;


--
-- TOC entry 9939 (class 0 OID 0)
-- Dependencies: 672
-- Name: labelform; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE labelform FROM PUBLIC;
REVOKE ALL ON TABLE labelform FROM admin;
GRANT ALL ON TABLE labelform TO admin;
GRANT ALL ON TABLE labelform TO xtrole;


--
-- TOC entry 9940 (class 0 OID 0)
-- Dependencies: 673
-- Name: labelform_labelform_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE labelform_labelform_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE labelform_labelform_id_seq FROM admin;
GRANT ALL ON SEQUENCE labelform_labelform_id_seq TO admin;
GRANT ALL ON SEQUENCE labelform_labelform_id_seq TO xtrole;


--
-- TOC entry 9945 (class 0 OID 0)
-- Dependencies: 674
-- Name: lang; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE lang FROM PUBLIC;
REVOKE ALL ON TABLE lang FROM admin;
GRANT ALL ON TABLE lang TO admin;
GRANT ALL ON TABLE lang TO xtrole;


--
-- TOC entry 9947 (class 0 OID 0)
-- Dependencies: 675
-- Name: lang_lang_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE lang_lang_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE lang_lang_id_seq FROM admin;
GRANT ALL ON SEQUENCE lang_lang_id_seq TO admin;
GRANT ALL ON SEQUENCE lang_lang_id_seq TO xtrole;


--
-- TOC entry 9977 (class 0 OID 0)
-- Dependencies: 676
-- Name: locale; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE locale FROM PUBLIC;
REVOKE ALL ON TABLE locale FROM admin;
GRANT ALL ON TABLE locale TO admin;
GRANT ALL ON TABLE locale TO xtrole;


--
-- TOC entry 9978 (class 0 OID 0)
-- Dependencies: 677
-- Name: locale_locale_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE locale_locale_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE locale_locale_id_seq FROM admin;
GRANT ALL ON SEQUENCE locale_locale_id_seq TO admin;
GRANT ALL ON SEQUENCE locale_locale_id_seq TO xtrole;


--
-- TOC entry 9979 (class 0 OID 0)
-- Dependencies: 678
-- Name: location_location_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE location_location_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE location_location_id_seq FROM admin;
GRANT ALL ON SEQUENCE location_location_id_seq TO admin;
GRANT ALL ON SEQUENCE location_location_id_seq TO xtrole;


--
-- TOC entry 9981 (class 0 OID 0)
-- Dependencies: 679
-- Name: locitem; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE locitem FROM PUBLIC;
REVOKE ALL ON TABLE locitem FROM admin;
GRANT ALL ON TABLE locitem TO admin;
GRANT ALL ON TABLE locitem TO xtrole;


--
-- TOC entry 9982 (class 0 OID 0)
-- Dependencies: 680
-- Name: locitem_locitem_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE locitem_locitem_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE locitem_locitem_id_seq FROM admin;
GRANT ALL ON SEQUENCE locitem_locitem_id_seq TO admin;
GRANT ALL ON SEQUENCE locitem_locitem_id_seq TO xtrole;


--
-- TOC entry 9983 (class 0 OID 0)
-- Dependencies: 681
-- Name: log_log_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE log_log_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE log_log_id_seq FROM admin;
GRANT ALL ON SEQUENCE log_log_id_seq TO admin;
GRANT ALL ON SEQUENCE log_log_id_seq TO xtrole;


--
-- TOC entry 9985 (class 0 OID 0)
-- Dependencies: 682
-- Name: metric; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE metric FROM PUBLIC;
REVOKE ALL ON TABLE metric FROM admin;
GRANT ALL ON TABLE metric TO admin;
GRANT ALL ON TABLE metric TO xtrole;


--
-- TOC entry 9986 (class 0 OID 0)
-- Dependencies: 683
-- Name: metric_metric_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE metric_metric_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE metric_metric_id_seq FROM admin;
GRANT ALL ON SEQUENCE metric_metric_id_seq TO admin;
GRANT ALL ON SEQUENCE metric_metric_id_seq TO xtrole;


--
-- TOC entry 9988 (class 0 OID 0)
-- Dependencies: 684
-- Name: metricenc; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE metricenc FROM PUBLIC;
REVOKE ALL ON TABLE metricenc FROM admin;
GRANT ALL ON TABLE metricenc TO admin;
GRANT ALL ON TABLE metricenc TO xtrole;


--
-- TOC entry 9990 (class 0 OID 0)
-- Dependencies: 685
-- Name: metricenc_metricenc_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE metricenc_metricenc_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE metricenc_metricenc_id_seq FROM admin;
GRANT ALL ON SEQUENCE metricenc_metricenc_id_seq TO admin;
GRANT ALL ON SEQUENCE metricenc_metricenc_id_seq TO xtrole;


--
-- TOC entry 9991 (class 0 OID 0)
-- Dependencies: 686
-- Name: misc_index_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE misc_index_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE misc_index_seq FROM admin;
GRANT ALL ON SEQUENCE misc_index_seq TO admin;
GRANT ALL ON SEQUENCE misc_index_seq TO xtrole;


--
-- TOC entry 9992 (class 0 OID 0)
-- Dependencies: 687
-- Name: mrghist; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE mrghist FROM PUBLIC;
REVOKE ALL ON TABLE mrghist FROM admin;
GRANT ALL ON TABLE mrghist TO admin;
GRANT ALL ON TABLE mrghist TO xtrole;


--
-- TOC entry 10004 (class 0 OID 0)
-- Dependencies: 688
-- Name: mrgundo; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE mrgundo FROM PUBLIC;
REVOKE ALL ON TABLE mrgundo FROM admin;
GRANT ALL ON TABLE mrgundo TO admin;
GRANT ALL ON TABLE mrgundo TO xtrole;


--
-- TOC entry 10006 (class 0 OID 0)
-- Dependencies: 689
-- Name: msg; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE msg FROM PUBLIC;
REVOKE ALL ON TABLE msg FROM admin;
GRANT ALL ON TABLE msg TO admin;
GRANT ALL ON TABLE msg TO xtrole;


--
-- TOC entry 10007 (class 0 OID 0)
-- Dependencies: 690
-- Name: msg_msg_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE msg_msg_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE msg_msg_id_seq FROM admin;
GRANT ALL ON SEQUENCE msg_msg_id_seq TO admin;
GRANT ALL ON SEQUENCE msg_msg_id_seq TO xtrole;


--
-- TOC entry 10009 (class 0 OID 0)
-- Dependencies: 691
-- Name: msguser; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE msguser FROM PUBLIC;
REVOKE ALL ON TABLE msguser FROM admin;
GRANT ALL ON TABLE msguser TO admin;
GRANT ALL ON TABLE msguser TO xtrole;


--
-- TOC entry 10010 (class 0 OID 0)
-- Dependencies: 692
-- Name: msguser_msguser_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE msguser_msguser_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE msguser_msguser_id_seq FROM admin;
GRANT ALL ON SEQUENCE msguser_msguser_id_seq TO admin;
GRANT ALL ON SEQUENCE msguser_msguser_id_seq TO xtrole;


--
-- TOC entry 10011 (class 0 OID 0)
-- Dependencies: 693
-- Name: nvend_nvend_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE nvend_nvend_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE nvend_nvend_id_seq FROM admin;
GRANT ALL ON SEQUENCE nvend_nvend_id_seq TO admin;
GRANT ALL ON SEQUENCE nvend_nvend_id_seq TO xtrole;


--
-- TOC entry 10014 (class 0 OID 0)
-- Dependencies: 694
-- Name: obsolete_tax; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE obsolete_tax FROM PUBLIC;
REVOKE ALL ON TABLE obsolete_tax FROM admin;
GRANT ALL ON TABLE obsolete_tax TO admin;
GRANT ALL ON TABLE obsolete_tax TO xtrole;


--
-- TOC entry 10016 (class 0 OID 0)
-- Dependencies: 695
-- Name: ophead_ophead_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE ophead_ophead_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE ophead_ophead_id_seq FROM admin;
GRANT ALL ON SEQUENCE ophead_ophead_id_seq TO admin;
GRANT ALL ON SEQUENCE ophead_ophead_id_seq TO xtrole;


--
-- TOC entry 10018 (class 0 OID 0)
-- Dependencies: 696
-- Name: opsource; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE opsource FROM PUBLIC;
REVOKE ALL ON TABLE opsource FROM admin;
GRANT ALL ON TABLE opsource TO admin;
GRANT ALL ON TABLE opsource TO xtrole;


--
-- TOC entry 10020 (class 0 OID 0)
-- Dependencies: 697
-- Name: opsource_opsource_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE opsource_opsource_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE opsource_opsource_id_seq FROM admin;
GRANT ALL ON SEQUENCE opsource_opsource_id_seq TO admin;
GRANT ALL ON SEQUENCE opsource_opsource_id_seq TO xtrole;


--
-- TOC entry 10022 (class 0 OID 0)
-- Dependencies: 698
-- Name: opstage; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE opstage FROM PUBLIC;
REVOKE ALL ON TABLE opstage FROM admin;
GRANT ALL ON TABLE opstage TO admin;
GRANT ALL ON TABLE opstage TO xtrole;


--
-- TOC entry 10024 (class 0 OID 0)
-- Dependencies: 699
-- Name: opstage_opstage_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE opstage_opstage_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE opstage_opstage_id_seq FROM admin;
GRANT ALL ON SEQUENCE opstage_opstage_id_seq TO admin;
GRANT ALL ON SEQUENCE opstage_opstage_id_seq TO xtrole;


--
-- TOC entry 10026 (class 0 OID 0)
-- Dependencies: 700
-- Name: optype; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE optype FROM PUBLIC;
REVOKE ALL ON TABLE optype FROM admin;
GRANT ALL ON TABLE optype TO admin;
GRANT ALL ON TABLE optype TO xtrole;


--
-- TOC entry 10028 (class 0 OID 0)
-- Dependencies: 701
-- Name: optype_optype_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE optype_optype_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE optype_optype_id_seq FROM admin;
GRANT ALL ON SEQUENCE optype_optype_id_seq TO admin;
GRANT ALL ON SEQUENCE optype_optype_id_seq TO xtrole;


--
-- TOC entry 10030 (class 0 OID 0)
-- Dependencies: 702
-- Name: orderhead; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE orderhead FROM PUBLIC;
REVOKE ALL ON TABLE orderhead FROM admin;
GRANT ALL ON TABLE orderhead TO admin;
GRANT ALL ON TABLE orderhead TO xtrole;


--
-- TOC entry 10032 (class 0 OID 0)
-- Dependencies: 703
-- Name: orderitem; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE orderitem FROM PUBLIC;
REVOKE ALL ON TABLE orderitem FROM admin;
GRANT ALL ON TABLE orderitem TO admin;
GRANT ALL ON TABLE orderitem TO xtrole;


--
-- TOC entry 10034 (class 0 OID 0)
-- Dependencies: 704
-- Name: orderseq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE orderseq FROM PUBLIC;
REVOKE ALL ON TABLE orderseq FROM admin;
GRANT ALL ON TABLE orderseq TO admin;
GRANT ALL ON TABLE orderseq TO xtrole;


--
-- TOC entry 10035 (class 0 OID 0)
-- Dependencies: 705
-- Name: orderseq_orderseq_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE orderseq_orderseq_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE orderseq_orderseq_id_seq FROM admin;
GRANT ALL ON SEQUENCE orderseq_orderseq_id_seq TO admin;
GRANT ALL ON SEQUENCE orderseq_orderseq_id_seq TO xtrole;


--
-- TOC entry 10037 (class 0 OID 0)
-- Dependencies: 706
-- Name: pack; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE pack FROM PUBLIC;
REVOKE ALL ON TABLE pack FROM admin;
GRANT ALL ON TABLE pack TO admin;
GRANT ALL ON TABLE pack TO xtrole;


--
-- TOC entry 10039 (class 0 OID 0)
-- Dependencies: 707
-- Name: pack_pack_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE pack_pack_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE pack_pack_id_seq FROM admin;
GRANT ALL ON SEQUENCE pack_pack_id_seq TO admin;
GRANT ALL ON SEQUENCE pack_pack_id_seq TO xtrole;


--
-- TOC entry 10041 (class 0 OID 0)
-- Dependencies: 708
-- Name: payaropen; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE payaropen FROM PUBLIC;
REVOKE ALL ON TABLE payaropen FROM admin;
GRANT ALL ON TABLE payaropen TO admin;
GRANT ALL ON TABLE payaropen TO xtrole;


--
-- TOC entry 10043 (class 0 OID 0)
-- Dependencies: 709
-- Name: payco; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE payco FROM PUBLIC;
REVOKE ALL ON TABLE payco FROM admin;
GRANT ALL ON TABLE payco TO admin;
GRANT ALL ON TABLE payco TO xtrole;


--
-- TOC entry 10045 (class 0 OID 0)
-- Dependencies: 710
-- Name: period_period_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE period_period_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE period_period_id_seq FROM admin;
GRANT ALL ON SEQUENCE period_period_id_seq TO admin;
GRANT ALL ON SEQUENCE period_period_id_seq TO xtrole;


--
-- TOC entry 10049 (class 0 OID 0)
-- Dependencies: 711
-- Name: pkgdep; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE pkgdep FROM PUBLIC;
REVOKE ALL ON TABLE pkgdep FROM admin;
GRANT ALL ON TABLE pkgdep TO admin;
GRANT ALL ON TABLE pkgdep TO xtrole;


--
-- TOC entry 10051 (class 0 OID 0)
-- Dependencies: 712
-- Name: pkgdep_pkgdep_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE pkgdep_pkgdep_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE pkgdep_pkgdep_id_seq FROM admin;
GRANT ALL ON SEQUENCE pkgdep_pkgdep_id_seq TO admin;
GRANT ALL ON SEQUENCE pkgdep_pkgdep_id_seq TO xtrole;


--
-- TOC entry 10054 (class 0 OID 0)
-- Dependencies: 713
-- Name: pkghead; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE pkghead FROM PUBLIC;
REVOKE ALL ON TABLE pkghead FROM admin;
GRANT ALL ON TABLE pkghead TO admin;
GRANT ALL ON TABLE pkghead TO xtrole;


--
-- TOC entry 10056 (class 0 OID 0)
-- Dependencies: 714
-- Name: pkghead_pkghead_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE pkghead_pkghead_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE pkghead_pkghead_id_seq FROM admin;
GRANT ALL ON SEQUENCE pkghead_pkghead_id_seq TO admin;
GRANT ALL ON SEQUENCE pkghead_pkghead_id_seq TO xtrole;


--
-- TOC entry 10058 (class 0 OID 0)
-- Dependencies: 715
-- Name: pkgitem; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE pkgitem FROM PUBLIC;
REVOKE ALL ON TABLE pkgitem FROM admin;
GRANT ALL ON TABLE pkgitem TO admin;
GRANT ALL ON TABLE pkgitem TO xtrole;


--
-- TOC entry 10060 (class 0 OID 0)
-- Dependencies: 716
-- Name: pkgitem_pkgitem_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE pkgitem_pkgitem_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE pkgitem_pkgitem_id_seq FROM admin;
GRANT ALL ON SEQUENCE pkgitem_pkgitem_id_seq TO admin;
GRANT ALL ON SEQUENCE pkgitem_pkgitem_id_seq TO xtrole;


--
-- TOC entry 10061 (class 0 OID 0)
-- Dependencies: 717
-- Name: plancode_plancode_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE plancode_plancode_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE plancode_plancode_id_seq FROM admin;
GRANT ALL ON SEQUENCE plancode_plancode_id_seq TO admin;
GRANT ALL ON SEQUENCE plancode_plancode_id_seq TO xtrole;


--
-- TOC entry 10062 (class 0 OID 0)
-- Dependencies: 718
-- Name: planord_planord_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE planord_planord_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE planord_planord_id_seq FROM admin;
GRANT ALL ON SEQUENCE planord_planord_id_seq TO admin;
GRANT ALL ON SEQUENCE planord_planord_id_seq TO xtrole;


--
-- TOC entry 10063 (class 0 OID 0)
-- Dependencies: 719
-- Name: pohead_pohead_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE pohead_pohead_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE pohead_pohead_id_seq FROM admin;
GRANT ALL ON SEQUENCE pohead_pohead_id_seq TO admin;
GRANT ALL ON SEQUENCE pohead_pohead_id_seq TO xtrole;


--
-- TOC entry 10064 (class 0 OID 0)
-- Dependencies: 720
-- Name: poitem_poitem_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE poitem_poitem_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE poitem_poitem_id_seq FROM admin;
GRANT ALL ON SEQUENCE poitem_poitem_id_seq TO admin;
GRANT ALL ON SEQUENCE poitem_poitem_id_seq TO xtrole;


--
-- TOC entry 10066 (class 0 OID 0)
-- Dependencies: 721
-- Name: recv; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE recv FROM PUBLIC;
REVOKE ALL ON TABLE recv FROM admin;
GRANT ALL ON TABLE recv TO admin;
GRANT ALL ON TABLE recv TO xtrole;


--
-- TOC entry 10067 (class 0 OID 0)
-- Dependencies: 722
-- Name: porecv; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE porecv FROM PUBLIC;
REVOKE ALL ON TABLE porecv FROM admin;
GRANT ALL ON TABLE porecv TO admin;
GRANT ALL ON TABLE porecv TO xtrole;


--
-- TOC entry 10068 (class 0 OID 0)
-- Dependencies: 723
-- Name: porecv_porecv_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE porecv_porecv_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE porecv_porecv_id_seq FROM admin;
GRANT ALL ON SEQUENCE porecv_porecv_id_seq TO admin;
GRANT ALL ON SEQUENCE porecv_porecv_id_seq TO xtrole;


--
-- TOC entry 10088 (class 0 OID 0)
-- Dependencies: 724
-- Name: poreject; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE poreject FROM PUBLIC;
REVOKE ALL ON TABLE poreject FROM admin;
GRANT ALL ON TABLE poreject TO admin;
GRANT ALL ON TABLE poreject TO xtrole;


--
-- TOC entry 10089 (class 0 OID 0)
-- Dependencies: 725
-- Name: poreject_poreject_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE poreject_poreject_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE poreject_poreject_id_seq FROM admin;
GRANT ALL ON SEQUENCE poreject_poreject_id_seq TO admin;
GRANT ALL ON SEQUENCE poreject_poreject_id_seq TO xtrole;


--
-- TOC entry 10091 (class 0 OID 0)
-- Dependencies: 726
-- Name: potype; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE potype FROM PUBLIC;
REVOKE ALL ON TABLE potype FROM admin;
GRANT ALL ON TABLE potype TO admin;
GRANT ALL ON TABLE potype TO xtrole;


--
-- TOC entry 10093 (class 0 OID 0)
-- Dependencies: 727
-- Name: potype_potype_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE potype_potype_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE potype_potype_id_seq FROM admin;
GRANT ALL ON SEQUENCE potype_potype_id_seq TO admin;
GRANT ALL ON SEQUENCE potype_potype_id_seq TO xtrole;


--
-- TOC entry 10095 (class 0 OID 0)
-- Dependencies: 728
-- Name: pr; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE pr FROM PUBLIC;
REVOKE ALL ON TABLE pr FROM admin;
GRANT ALL ON TABLE pr TO admin;
GRANT ALL ON TABLE pr TO xtrole;


--
-- TOC entry 10096 (class 0 OID 0)
-- Dependencies: 729
-- Name: pr_pr_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE pr_pr_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE pr_pr_id_seq FROM admin;
GRANT ALL ON SEQUENCE pr_pr_id_seq TO admin;
GRANT ALL ON SEQUENCE pr_pr_id_seq TO xtrole;


--
-- TOC entry 10098 (class 0 OID 0)
-- Dependencies: 730
-- Name: prftcntr; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE prftcntr FROM PUBLIC;
REVOKE ALL ON TABLE prftcntr FROM admin;
GRANT ALL ON TABLE prftcntr TO admin;
GRANT ALL ON TABLE prftcntr TO xtrole;


--
-- TOC entry 10100 (class 0 OID 0)
-- Dependencies: 731
-- Name: prftcntr_prftcntr_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE prftcntr_prftcntr_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE prftcntr_prftcntr_id_seq FROM admin;
GRANT ALL ON SEQUENCE prftcntr_prftcntr_id_seq TO admin;
GRANT ALL ON SEQUENCE prftcntr_prftcntr_id_seq TO xtrole;


--
-- TOC entry 10102 (class 0 OID 0)
-- Dependencies: 732
-- Name: usrgrp; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE usrgrp FROM PUBLIC;
REVOKE ALL ON TABLE usrgrp FROM admin;
GRANT ALL ON TABLE usrgrp TO admin;
GRANT ALL ON TABLE usrgrp TO xtrole;


--
-- TOC entry 10104 (class 0 OID 0)
-- Dependencies: 733
-- Name: usrpriv; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE usrpriv FROM PUBLIC;
REVOKE ALL ON TABLE usrpriv FROM admin;
GRANT ALL ON TABLE usrpriv TO admin;
GRANT ALL ON TABLE usrpriv TO xtrole;


--
-- TOC entry 10105 (class 0 OID 0)
-- Dependencies: 734
-- Name: privgranted; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE privgranted FROM PUBLIC;
REVOKE ALL ON TABLE privgranted FROM admin;
GRANT ALL ON TABLE privgranted TO admin;
GRANT ALL ON TABLE privgranted TO xtrole;


--
-- TOC entry 10107 (class 0 OID 0)
-- Dependencies: 735
-- Name: prj_prj_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE prj_prj_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE prj_prj_id_seq FROM admin;
GRANT ALL ON SEQUENCE prj_prj_id_seq TO admin;
GRANT ALL ON SEQUENCE prj_prj_id_seq TO xtrole;


--
-- TOC entry 10109 (class 0 OID 0)
-- Dependencies: 736
-- Name: prjtask_prjtask_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE prjtask_prjtask_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE prjtask_prjtask_id_seq FROM admin;
GRANT ALL ON SEQUENCE prjtask_prjtask_id_seq TO admin;
GRANT ALL ON SEQUENCE prjtask_prjtask_id_seq TO xtrole;


--
-- TOC entry 10111 (class 0 OID 0)
-- Dependencies: 737
-- Name: prjtaskuser; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE prjtaskuser FROM PUBLIC;
REVOKE ALL ON TABLE prjtaskuser FROM admin;
GRANT ALL ON TABLE prjtaskuser TO admin;
GRANT ALL ON TABLE prjtaskuser TO xtrole;


--
-- TOC entry 10113 (class 0 OID 0)
-- Dependencies: 738
-- Name: prjtaskuser_prjtaskuser_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE prjtaskuser_prjtaskuser_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE prjtaskuser_prjtaskuser_id_seq FROM admin;
GRANT ALL ON SEQUENCE prjtaskuser_prjtaskuser_id_seq TO admin;
GRANT ALL ON SEQUENCE prjtaskuser_prjtaskuser_id_seq TO xtrole;


--
-- TOC entry 10114 (class 0 OID 0)
-- Dependencies: 739
-- Name: prjtype; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE prjtype FROM PUBLIC;
REVOKE ALL ON TABLE prjtype FROM admin;
GRANT ALL ON TABLE prjtype TO admin;
GRANT ALL ON TABLE prjtype TO xtrole;


--
-- TOC entry 10116 (class 0 OID 0)
-- Dependencies: 741
-- Name: prodcat_prodcat_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE prodcat_prodcat_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE prodcat_prodcat_id_seq FROM admin;
GRANT ALL ON SEQUENCE prodcat_prodcat_id_seq TO admin;
GRANT ALL ON SEQUENCE prodcat_prodcat_id_seq TO xtrole;


--
-- TOC entry 10124 (class 0 OID 0)
-- Dependencies: 742
-- Name: qryhead; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE qryhead FROM PUBLIC;
REVOKE ALL ON TABLE qryhead FROM admin;
GRANT ALL ON TABLE qryhead TO admin;
GRANT ALL ON TABLE qryhead TO xtrole;


--
-- TOC entry 10126 (class 0 OID 0)
-- Dependencies: 743
-- Name: qryhead_qryhead_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE qryhead_qryhead_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE qryhead_qryhead_id_seq FROM admin;
GRANT ALL ON SEQUENCE qryhead_qryhead_id_seq TO admin;
GRANT ALL ON SEQUENCE qryhead_qryhead_id_seq TO xtrole;


--
-- TOC entry 10137 (class 0 OID 0)
-- Dependencies: 744
-- Name: qryitem; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE qryitem FROM PUBLIC;
REVOKE ALL ON TABLE qryitem FROM admin;
GRANT ALL ON TABLE qryitem TO admin;
GRANT ALL ON TABLE qryitem TO xtrole;


--
-- TOC entry 10139 (class 0 OID 0)
-- Dependencies: 745
-- Name: qryitem_qryitem_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE qryitem_qryitem_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE qryitem_qryitem_id_seq FROM admin;
GRANT ALL ON SEQUENCE qryitem_qryitem_id_seq TO admin;
GRANT ALL ON SEQUENCE qryitem_qryitem_id_seq TO xtrole;


--
-- TOC entry 10140 (class 0 OID 0)
-- Dependencies: 746
-- Name: quhead_quhead_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE quhead_quhead_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE quhead_quhead_id_seq FROM admin;
GRANT ALL ON SEQUENCE quhead_quhead_id_seq TO admin;
GRANT ALL ON SEQUENCE quhead_quhead_id_seq TO xtrole;


--
-- TOC entry 10141 (class 0 OID 0)
-- Dependencies: 747
-- Name: quitem_quitem_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE quitem_quitem_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE quitem_quitem_id_seq FROM admin;
GRANT ALL ON SEQUENCE quitem_quitem_id_seq TO admin;
GRANT ALL ON SEQUENCE quitem_quitem_id_seq TO xtrole;


--
-- TOC entry 10143 (class 0 OID 0)
-- Dependencies: 748
-- Name: rcalitem; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE rcalitem FROM PUBLIC;
REVOKE ALL ON TABLE rcalitem FROM admin;
GRANT ALL ON TABLE rcalitem TO admin;
GRANT ALL ON TABLE rcalitem TO xtrole;


--
-- TOC entry 10154 (class 0 OID 0)
-- Dependencies: 749
-- Name: recur; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE recur FROM PUBLIC;
REVOKE ALL ON TABLE recur FROM admin;
GRANT ALL ON TABLE recur TO admin;
GRANT ALL ON TABLE recur TO xtrole;


--
-- TOC entry 10156 (class 0 OID 0)
-- Dependencies: 750
-- Name: recur_recur_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE recur_recur_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE recur_recur_id_seq FROM admin;
GRANT ALL ON SEQUENCE recur_recur_id_seq TO admin;
GRANT ALL ON SEQUENCE recur_recur_id_seq TO xtrole;


--
-- TOC entry 10167 (class 0 OID 0)
-- Dependencies: 751
-- Name: recurtype; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE recurtype FROM PUBLIC;
REVOKE ALL ON TABLE recurtype FROM admin;
GRANT ALL ON TABLE recurtype TO admin;
GRANT ALL ON TABLE recurtype TO xtrole;


--
-- TOC entry 10169 (class 0 OID 0)
-- Dependencies: 752
-- Name: recurtype_recurtype_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE recurtype_recurtype_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE recurtype_recurtype_id_seq FROM admin;
GRANT ALL ON SEQUENCE recurtype_recurtype_id_seq TO admin;
GRANT ALL ON SEQUENCE recurtype_recurtype_id_seq TO xtrole;


--
-- TOC entry 10171 (class 0 OID 0)
-- Dependencies: 753
-- Name: recv_recv_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE recv_recv_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE recv_recv_id_seq FROM admin;
GRANT ALL ON SEQUENCE recv_recv_id_seq TO admin;
GRANT ALL ON SEQUENCE recv_recv_id_seq TO xtrole;


--
-- TOC entry 10172 (class 0 OID 0)
-- Dependencies: 754
-- Name: remitto; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE remitto FROM PUBLIC;
REVOKE ALL ON TABLE remitto FROM admin;
GRANT ALL ON TABLE remitto TO admin;
GRANT ALL ON TABLE remitto TO xtrole;


--
-- TOC entry 10174 (class 0 OID 0)
-- Dependencies: 755
-- Name: rjctcode; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE rjctcode FROM PUBLIC;
REVOKE ALL ON TABLE rjctcode FROM admin;
GRANT ALL ON TABLE rjctcode TO admin;
GRANT ALL ON TABLE rjctcode TO xtrole;


--
-- TOC entry 10175 (class 0 OID 0)
-- Dependencies: 756
-- Name: rjctcode_rjctcode_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE rjctcode_rjctcode_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE rjctcode_rjctcode_id_seq FROM admin;
GRANT ALL ON SEQUENCE rjctcode_rjctcode_id_seq TO admin;
GRANT ALL ON SEQUENCE rjctcode_rjctcode_id_seq TO xtrole;


--
-- TOC entry 10177 (class 0 OID 0)
-- Dependencies: 757
-- Name: rsncode_rsncode_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE rsncode_rsncode_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE rsncode_rsncode_id_seq FROM admin;
GRANT ALL ON SEQUENCE rsncode_rsncode_id_seq TO admin;
GRANT ALL ON SEQUENCE rsncode_rsncode_id_seq TO xtrole;


--
-- TOC entry 10179 (class 0 OID 0)
-- Dependencies: 758
-- Name: sale; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE sale FROM PUBLIC;
REVOKE ALL ON TABLE sale FROM admin;
GRANT ALL ON TABLE sale TO admin;
GRANT ALL ON TABLE sale TO xtrole;


--
-- TOC entry 10180 (class 0 OID 0)
-- Dependencies: 759
-- Name: sale_sale_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE sale_sale_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE sale_sale_id_seq FROM admin;
GRANT ALL ON SEQUENCE sale_sale_id_seq TO admin;
GRANT ALL ON SEQUENCE sale_sale_id_seq TO xtrole;


--
-- TOC entry 10181 (class 0 OID 0)
-- Dependencies: 760
-- Name: salesaccnt_salesaccnt_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE salesaccnt_salesaccnt_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE salesaccnt_salesaccnt_id_seq FROM admin;
GRANT ALL ON SEQUENCE salesaccnt_salesaccnt_id_seq TO admin;
GRANT ALL ON SEQUENCE salesaccnt_salesaccnt_id_seq TO xtrole;


--
-- TOC entry 10183 (class 0 OID 0)
-- Dependencies: 761
-- Name: salescat_salescat_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE salescat_salescat_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE salescat_salescat_id_seq FROM admin;
GRANT ALL ON SEQUENCE salescat_salescat_id_seq TO admin;
GRANT ALL ON SEQUENCE salescat_salescat_id_seq TO xtrole;


--
-- TOC entry 10185 (class 0 OID 0)
-- Dependencies: 762
-- Name: saleshistory; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE saleshistory FROM PUBLIC;
REVOKE ALL ON TABLE saleshistory FROM admin;
GRANT ALL ON TABLE saleshistory TO admin;
GRANT ALL ON TABLE saleshistory TO xtrole;


--
-- TOC entry 10187 (class 0 OID 0)
-- Dependencies: 763
-- Name: saleshistorymisc; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE saleshistorymisc FROM PUBLIC;
REVOKE ALL ON TABLE saleshistorymisc FROM admin;
GRANT ALL ON TABLE saleshistorymisc TO admin;
GRANT ALL ON TABLE saleshistorymisc TO xtrole;


--
-- TOC entry 10188 (class 0 OID 0)
-- Dependencies: 764
-- Name: salesrep_salesrep_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE salesrep_salesrep_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE salesrep_salesrep_id_seq FROM admin;
GRANT ALL ON SEQUENCE salesrep_salesrep_id_seq TO admin;
GRANT ALL ON SEQUENCE salesrep_salesrep_id_seq TO xtrole;


--
-- TOC entry 10190 (class 0 OID 0)
-- Dependencies: 765
-- Name: saletype_saletype_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE saletype_saletype_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE saletype_saletype_id_seq FROM admin;
GRANT ALL ON SEQUENCE saletype_saletype_id_seq TO admin;
GRANT ALL ON SEQUENCE saletype_saletype_id_seq TO xtrole;


--
-- TOC entry 10192 (class 0 OID 0)
-- Dependencies: 766
-- Name: schemaord; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE schemaord FROM PUBLIC;
REVOKE ALL ON TABLE schemaord FROM admin;
GRANT ALL ON TABLE schemaord TO admin;
GRANT ALL ON TABLE schemaord TO xtrole;


--
-- TOC entry 10194 (class 0 OID 0)
-- Dependencies: 767
-- Name: schemaord_schemaord_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE schemaord_schemaord_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE schemaord_schemaord_id_seq FROM admin;
GRANT ALL ON SEQUENCE schemaord_schemaord_id_seq TO admin;
GRANT ALL ON SEQUENCE schemaord_schemaord_id_seq TO xtrole;


--
-- TOC entry 10196 (class 0 OID 0)
-- Dependencies: 768
-- Name: sequence; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE sequence FROM PUBLIC;
REVOKE ALL ON TABLE sequence FROM admin;
GRANT ALL ON TABLE sequence TO admin;
GRANT ALL ON TABLE sequence TO xtrole;


--
-- TOC entry 10198 (class 0 OID 0)
-- Dependencies: 769
-- Name: shift_shift_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE shift_shift_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE shift_shift_id_seq FROM admin;
GRANT ALL ON SEQUENCE shift_shift_id_seq TO admin;
GRANT ALL ON SEQUENCE shift_shift_id_seq TO xtrole;


--
-- TOC entry 10200 (class 0 OID 0)
-- Dependencies: 770
-- Name: shipchrg_shipchrg_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE shipchrg_shipchrg_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE shipchrg_shipchrg_id_seq FROM admin;
GRANT ALL ON SEQUENCE shipchrg_shipchrg_id_seq TO admin;
GRANT ALL ON SEQUENCE shipchrg_shipchrg_id_seq TO xtrole;


--
-- TOC entry 10202 (class 0 OID 0)
-- Dependencies: 771
-- Name: shipdatasum; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE shipdatasum FROM PUBLIC;
REVOKE ALL ON TABLE shipdatasum FROM admin;
GRANT ALL ON TABLE shipdatasum TO admin;
GRANT ALL ON TABLE shipdatasum TO xtrole;


--
-- TOC entry 10203 (class 0 OID 0)
-- Dependencies: 772
-- Name: shipform_shipform_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE shipform_shipform_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE shipform_shipform_id_seq FROM admin;
GRANT ALL ON SEQUENCE shipform_shipform_id_seq TO admin;
GRANT ALL ON SEQUENCE shipform_shipform_id_seq TO xtrole;


--
-- TOC entry 10205 (class 0 OID 0)
-- Dependencies: 773
-- Name: shiphead_shiphead_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE shiphead_shiphead_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE shiphead_shiphead_id_seq FROM admin;
GRANT ALL ON SEQUENCE shiphead_shiphead_id_seq TO admin;
GRANT ALL ON SEQUENCE shiphead_shiphead_id_seq TO xtrole;


--
-- TOC entry 10207 (class 0 OID 0)
-- Dependencies: 774
-- Name: shipitem_shipitem_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE shipitem_shipitem_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE shipitem_shipitem_id_seq FROM admin;
GRANT ALL ON SEQUENCE shipitem_shipitem_id_seq TO admin;
GRANT ALL ON SEQUENCE shipitem_shipitem_id_seq TO xtrole;


--
-- TOC entry 10208 (class 0 OID 0)
-- Dependencies: 775
-- Name: shipment_number_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE shipment_number_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE shipment_number_seq FROM admin;
GRANT ALL ON SEQUENCE shipment_number_seq TO admin;
GRANT ALL ON SEQUENCE shipment_number_seq TO xtrole;


--
-- TOC entry 10209 (class 0 OID 0)
-- Dependencies: 776
-- Name: shipto; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE shipto FROM PUBLIC;
REVOKE ALL ON TABLE shipto FROM admin;
GRANT ALL ON TABLE shipto TO admin;
GRANT ALL ON TABLE shipto TO xtrole;


--
-- TOC entry 10210 (class 0 OID 0)
-- Dependencies: 777
-- Name: shipto_shipto_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE shipto_shipto_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE shipto_shipto_id_seq FROM admin;
GRANT ALL ON SEQUENCE shipto_shipto_id_seq TO admin;
GRANT ALL ON SEQUENCE shipto_shipto_id_seq TO xtrole;


--
-- TOC entry 10211 (class 0 OID 0)
-- Dependencies: 778
-- Name: shipvia_shipvia_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE shipvia_shipvia_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE shipvia_shipvia_id_seq FROM admin;
GRANT ALL ON SEQUENCE shipvia_shipvia_id_seq TO admin;
GRANT ALL ON SEQUENCE shipvia_shipvia_id_seq TO xtrole;


--
-- TOC entry 10212 (class 0 OID 0)
-- Dependencies: 779
-- Name: shipzone_shipzone_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE shipzone_shipzone_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE shipzone_shipzone_id_seq FROM admin;
GRANT ALL ON SEQUENCE shipzone_shipzone_id_seq TO admin;
GRANT ALL ON SEQUENCE shipzone_shipzone_id_seq TO xtrole;


--
-- TOC entry 10214 (class 0 OID 0)
-- Dependencies: 780
-- Name: sitetype_sitetype_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE sitetype_sitetype_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE sitetype_sitetype_id_seq FROM admin;
GRANT ALL ON SEQUENCE sitetype_sitetype_id_seq TO admin;
GRANT ALL ON SEQUENCE sitetype_sitetype_id_seq TO xtrole;


--
-- TOC entry 10216 (class 0 OID 0)
-- Dependencies: 781
-- Name: sltrans; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE sltrans FROM PUBLIC;
REVOKE ALL ON TABLE sltrans FROM admin;
GRANT ALL ON TABLE sltrans TO admin;
GRANT ALL ON TABLE sltrans TO xtrole;


--
-- TOC entry 10218 (class 0 OID 0)
-- Dependencies: 783
-- Name: sopack; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE sopack FROM PUBLIC;
REVOKE ALL ON TABLE sopack FROM admin;
GRANT ALL ON TABLE sopack TO admin;
GRANT ALL ON TABLE sopack TO xtrole;


--
-- TOC entry 10219 (class 0 OID 0)
-- Dependencies: 784
-- Name: sopack_sopack_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE sopack_sopack_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE sopack_sopack_id_seq FROM admin;
GRANT ALL ON SEQUENCE sopack_sopack_id_seq TO admin;
GRANT ALL ON SEQUENCE sopack_sopack_id_seq TO xtrole;


--
-- TOC entry 10225 (class 0 OID 0)
-- Dependencies: 785
-- Name: source; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE source FROM PUBLIC;
REVOKE ALL ON TABLE source FROM admin;
GRANT ALL ON TABLE source TO admin;
GRANT ALL ON TABLE source TO xtrole;


--
-- TOC entry 10227 (class 0 OID 0)
-- Dependencies: 786
-- Name: source_source_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE source_source_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE source_source_id_seq FROM admin;
GRANT ALL ON SEQUENCE source_source_id_seq TO admin;
GRANT ALL ON SEQUENCE source_source_id_seq TO xtrole;


--
-- TOC entry 10229 (class 0 OID 0)
-- Dependencies: 787
-- Name: state; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE state FROM PUBLIC;
REVOKE ALL ON TABLE state FROM admin;
GRANT ALL ON TABLE state TO admin;
GRANT ALL ON TABLE state TO xtrole;


--
-- TOC entry 10231 (class 0 OID 0)
-- Dependencies: 788
-- Name: state_state_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE state_state_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE state_state_id_seq FROM admin;
GRANT ALL ON SEQUENCE state_state_id_seq TO admin;
GRANT ALL ON SEQUENCE state_state_id_seq TO xtrole;


--
-- TOC entry 10232 (class 0 OID 0)
-- Dependencies: 789
-- Name: status; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE status FROM PUBLIC;
REVOKE ALL ON TABLE status FROM admin;
GRANT ALL ON TABLE status TO admin;
GRANT ALL ON TABLE status TO xtrole;


--
-- TOC entry 10234 (class 0 OID 0)
-- Dependencies: 790
-- Name: status_status_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE status_status_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE status_status_id_seq FROM admin;
GRANT ALL ON SEQUENCE status_status_id_seq TO admin;
GRANT ALL ON SEQUENCE status_status_id_seq TO xtrole;


--
-- TOC entry 10236 (class 0 OID 0)
-- Dependencies: 791
-- Name: stdjrnl; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE stdjrnl FROM PUBLIC;
REVOKE ALL ON TABLE stdjrnl FROM admin;
GRANT ALL ON TABLE stdjrnl TO admin;
GRANT ALL ON TABLE stdjrnl TO xtrole;


--
-- TOC entry 10238 (class 0 OID 0)
-- Dependencies: 792
-- Name: stdjrnl_stdjrnl_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE stdjrnl_stdjrnl_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE stdjrnl_stdjrnl_id_seq FROM admin;
GRANT ALL ON SEQUENCE stdjrnl_stdjrnl_id_seq TO admin;
GRANT ALL ON SEQUENCE stdjrnl_stdjrnl_id_seq TO xtrole;


--
-- TOC entry 10240 (class 0 OID 0)
-- Dependencies: 793
-- Name: stdjrnlgrp; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE stdjrnlgrp FROM PUBLIC;
REVOKE ALL ON TABLE stdjrnlgrp FROM admin;
GRANT ALL ON TABLE stdjrnlgrp TO admin;
GRANT ALL ON TABLE stdjrnlgrp TO xtrole;


--
-- TOC entry 10242 (class 0 OID 0)
-- Dependencies: 794
-- Name: stdjrnlgrp_stdjrnlgrp_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE stdjrnlgrp_stdjrnlgrp_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE stdjrnlgrp_stdjrnlgrp_id_seq FROM admin;
GRANT ALL ON SEQUENCE stdjrnlgrp_stdjrnlgrp_id_seq TO admin;
GRANT ALL ON SEQUENCE stdjrnlgrp_stdjrnlgrp_id_seq TO xtrole;


--
-- TOC entry 10244 (class 0 OID 0)
-- Dependencies: 795
-- Name: stdjrnlgrpitem; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE stdjrnlgrpitem FROM PUBLIC;
REVOKE ALL ON TABLE stdjrnlgrpitem FROM admin;
GRANT ALL ON TABLE stdjrnlgrpitem TO admin;
GRANT ALL ON TABLE stdjrnlgrpitem TO xtrole;


--
-- TOC entry 10246 (class 0 OID 0)
-- Dependencies: 796
-- Name: stdjrnlgrpitem_stdjrnlgrpitem_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE stdjrnlgrpitem_stdjrnlgrpitem_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE stdjrnlgrpitem_stdjrnlgrpitem_id_seq FROM admin;
GRANT ALL ON SEQUENCE stdjrnlgrpitem_stdjrnlgrpitem_id_seq TO admin;
GRANT ALL ON SEQUENCE stdjrnlgrpitem_stdjrnlgrpitem_id_seq TO xtrole;


--
-- TOC entry 10248 (class 0 OID 0)
-- Dependencies: 797
-- Name: stdjrnlitem; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE stdjrnlitem FROM PUBLIC;
REVOKE ALL ON TABLE stdjrnlitem FROM admin;
GRANT ALL ON TABLE stdjrnlitem TO admin;
GRANT ALL ON TABLE stdjrnlitem TO xtrole;


--
-- TOC entry 10250 (class 0 OID 0)
-- Dependencies: 798
-- Name: stdjrnlitem_stdjrnlitem_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE stdjrnlitem_stdjrnlitem_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE stdjrnlitem_stdjrnlitem_id_seq FROM admin;
GRANT ALL ON SEQUENCE stdjrnlitem_stdjrnlitem_id_seq TO admin;
GRANT ALL ON SEQUENCE stdjrnlitem_stdjrnlitem_id_seq TO xtrole;


--
-- TOC entry 10252 (class 0 OID 0)
-- Dependencies: 799
-- Name: subaccnt; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE subaccnt FROM PUBLIC;
REVOKE ALL ON TABLE subaccnt FROM admin;
GRANT ALL ON TABLE subaccnt TO admin;
GRANT ALL ON TABLE subaccnt TO xtrole;


--
-- TOC entry 10254 (class 0 OID 0)
-- Dependencies: 800
-- Name: subaccnt_subaccnt_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE subaccnt_subaccnt_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE subaccnt_subaccnt_id_seq FROM admin;
GRANT ALL ON SEQUENCE subaccnt_subaccnt_id_seq TO admin;
GRANT ALL ON SEQUENCE subaccnt_subaccnt_id_seq TO xtrole;


--
-- TOC entry 10256 (class 0 OID 0)
-- Dependencies: 801
-- Name: subaccnttype; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE subaccnttype FROM PUBLIC;
REVOKE ALL ON TABLE subaccnttype FROM admin;
GRANT ALL ON TABLE subaccnttype TO admin;
GRANT ALL ON TABLE subaccnttype TO xtrole;


--
-- TOC entry 10258 (class 0 OID 0)
-- Dependencies: 802
-- Name: subaccnttype_subaccnttype_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE subaccnttype_subaccnttype_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE subaccnttype_subaccnttype_id_seq FROM admin;
GRANT ALL ON SEQUENCE subaccnttype_subaccnttype_id_seq TO admin;
GRANT ALL ON SEQUENCE subaccnttype_subaccnttype_id_seq TO xtrole;


--
-- TOC entry 10259 (class 0 OID 0)
-- Dependencies: 803
-- Name: tax_tax_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE tax_tax_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE tax_tax_id_seq FROM admin;
GRANT ALL ON SEQUENCE tax_tax_id_seq TO admin;
GRANT ALL ON SEQUENCE tax_tax_id_seq TO xtrole;


--
-- TOC entry 10264 (class 0 OID 0)
-- Dependencies: 804
-- Name: taxass; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE taxass FROM PUBLIC;
REVOKE ALL ON TABLE taxass FROM admin;
GRANT ALL ON TABLE taxass TO admin;
GRANT ALL ON TABLE taxass TO xtrole;


--
-- TOC entry 10266 (class 0 OID 0)
-- Dependencies: 805
-- Name: taxass_taxass_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE taxass_taxass_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE taxass_taxass_id_seq FROM admin;
GRANT ALL ON SEQUENCE taxass_taxass_id_seq TO admin;
GRANT ALL ON SEQUENCE taxass_taxass_id_seq TO xtrole;


--
-- TOC entry 10268 (class 0 OID 0)
-- Dependencies: 806
-- Name: taxauth_taxauth_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE taxauth_taxauth_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE taxauth_taxauth_id_seq FROM admin;
GRANT ALL ON SEQUENCE taxauth_taxauth_id_seq TO admin;
GRANT ALL ON SEQUENCE taxauth_taxauth_id_seq TO xtrole;


--
-- TOC entry 10274 (class 0 OID 0)
-- Dependencies: 807
-- Name: taxclass; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE taxclass FROM PUBLIC;
REVOKE ALL ON TABLE taxclass FROM admin;
GRANT ALL ON TABLE taxclass TO admin;
GRANT ALL ON TABLE taxclass TO xtrole;


--
-- TOC entry 10276 (class 0 OID 0)
-- Dependencies: 808
-- Name: taxclass_taxclass_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE taxclass_taxclass_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE taxclass_taxclass_id_seq FROM admin;
GRANT ALL ON SEQUENCE taxclass_taxclass_id_seq TO admin;
GRANT ALL ON SEQUENCE taxclass_taxclass_id_seq TO xtrole;


--
-- TOC entry 10278 (class 0 OID 0)
-- Dependencies: 378
-- Name: taxhist_taxhist_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE taxhist_taxhist_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE taxhist_taxhist_id_seq FROM admin;
GRANT ALL ON SEQUENCE taxhist_taxhist_id_seq TO admin;
GRANT ALL ON SEQUENCE taxhist_taxhist_id_seq TO xtrole;


--
-- TOC entry 10287 (class 0 OID 0)
-- Dependencies: 809
-- Name: taxrate; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE taxrate FROM PUBLIC;
REVOKE ALL ON TABLE taxrate FROM admin;
GRANT ALL ON TABLE taxrate TO admin;
GRANT ALL ON TABLE taxrate TO xtrole;


--
-- TOC entry 10289 (class 0 OID 0)
-- Dependencies: 810
-- Name: taxrate_taxrate_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE taxrate_taxrate_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE taxrate_taxrate_id_seq FROM admin;
GRANT ALL ON SEQUENCE taxrate_taxrate_id_seq TO admin;
GRANT ALL ON SEQUENCE taxrate_taxrate_id_seq TO xtrole;


--
-- TOC entry 10291 (class 0 OID 0)
-- Dependencies: 811
-- Name: taxreg_taxreg_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE taxreg_taxreg_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE taxreg_taxreg_id_seq FROM admin;
GRANT ALL ON SEQUENCE taxreg_taxreg_id_seq TO admin;
GRANT ALL ON SEQUENCE taxreg_taxreg_id_seq TO xtrole;


--
-- TOC entry 10293 (class 0 OID 0)
-- Dependencies: 812
-- Name: taxtype_taxtype_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE taxtype_taxtype_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE taxtype_taxtype_id_seq FROM admin;
GRANT ALL ON SEQUENCE taxtype_taxtype_id_seq TO admin;
GRANT ALL ON SEQUENCE taxtype_taxtype_id_seq TO xtrole;


--
-- TOC entry 10295 (class 0 OID 0)
-- Dependencies: 813
-- Name: taxzone_taxzone_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE taxzone_taxzone_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE taxzone_taxzone_id_seq FROM admin;
GRANT ALL ON SEQUENCE taxzone_taxzone_id_seq TO admin;
GRANT ALL ON SEQUENCE taxzone_taxzone_id_seq TO xtrole;


--
-- TOC entry 10296 (class 0 OID 0)
-- Dependencies: 814
-- Name: terms_terms_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE terms_terms_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE terms_terms_id_seq FROM admin;
GRANT ALL ON SEQUENCE terms_terms_id_seq TO admin;
GRANT ALL ON SEQUENCE terms_terms_id_seq TO xtrole;


--
-- TOC entry 10298 (class 0 OID 0)
-- Dependencies: 815
-- Name: todoitem_todoitem_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE todoitem_todoitem_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE todoitem_todoitem_id_seq FROM admin;
GRANT ALL ON SEQUENCE todoitem_todoitem_id_seq TO admin;
GRANT ALL ON SEQUENCE todoitem_todoitem_id_seq TO xtrole;


--
-- TOC entry 10299 (class 0 OID 0)
-- Dependencies: 816
-- Name: trgthist; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE trgthist FROM PUBLIC;
REVOKE ALL ON TABLE trgthist FROM admin;
GRANT ALL ON TABLE trgthist TO admin;
GRANT ALL ON TABLE trgthist TO xtrole;


--
-- TOC entry 10301 (class 0 OID 0)
-- Dependencies: 817
-- Name: trialbal; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE trialbal FROM PUBLIC;
REVOKE ALL ON TABLE trialbal FROM admin;
GRANT ALL ON TABLE trialbal TO admin;
GRANT ALL ON TABLE trialbal TO xtrole;


--
-- TOC entry 10303 (class 0 OID 0)
-- Dependencies: 818
-- Name: trialbal_trialbal_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE trialbal_trialbal_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE trialbal_trialbal_id_seq FROM admin;
GRANT ALL ON SEQUENCE trialbal_trialbal_id_seq TO admin;
GRANT ALL ON SEQUENCE trialbal_trialbal_id_seq TO xtrole;


--
-- TOC entry 10305 (class 0 OID 0)
-- Dependencies: 819
-- Name: uom_uom_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE uom_uom_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE uom_uom_id_seq FROM admin;
GRANT ALL ON SEQUENCE uom_uom_id_seq TO admin;
GRANT ALL ON SEQUENCE uom_uom_id_seq TO xtrole;


--
-- TOC entry 10307 (class 0 OID 0)
-- Dependencies: 820
-- Name: uomconv; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE uomconv FROM PUBLIC;
REVOKE ALL ON TABLE uomconv FROM admin;
GRANT ALL ON TABLE uomconv TO admin;
GRANT ALL ON TABLE uomconv TO xtrole;


--
-- TOC entry 10309 (class 0 OID 0)
-- Dependencies: 821
-- Name: uomconv_uomconv_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE uomconv_uomconv_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE uomconv_uomconv_id_seq FROM admin;
GRANT ALL ON SEQUENCE uomconv_uomconv_id_seq TO admin;
GRANT ALL ON SEQUENCE uomconv_uomconv_id_seq TO xtrole;


--
-- TOC entry 10311 (class 0 OID 0)
-- Dependencies: 822
-- Name: uomtype; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE uomtype FROM PUBLIC;
REVOKE ALL ON TABLE uomtype FROM admin;
GRANT ALL ON TABLE uomtype TO admin;
GRANT ALL ON TABLE uomtype TO xtrole;


--
-- TOC entry 10313 (class 0 OID 0)
-- Dependencies: 823
-- Name: uomtype_uomtype_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE uomtype_uomtype_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE uomtype_uomtype_id_seq FROM admin;
GRANT ALL ON SEQUENCE uomtype_uomtype_id_seq TO admin;
GRANT ALL ON SEQUENCE uomtype_uomtype_id_seq TO xtrole;


--
-- TOC entry 10315 (class 0 OID 0)
-- Dependencies: 824
-- Name: urlinfo_url_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE urlinfo_url_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE urlinfo_url_id_seq FROM admin;
GRANT ALL ON SEQUENCE urlinfo_url_id_seq TO admin;
GRANT ALL ON SEQUENCE urlinfo_url_id_seq TO xtrole;


--
-- TOC entry 10317 (class 0 OID 0)
-- Dependencies: 825
-- Name: usrpref; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE usrpref FROM PUBLIC;
REVOKE ALL ON TABLE usrpref FROM admin;
GRANT ALL ON TABLE usrpref TO admin;
GRANT ALL ON TABLE usrpref TO xtrole;


--
-- TOC entry 10318 (class 0 OID 0)
-- Dependencies: 826
-- Name: usr; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE usr FROM PUBLIC;
REVOKE ALL ON TABLE usr FROM admin;
GRANT ALL ON TABLE usr TO admin;
GRANT ALL ON TABLE usr TO xtrole;


--
-- TOC entry 10320 (class 0 OID 0)
-- Dependencies: 827
-- Name: usr_bak; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE usr_bak FROM PUBLIC;
REVOKE ALL ON TABLE usr_bak FROM admin;
GRANT ALL ON TABLE usr_bak TO admin;
GRANT ALL ON TABLE usr_bak TO xtrole;


--
-- TOC entry 10321 (class 0 OID 0)
-- Dependencies: 828
-- Name: usr_usr_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE usr_usr_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE usr_usr_id_seq FROM admin;
GRANT ALL ON SEQUENCE usr_usr_id_seq TO admin;
GRANT ALL ON SEQUENCE usr_usr_id_seq TO xtrole;


--
-- TOC entry 10323 (class 0 OID 0)
-- Dependencies: 829
-- Name: usrgrp_usrgrp_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE usrgrp_usrgrp_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE usrgrp_usrgrp_id_seq FROM admin;
GRANT ALL ON SEQUENCE usrgrp_usrgrp_id_seq TO admin;
GRANT ALL ON SEQUENCE usrgrp_usrgrp_id_seq TO xtrole;


--
-- TOC entry 10324 (class 0 OID 0)
-- Dependencies: 830
-- Name: usrpref_usrpref_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE usrpref_usrpref_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE usrpref_usrpref_id_seq FROM admin;
GRANT ALL ON SEQUENCE usrpref_usrpref_id_seq TO admin;
GRANT ALL ON SEQUENCE usrpref_usrpref_id_seq TO xtrole;


--
-- TOC entry 10325 (class 0 OID 0)
-- Dependencies: 831
-- Name: usrpriv_usrpriv_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE usrpriv_usrpriv_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE usrpriv_usrpriv_id_seq FROM admin;
GRANT ALL ON SEQUENCE usrpriv_usrpriv_id_seq TO admin;
GRANT ALL ON SEQUENCE usrpriv_usrpriv_id_seq TO xtrole;


--
-- TOC entry 10326 (class 0 OID 0)
-- Dependencies: 832
-- Name: vend; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE vend FROM PUBLIC;
REVOKE ALL ON TABLE vend FROM admin;
GRANT ALL ON TABLE vend TO admin;
GRANT SELECT,INSERT,REFERENCES,DELETE,TRIGGER,UPDATE ON TABLE vend TO xtrole;


--
-- TOC entry 10327 (class 0 OID 0)
-- Dependencies: 833
-- Name: vend_vend_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE vend_vend_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE vend_vend_id_seq FROM admin;
GRANT ALL ON SEQUENCE vend_vend_id_seq TO admin;
GRANT ALL ON SEQUENCE vend_vend_id_seq TO xtrole;


--
-- TOC entry 10328 (class 0 OID 0)
-- Dependencies: 834
-- Name: vendaddr; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE vendaddr FROM PUBLIC;
REVOKE ALL ON TABLE vendaddr FROM admin;
GRANT ALL ON TABLE vendaddr TO admin;
GRANT ALL ON TABLE vendaddr TO xtrole;


--
-- TOC entry 10329 (class 0 OID 0)
-- Dependencies: 835
-- Name: vendaddr_vendaddr_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE vendaddr_vendaddr_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE vendaddr_vendaddr_id_seq FROM admin;
GRANT ALL ON SEQUENCE vendaddr_vendaddr_id_seq TO admin;
GRANT ALL ON SEQUENCE vendaddr_vendaddr_id_seq TO xtrole;


--
-- TOC entry 10331 (class 0 OID 0)
-- Dependencies: 836
-- Name: vendtype_vendtype_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE vendtype_vendtype_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE vendtype_vendtype_id_seq FROM admin;
GRANT ALL ON SEQUENCE vendtype_vendtype_id_seq TO admin;
GRANT ALL ON SEQUENCE vendtype_vendtype_id_seq TO xtrole;


--
-- TOC entry 10333 (class 0 OID 0)
-- Dependencies: 837
-- Name: vodist; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE vodist FROM PUBLIC;
REVOKE ALL ON TABLE vodist FROM admin;
GRANT ALL ON TABLE vodist TO admin;
GRANT ALL ON TABLE vodist TO xtrole;


--
-- TOC entry 10334 (class 0 OID 0)
-- Dependencies: 838
-- Name: vodist_vodist_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE vodist_vodist_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE vodist_vodist_id_seq FROM admin;
GRANT ALL ON SEQUENCE vodist_vodist_id_seq TO admin;
GRANT ALL ON SEQUENCE vodist_vodist_id_seq TO xtrole;


--
-- TOC entry 10336 (class 0 OID 0)
-- Dependencies: 839
-- Name: vohead; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE vohead FROM PUBLIC;
REVOKE ALL ON TABLE vohead FROM admin;
GRANT ALL ON TABLE vohead TO admin;
GRANT ALL ON TABLE vohead TO xtrole;


--
-- TOC entry 10337 (class 0 OID 0)
-- Dependencies: 840
-- Name: vohead_vohead_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE vohead_vohead_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE vohead_vohead_id_seq FROM admin;
GRANT ALL ON SEQUENCE vohead_vohead_id_seq TO admin;
GRANT ALL ON SEQUENCE vohead_vohead_id_seq TO xtrole;


--
-- TOC entry 10338 (class 0 OID 0)
-- Dependencies: 841
-- Name: voheadtax; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE voheadtax FROM PUBLIC;
REVOKE ALL ON TABLE voheadtax FROM admin;
GRANT ALL ON TABLE voheadtax TO admin;
GRANT ALL ON TABLE voheadtax TO xtrole;


--
-- TOC entry 10340 (class 0 OID 0)
-- Dependencies: 842
-- Name: voitem; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE voitem FROM PUBLIC;
REVOKE ALL ON TABLE voitem FROM admin;
GRANT ALL ON TABLE voitem TO admin;
GRANT ALL ON TABLE voitem TO xtrole;


--
-- TOC entry 10341 (class 0 OID 0)
-- Dependencies: 843
-- Name: voitem_voitem_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE voitem_voitem_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE voitem_voitem_id_seq FROM admin;
GRANT ALL ON SEQUENCE voitem_voitem_id_seq TO admin;
GRANT ALL ON SEQUENCE voitem_voitem_id_seq TO xtrole;


--
-- TOC entry 10342 (class 0 OID 0)
-- Dependencies: 844
-- Name: voitemtax; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE voitemtax FROM PUBLIC;
REVOKE ALL ON TABLE voitemtax FROM admin;
GRANT ALL ON TABLE voitemtax TO admin;
GRANT ALL ON TABLE voitemtax TO xtrole;


--
-- TOC entry 10343 (class 0 OID 0)
-- Dependencies: 845
-- Name: warehous; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE warehous FROM PUBLIC;
REVOKE ALL ON TABLE warehous FROM admin;
GRANT ALL ON TABLE warehous TO admin;
GRANT ALL ON TABLE warehous TO xtrole;


--
-- TOC entry 10344 (class 0 OID 0)
-- Dependencies: 846
-- Name: warehous_warehous_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE warehous_warehous_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE warehous_warehous_id_seq FROM admin;
GRANT ALL ON SEQUENCE warehous_warehous_id_seq TO admin;
GRANT ALL ON SEQUENCE warehous_warehous_id_seq TO xtrole;


--
-- TOC entry 10346 (class 0 OID 0)
-- Dependencies: 847
-- Name: whsezone_whsezone_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE whsezone_whsezone_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE whsezone_whsezone_id_seq FROM admin;
GRANT ALL ON SEQUENCE whsezone_whsezone_id_seq TO admin;
GRANT ALL ON SEQUENCE whsezone_whsezone_id_seq TO xtrole;


--
-- TOC entry 10347 (class 0 OID 0)
-- Dependencies: 848
-- Name: wo_wo_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE wo_wo_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE wo_wo_id_seq FROM admin;
GRANT ALL ON SEQUENCE wo_wo_id_seq TO admin;
GRANT ALL ON SEQUENCE wo_wo_id_seq TO xtrole;


--
-- TOC entry 10348 (class 0 OID 0)
-- Dependencies: 849
-- Name: womatl_womatl_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE womatl_womatl_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE womatl_womatl_id_seq FROM admin;
GRANT ALL ON SEQUENCE womatl_womatl_id_seq TO admin;
GRANT ALL ON SEQUENCE womatl_womatl_id_seq TO xtrole;


--
-- TOC entry 10350 (class 0 OID 0)
-- Dependencies: 850
-- Name: womatlpost; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE womatlpost FROM PUBLIC;
REVOKE ALL ON TABLE womatlpost FROM admin;
GRANT ALL ON TABLE womatlpost TO admin;
GRANT ALL ON TABLE womatlpost TO xtrole;


--
-- TOC entry 10352 (class 0 OID 0)
-- Dependencies: 851
-- Name: womatlpost_womatlpost_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE womatlpost_womatlpost_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE womatlpost_womatlpost_id_seq FROM admin;
GRANT ALL ON SEQUENCE womatlpost_womatlpost_id_seq TO admin;
GRANT ALL ON SEQUENCE womatlpost_womatlpost_id_seq TO xtrole;


--
-- TOC entry 10355 (class 0 OID 0)
-- Dependencies: 852
-- Name: womatlvar; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE womatlvar FROM PUBLIC;
REVOKE ALL ON TABLE womatlvar FROM admin;
GRANT ALL ON TABLE womatlvar TO admin;
GRANT ALL ON TABLE womatlvar TO xtrole;


--
-- TOC entry 10356 (class 0 OID 0)
-- Dependencies: 853
-- Name: womatlvar_womatlvar_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE womatlvar_womatlvar_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE womatlvar_womatlvar_id_seq FROM admin;
GRANT ALL ON SEQUENCE womatlvar_womatlvar_id_seq TO admin;
GRANT ALL ON SEQUENCE womatlvar_womatlvar_id_seq TO xtrole;


--
-- TOC entry 10357 (class 0 OID 0)
-- Dependencies: 854
-- Name: xcalitem_xcalitem_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE xcalitem_xcalitem_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE xcalitem_xcalitem_id_seq FROM admin;
GRANT ALL ON SEQUENCE xcalitem_xcalitem_id_seq TO admin;
GRANT ALL ON SEQUENCE xcalitem_xcalitem_id_seq TO xtrole;


--
-- TOC entry 10359 (class 0 OID 0)
-- Dependencies: 855
-- Name: xsltmap; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE xsltmap FROM PUBLIC;
REVOKE ALL ON TABLE xsltmap FROM admin;
GRANT ALL ON TABLE xsltmap TO admin;
GRANT ALL ON TABLE xsltmap TO xtrole;


--
-- TOC entry 10361 (class 0 OID 0)
-- Dependencies: 856
-- Name: xsltmap_xsltmap_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE xsltmap_xsltmap_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE xsltmap_xsltmap_id_seq FROM admin;
GRANT ALL ON SEQUENCE xsltmap_xsltmap_id_seq TO admin;
GRANT ALL ON SEQUENCE xsltmap_xsltmap_id_seq TO xtrole;


--
-- TOC entry 10363 (class 0 OID 0)
-- Dependencies: 857
-- Name: yearperiod; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON TABLE yearperiod FROM PUBLIC;
REVOKE ALL ON TABLE yearperiod FROM admin;
GRANT ALL ON TABLE yearperiod TO admin;
GRANT ALL ON TABLE yearperiod TO xtrole;


--
-- TOC entry 10365 (class 0 OID 0)
-- Dependencies: 858
-- Name: yearperiod_yearperiod_id_seq; Type: ACL; Schema: public; Owner: admin
--

REVOKE ALL ON SEQUENCE yearperiod_yearperiod_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE yearperiod_yearperiod_id_seq FROM admin;
GRANT ALL ON SEQUENCE yearperiod_yearperiod_id_seq TO admin;
GRANT ALL ON SEQUENCE yearperiod_yearperiod_id_seq TO xtrole;



--
-- TOC entry 10366 (class 0 OID 0)
-- Dependencies: 859
-- Name: pkgcmd; Type: ACL; Schema: te; Owner: admin
--

REVOKE ALL ON TABLE pkgcmd FROM PUBLIC;
REVOKE ALL ON TABLE pkgcmd FROM admin;
GRANT ALL ON TABLE pkgcmd TO admin;
GRANT ALL ON TABLE pkgcmd TO xtrole;


--
-- TOC entry 10367 (class 0 OID 0)
-- Dependencies: 860
-- Name: pkgcmdarg; Type: ACL; Schema: te; Owner: admin
--

REVOKE ALL ON TABLE pkgcmdarg FROM PUBLIC;
REVOKE ALL ON TABLE pkgcmdarg FROM admin;
GRANT ALL ON TABLE pkgcmdarg TO admin;
GRANT ALL ON TABLE pkgcmdarg TO xtrole;


--
-- TOC entry 10368 (class 0 OID 0)
-- Dependencies: 861
-- Name: pkgimage; Type: ACL; Schema: te; Owner: admin
--

REVOKE ALL ON TABLE pkgimage FROM PUBLIC;
REVOKE ALL ON TABLE pkgimage FROM admin;
GRANT ALL ON TABLE pkgimage TO admin;
GRANT ALL ON TABLE pkgimage TO xtrole;


--
-- TOC entry 10369 (class 0 OID 0)
-- Dependencies: 862
-- Name: pkgmetasql; Type: ACL; Schema: te; Owner: admin
--

REVOKE ALL ON TABLE pkgmetasql FROM PUBLIC;
REVOKE ALL ON TABLE pkgmetasql FROM admin;
GRANT ALL ON TABLE pkgmetasql TO admin;
GRANT ALL ON TABLE pkgmetasql TO xtrole;


--
-- TOC entry 10370 (class 0 OID 0)
-- Dependencies: 863
-- Name: pkgpriv; Type: ACL; Schema: te; Owner: admin
--

REVOKE ALL ON TABLE pkgpriv FROM PUBLIC;
REVOKE ALL ON TABLE pkgpriv FROM admin;
GRANT ALL ON TABLE pkgpriv TO admin;
GRANT ALL ON TABLE pkgpriv TO xtrole;


--
-- TOC entry 10371 (class 0 OID 0)
-- Dependencies: 864
-- Name: pkgreport; Type: ACL; Schema: te; Owner: admin
--

REVOKE ALL ON TABLE pkgreport FROM PUBLIC;
REVOKE ALL ON TABLE pkgreport FROM admin;
GRANT ALL ON TABLE pkgreport TO admin;
GRANT ALL ON TABLE pkgreport TO xtrole;


--
-- TOC entry 10372 (class 0 OID 0)
-- Dependencies: 865
-- Name: pkgscript; Type: ACL; Schema: te; Owner: admin
--

REVOKE ALL ON TABLE pkgscript FROM PUBLIC;
REVOKE ALL ON TABLE pkgscript FROM admin;
GRANT ALL ON TABLE pkgscript TO admin;
GRANT ALL ON TABLE pkgscript TO xtrole;


--
-- TOC entry 10373 (class 0 OID 0)
-- Dependencies: 866
-- Name: pkguiform; Type: ACL; Schema: te; Owner: admin
--

REVOKE ALL ON TABLE pkguiform FROM PUBLIC;
REVOKE ALL ON TABLE pkguiform FROM admin;
GRANT ALL ON TABLE pkguiform TO admin;
GRANT ALL ON TABLE pkguiform TO xtrole;


--
-- TOC entry 10375 (class 0 OID 0)
-- Dependencies: 867
-- Name: tecustrate; Type: ACL; Schema: te; Owner: admin
--

REVOKE ALL ON TABLE tecustrate FROM PUBLIC;
REVOKE ALL ON TABLE tecustrate FROM admin;
GRANT ALL ON TABLE tecustrate TO admin;
GRANT ALL ON TABLE tecustrate TO xtrole;


--
-- TOC entry 10377 (class 0 OID 0)
-- Dependencies: 869
-- Name: teemp; Type: ACL; Schema: te; Owner: admin
--

REVOKE ALL ON TABLE teemp FROM PUBLIC;
REVOKE ALL ON TABLE teemp FROM admin;
GRANT ALL ON TABLE teemp TO admin;
GRANT ALL ON TABLE teemp TO xtrole;


--
-- TOC entry 10379 (class 0 OID 0)
-- Dependencies: 870
-- Name: teemp_teemp_id_seq; Type: ACL; Schema: te; Owner: admin
--

REVOKE ALL ON SEQUENCE teemp_teemp_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE teemp_teemp_id_seq FROM admin;
GRANT ALL ON SEQUENCE teemp_teemp_id_seq TO admin;
GRANT ALL ON SEQUENCE teemp_teemp_id_seq TO xtrole;


--
-- TOC entry 10381 (class 0 OID 0)
-- Dependencies: 871
-- Name: teexp; Type: ACL; Schema: te; Owner: admin
--

REVOKE ALL ON TABLE teexp FROM PUBLIC;
REVOKE ALL ON TABLE teexp FROM admin;
GRANT ALL ON TABLE teexp TO admin;
GRANT ALL ON TABLE teexp TO xtrole;


--
-- TOC entry 10382 (class 0 OID 0)
-- Dependencies: 872
-- Name: timesheet_seq; Type: ACL; Schema: te; Owner: admin
--

REVOKE ALL ON SEQUENCE timesheet_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE timesheet_seq FROM admin;
GRANT ALL ON SEQUENCE timesheet_seq TO admin;
GRANT ALL ON SEQUENCE timesheet_seq TO xtrole;


--
-- TOC entry 10384 (class 0 OID 0)
-- Dependencies: 873
-- Name: tehead; Type: ACL; Schema: te; Owner: admin
--

REVOKE ALL ON TABLE tehead FROM PUBLIC;
REVOKE ALL ON TABLE tehead FROM admin;
GRANT ALL ON TABLE tehead TO admin;
GRANT ALL ON TABLE tehead TO xtrole;


--
-- TOC entry 10386 (class 0 OID 0)
-- Dependencies: 874
-- Name: tehead_tehead_id_seq; Type: ACL; Schema: te; Owner: admin
--

REVOKE ALL ON SEQUENCE tehead_tehead_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE tehead_tehead_id_seq FROM admin;
GRANT ALL ON SEQUENCE tehead_tehead_id_seq TO admin;
GRANT ALL ON SEQUENCE tehead_tehead_id_seq TO xtrole;


--
-- TOC entry 10391 (class 0 OID 0)
-- Dependencies: 875
-- Name: teitem; Type: ACL; Schema: te; Owner: admin
--

REVOKE ALL ON TABLE teitem FROM PUBLIC;
REVOKE ALL ON TABLE teitem FROM admin;
GRANT ALL ON TABLE teitem TO admin;
GRANT ALL ON TABLE teitem TO xtrole;


--
-- TOC entry 10393 (class 0 OID 0)
-- Dependencies: 876
-- Name: teitem_teitem_id_seq; Type: ACL; Schema: te; Owner: admin
--

REVOKE ALL ON SEQUENCE teitem_teitem_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE teitem_teitem_id_seq FROM admin;
GRANT ALL ON SEQUENCE teitem_teitem_id_seq TO admin;
GRANT ALL ON SEQUENCE teitem_teitem_id_seq TO xtrole;


--
-- TOC entry 10395 (class 0 OID 0)
-- Dependencies: 877
-- Name: teprj; Type: ACL; Schema: te; Owner: admin
--

REVOKE ALL ON TABLE teprj FROM PUBLIC;
REVOKE ALL ON TABLE teprj FROM admin;
GRANT ALL ON TABLE teprj TO admin;
GRANT ALL ON TABLE teprj TO xtrole;


--
-- TOC entry 10397 (class 0 OID 0)
-- Dependencies: 878
-- Name: teprj_teprj_id_seq; Type: ACL; Schema: te; Owner: admin
--

REVOKE ALL ON SEQUENCE teprj_teprj_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE teprj_teprj_id_seq FROM admin;
GRANT ALL ON SEQUENCE teprj_teprj_id_seq TO admin;
GRANT ALL ON SEQUENCE teprj_teprj_id_seq TO xtrole;


--
-- TOC entry 10399 (class 0 OID 0)
-- Dependencies: 879
-- Name: teprjtask; Type: ACL; Schema: te; Owner: admin
--

REVOKE ALL ON TABLE teprjtask FROM PUBLIC;
REVOKE ALL ON TABLE teprjtask FROM admin;
GRANT ALL ON TABLE teprjtask TO admin;
GRANT ALL ON TABLE teprjtask TO xtrole;


--
-- TOC entry 10401 (class 0 OID 0)
-- Dependencies: 880
-- Name: teprjtask_teprjtask_id_seq; Type: ACL; Schema: te; Owner: admin
--

REVOKE ALL ON SEQUENCE teprjtask_teprjtask_id_seq FROM PUBLIC;
REVOKE ALL ON SEQUENCE teprjtask_teprjtask_id_seq FROM admin;
GRANT ALL ON SEQUENCE teprjtask_teprjtask_id_seq TO admin;
GRANT ALL ON SEQUENCE teprjtask_teprjtask_id_seq TO xtrole;



--
-- TOC entry 10402 (class 0 OID 0)
-- Dependencies: 881
-- Name: pkgcmd; Type: ACL; Schema: xtdesktop; Owner: admin
--

REVOKE ALL ON TABLE pkgcmd FROM PUBLIC;
REVOKE ALL ON TABLE pkgcmd FROM admin;
GRANT ALL ON TABLE pkgcmd TO admin;
GRANT ALL ON TABLE pkgcmd TO xtrole;


--
-- TOC entry 10403 (class 0 OID 0)
-- Dependencies: 882
-- Name: pkgcmdarg; Type: ACL; Schema: xtdesktop; Owner: admin
--

REVOKE ALL ON TABLE pkgcmdarg FROM PUBLIC;
REVOKE ALL ON TABLE pkgcmdarg FROM admin;
GRANT ALL ON TABLE pkgcmdarg TO admin;
GRANT ALL ON TABLE pkgcmdarg TO xtrole;


--
-- TOC entry 10404 (class 0 OID 0)
-- Dependencies: 883
-- Name: pkgimage; Type: ACL; Schema: xtdesktop; Owner: admin
--

REVOKE ALL ON TABLE pkgimage FROM PUBLIC;
REVOKE ALL ON TABLE pkgimage FROM admin;
GRANT ALL ON TABLE pkgimage TO admin;
GRANT ALL ON TABLE pkgimage TO xtrole;


--
-- TOC entry 10405 (class 0 OID 0)
-- Dependencies: 884
-- Name: pkgmetasql; Type: ACL; Schema: xtdesktop; Owner: admin
--

REVOKE ALL ON TABLE pkgmetasql FROM PUBLIC;
REVOKE ALL ON TABLE pkgmetasql FROM admin;
GRANT ALL ON TABLE pkgmetasql TO admin;
GRANT ALL ON TABLE pkgmetasql TO xtrole;


--
-- TOC entry 10406 (class 0 OID 0)
-- Dependencies: 885
-- Name: pkgpriv; Type: ACL; Schema: xtdesktop; Owner: admin
--

REVOKE ALL ON TABLE pkgpriv FROM PUBLIC;
REVOKE ALL ON TABLE pkgpriv FROM admin;
GRANT ALL ON TABLE pkgpriv TO admin;
GRANT ALL ON TABLE pkgpriv TO xtrole;


--
-- TOC entry 10407 (class 0 OID 0)
-- Dependencies: 886
-- Name: pkgreport; Type: ACL; Schema: xtdesktop; Owner: admin
--

REVOKE ALL ON TABLE pkgreport FROM PUBLIC;
REVOKE ALL ON TABLE pkgreport FROM admin;
GRANT ALL ON TABLE pkgreport TO admin;
GRANT ALL ON TABLE pkgreport TO xtrole;


--
-- TOC entry 10408 (class 0 OID 0)
-- Dependencies: 887
-- Name: pkgscript; Type: ACL; Schema: xtdesktop; Owner: admin
--

REVOKE ALL ON TABLE pkgscript FROM PUBLIC;
REVOKE ALL ON TABLE pkgscript FROM admin;
GRANT ALL ON TABLE pkgscript TO admin;
GRANT ALL ON TABLE pkgscript TO xtrole;


--
-- TOC entry 10409 (class 0 OID 0)
-- Dependencies: 888
-- Name: pkguiform; Type: ACL; Schema: xtdesktop; Owner: admin
--

REVOKE ALL ON TABLE pkguiform FROM PUBLIC;
REVOKE ALL ON TABLE pkguiform FROM admin;
GRANT ALL ON TABLE pkguiform TO admin;
GRANT ALL ON TABLE pkguiform TO xtrole;


-- Completed on 2014-03-27 11:30:55 EDT

--
--

