_make_record(_item): Zahlenattribute nicht mit leeren Strings setzen
[kivitendo-erp.git] / sql / Pg-upgrade2 / trigram_indices.sql
1 -- @tag: trigram_indices
2 -- @description: Trigram Indizes für häufig durchsuchte Spalten
3 -- @depends: release_3_5_0 trigram_extension
4
5 CREATE INDEX customer_customernumber_gin_trgm_idx    ON customer        USING gin (customernumber          gin_trgm_ops);
6 CREATE INDEX customer_name_gin_trgm_idx              ON customer        USING gin (name                    gin_trgm_ops);
7
8 CREATE INDEX vendor_vendornumber_gin_trgm_idx        ON vendor          USING gin (vendornumber            gin_trgm_ops);
9 CREATE INDEX vendor_name_gin_trgm_idx                ON vendor          USING gin (name                    gin_trgm_ops);
10
11 CREATE INDEX parts_partnumber_gin_trgm_idx           ON parts           USING gin (partnumber              gin_trgm_ops);
12 CREATE INDEX parts_description_gin_trgm_idx          ON parts           USING gin (description             gin_trgm_ops);
13
14 CREATE INDEX oe_ordnumber_gin_trgm_idx               ON oe              USING gin (ordnumber               gin_trgm_ops);
15 CREATE INDEX oe_quonumber_gin_trgm_idx               ON oe              USING gin (quonumber               gin_trgm_ops);
16 CREATE INDEX oe_cusordnumber_gin_trgm_idx            ON oe              USING gin (cusordnumber            gin_trgm_ops);
17 CREATE INDEX oe_transaction_description_gin_trgm_idx ON oe              USING gin (transaction_description gin_trgm_ops);
18
19 CREATE INDEX do_donumber_gin_trgm_idx                ON delivery_orders USING gin (donumber                gin_trgm_ops);
20 CREATE INDEX do_ordnumber_gin_trgm_idx               ON delivery_orders USING gin (ordnumber               gin_trgm_ops);
21 CREATE INDEX do_cusordnumber_gin_trgm_idx            ON delivery_orders USING gin (cusordnumber            gin_trgm_ops);
22 CREATE INDEX do_transaction_description_gin_trgm_idx ON delivery_orders USING gin (transaction_description gin_trgm_ops);
23
24 CREATE INDEX ar_invnumber_gin_trgm_idx               ON ar              USING gin (invnumber               gin_trgm_ops);
25 CREATE INDEX ar_ordnumber_gin_trgm_idx               ON ar              USING gin (ordnumber               gin_trgm_ops);
26 CREATE INDEX ar_quonumber_gin_trgm_idx               ON ar              USING gin (quonumber               gin_trgm_ops);
27 CREATE INDEX ar_cusordnumber_gin_trgm_idx            ON ar              USING gin (cusordnumber            gin_trgm_ops);
28 CREATE INDEX ar_transaction_description_gin_trgm_idx ON ar              USING gin (transaction_description gin_trgm_ops);
29
30 CREATE INDEX ap_invnumber_gin_trgm_idx               ON ap              USING gin (invnumber               gin_trgm_ops);
31 CREATE INDEX ap_ordnumber_gin_trgm_idx               ON ap              USING gin (ordnumber               gin_trgm_ops);
32 CREATE INDEX ap_quonumber_gin_trgm_idx               ON ap              USING gin (quonumber               gin_trgm_ops);
33 CREATE INDEX ap_transaction_description_gin_trgm_idx ON ap              USING gin (transaction_description gin_trgm_ops);
34
35 CREATE INDEX gl_description_gin_trgm_idx             ON gl              USING gin (description             gin_trgm_ops);
36 CREATE INDEX gl_reference_gin_trgm_idx               ON gl              USING gin (reference               gin_trgm_ops);
37
38 CREATE INDEX orderitems_description_gin_trgm_idx     ON orderitems      USING gin (description             gin_trgm_ops);
39
40 CREATE INDEX doi_description_gin_trgm_idx       ON delivery_order_items USING gin (description             gin_trgm_ops);
41
42 CREATE INDEX invoice_description_gin_trgm_idx        ON invoice         USING gin (description             gin_trgm_ops);