Skip to content

Commit

Permalink
feat(hasura): add unique lowercase value
Browse files Browse the repository at this point in the history
  • Loading branch information
harisato committed Jul 21, 2023
1 parent 6a8a9c2 commit 38b4161
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
-- Could not auto-generate a down migration.
-- Please write an appropriate down migration for the SQL below:
-- DROP TRIGGER IF EXISTS lowercase_tag_lang_value_on_insert ON tag_languages;
--
-- DROP FUNCTION IF EXISTS lowercase_tag_lang_value_on_insert;
--
-- CREATE UNIQUE INDEX IF NOT EXISTS tag_languagues_language_id_lower_value_key
-- ON tag_languages (lower(value), language_id);
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
DROP TRIGGER IF EXISTS lowercase_tag_lang_value_on_insert ON tag_languages;

DROP FUNCTION IF EXISTS lowercase_tag_lang_value_on_insert;

CREATE UNIQUE INDEX IF NOT EXISTS tag_languagues_language_id_lower_value_key
ON tag_languages (lower(value), language_id);

0 comments on commit 38b4161

Please sign in to comment.