From 2f47094399a6aabf54d3ef58ace97a6c259e48d3 Mon Sep 17 00:00:00 2001 From: Alex Kotov Date: Sun, 19 Feb 2023 09:14:43 +0400 Subject: [PATCH] Add column `words.inflections` --- 20230219051357_word_inflections.down.sql | 3 +++ 20230219051357_word_inflections.up.sql | 5 +++++ 2 files changed, 8 insertions(+) create mode 100644 20230219051357_word_inflections.down.sql create mode 100644 20230219051357_word_inflections.up.sql diff --git a/20230219051357_word_inflections.down.sql b/20230219051357_word_inflections.down.sql new file mode 100644 index 0000000..f7013c2 --- /dev/null +++ b/20230219051357_word_inflections.down.sql @@ -0,0 +1,3 @@ +BEGIN; +ALTER TABLE words DROP COLUMN inflections; +COMMIT; diff --git a/20230219051357_word_inflections.up.sql b/20230219051357_word_inflections.up.sql new file mode 100644 index 0000000..f086bcc --- /dev/null +++ b/20230219051357_word_inflections.up.sql @@ -0,0 +1,5 @@ +BEGIN; +ALTER TABLE words ADD COLUMN inflections TEXT; +ALTER TABLE words ADD CONSTRAINT inflections_is_sane_text + CHECK (is_sane_text(inflections)); +COMMIT;