Add table inflections
This commit is contained in:
parent
b09972a08c
commit
d4528c971e
2 changed files with 10 additions and 0 deletions
1
20230305163159_inflections.down.sql
Normal file
1
20230305163159_inflections.down.sql
Normal file
|
@ -0,0 +1 @@
|
|||
DROP TABLE inflections;
|
9
20230305163159_inflections.up.sql
Normal file
9
20230305163159_inflections.up.sql
Normal file
|
@ -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))
|
||||
);
|
Loading…
Reference in a new issue