Skip to content
This repository was archived by the owner on Dec 14, 2023. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions scripts/database/pg/migrations/018.do.table-indexes.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
DO $$
BEGIN
BEGIN
CREATE INDEX dojos_country ON cd_dojos((country->>'name'));
EXCEPTION WHEN OTHERS THEN
RAISE NOTICE 'table cd_dojos have problem with index creation on column country.';
END;
BEGIN
CREATE INDEX dojos_city ON cd_dojos((city->>'name'));
EXCEPTION WHEN OTHERS THEN
RAISE NOTICE 'table cd_dojos have problem with index creation on column city.';
END;
BEGIN
CREATE INDEX dojos_name ON cd_dojos(name);
EXCEPTION WHEN OTHERS THEN
RAISE NOTICE 'table cd_dojos have problem with index creation on column name.';
END;
END;
$$