1 DROP TABLE IF EXISTS word;
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 -- Used when inserting full words.
20 CREATE INDEX idx_word_full_word ON word
21 USING btree((info->>'word')) {{db.tablespace.address_index}}
24 GRANT SELECT ON word TO "{{config.DATABASE_WEBUSER}}";
26 DROP SEQUENCE IF EXISTS seq_word;
27 CREATE SEQUENCE seq_word start 1;
28 GRANT SELECT ON seq_word to "{{config.DATABASE_WEBUSER}}";