-- YugabyteDb supports `IF NOT EXISTS` syntax when creating indexes.
-- If an index already exists with the same name, it will not be duplicated.
-- However, you should still review your pre-existing indexes in advance
-- to make sure you do not already have one or more of the same indexes
-- defined under a different name. If so, you should omit them
-- from what you apply to your YugabyteDb database.

CREATE INDEX IF NOT EXISTS idxaq4nfb0ac3mb9jfvhq7esbf3u ON blc_account(parent_account_id);
CREATE INDEX IF NOT EXISTS idxt2wawci3wq9c03mxd0xaq8969 ON blc_account(account_number);
CREATE INDEX IF NOT EXISTS idxm4v1aqt549rg1au26am021m0a ON blc_account(account_type);
CREATE INDEX IF NOT EXISTS fka4yqo28ciwwo698ivs0f5xse6_idx ON blc_account_address(account_id);
CREATE INDEX IF NOT EXISTS idxqls1xd45v2lighnure7f2xcvn ON blc_account_member(account_id);
CREATE INDEX IF NOT EXISTS idxk6nwx0iif1h9515pj7cyrkwuh ON blc_account_member(customer_id);
CREATE INDEX IF NOT EXISTS fk3e6k080umedbp5cwhv62fmv7h_idx ON blc_account_member(account_role_id);
CREATE INDEX IF NOT EXISTS idx1dtycn2ghiti29sfnukr1fhkp ON blc_account_role(parent_role_id);
CREATE INDEX IF NOT EXISTS idxosj785tkew6sxuw6sd26k70qk ON blc_application_catalog(context_id);
CREATE INDEX IF NOT EXISTS idxlj2n3wdt6u930s8c5g28hh0yr ON blc_application_catalog(application_id);
CREATE INDEX IF NOT EXISTS idxqcoclx51ptbiptbbxdpqy0xq4 ON blc_customer(username);
CREATE INDEX IF NOT EXISTS idx66mylf4gry9e50x69vdvyu87d ON blc_customer(email);
CREATE INDEX IF NOT EXISTS idx4b9qfwt20ach2epcpbl2952vl ON blc_customer(full_name);
CREATE INDEX IF NOT EXISTS idx89hxuai742wket4am7aenxqdu ON blc_customer(external_id);
CREATE INDEX IF NOT EXISTS idx85gn5tbh2i8f91eyucmqqnp8h ON blc_customer_address(customer_id);
CREATE INDEX IF NOT EXISTS idxn5nl3dh9kot8wrj1y8qpa28k3 ON blc_customer_note(customer_id);
CREATE INDEX IF NOT EXISTS idxfwegnbbhxeb50p8n27drct6aj ON blc_customer_segment(segment_type);
CREATE INDEX IF NOT EXISTS idxj9bkikf2vunbhnefc82d1t8x7 ON blc_customer_segment(is_active);
CREATE INDEX IF NOT EXISTS idx7i0i5vcl1dkkwuq5dyc88wem5 ON blc_notification_state(acked);
CREATE INDEX IF NOT EXISTS idxgfaqe3xmq5q4yh78mix1g04fy ON blc_notification_state(container);
CREATE INDEX IF NOT EXISTS idxouj8fxn51anm4yikudhh99e7d ON blc_payment_account(customer_id);
CREATE INDEX IF NOT EXISTS idxkm4y3qj3jh2mpt0rt6l6vscl8 ON blc_resource_lock(token);
CREATE INDEX IF NOT EXISTS idx9q6vbvvney5vj1385p6xv3a2x ON blc_segment_bulk_process(cust_segment_ctx_id);
CREATE INDEX IF NOT EXISTS idxqekyf3k1l38w8frm8reisped6 ON blc_segment_bulk_process(bulk_update_ctx_id);
CREATE INDEX IF NOT EXISTS idxe0514p14hvwc63yg200jkw1c0 ON blc_segment_member(customer_segment_id);
CREATE INDEX IF NOT EXISTS fkq6ll4w0sgrewpws1031ylaatx_idx ON blc_segment_member(customer_id);
CREATE INDEX IF NOT EXISTS fknrrfr5ufbo3bo33tplxlc3jk1_idx ON blc_account_role_account_permission_xref(account_role_id);
CREATE INDEX IF NOT EXISTS fktimu1r2ek1wy6nrvk25bs04l5_idx ON blc_account_role_account_permission_xref(account_permission_id);
CREATE INDEX IF NOT EXISTS idxosrmtlej61uxhx0yiwpb2rcrv ON blc_notification_state(acked, stopped, notification_name, change_timestamp, next_attempt);
