From d4528c971ea61c21e7f202b884d94385de9452a7 Mon Sep 17 00:00:00 2001 From: Alex Kotov Date: Sun, 5 Mar 2023 20:35:32 +0400 Subject: [PATCH] Add table `inflections` --- 20230305163159_inflections.down.sql | 1 + 20230305163159_inflections.up.sql | 9 +++++++++ 2 files changed, 10 insertions(+) create mode 100644 20230305163159_inflections.down.sql create mode 100644 20230305163159_inflections.up.sql diff --git a/20230305163159_inflections.down.sql b/20230305163159_inflections.down.sql new file mode 100644 index 0000000..5eb6628 --- /dev/null +++ b/20230305163159_inflections.down.sql @@ -0,0 +1 @@ +DROP TABLE inflections; diff --git a/20230305163159_inflections.up.sql b/20230305163159_inflections.up.sql new file mode 100644 index 0000000..ac91922 --- /dev/null +++ b/20230305163159_inflections.up.sql @@ -0,0 +1,9 @@ +CREATE TABLE inflections ( +-- name type constraints + id BIGSERIAL PRIMARY KEY, + part_id BIGINT NOT NULL REFERENCES parts (id), + descr VARCHAR NOT NULL, + +-- CONSTRAINT name CHECK (condition) + CONSTRAINT descr_is_sane_text CHECK (is_sane_text(descr)) +);