1 DROP TABLE IF EXISTS word;
2 CREATE TABLE word_icu (
4 word_token text NOT NULL,
7 ) {{db.tablespace.search_data}};
9 CREATE INDEX idx_word_word_token ON word
10 USING BTREE (word_token) {{db.tablespace.search_index}};
11 -- Used when updating country names from the boundary relation.
12 CREATE INDEX idx_word_country_names ON word
13 USING btree((info->>'cc')) {{db.tablespace.address_index}}
15 -- Used when inserting new postcodes on updates.
16 CREATE INDEX idx_word_postcodes ON word
17 USING btree((info->>'postcode')) {{db.tablespace.address_index}}
19 GRANT SELECT ON word TO "{{config.DATABASE_WEBUSER}}";
21 DROP SEQUENCE IF EXISTS seq_word;
22 CREATE SEQUENCE seq_word start 1;
23 GRANT SELECT ON seq_word to "{{config.DATABASE_WEBUSER}}";