Add constraint method to DatabaseError trait

Override `constraint` method for `PgDatabaseError`.
This commit is contained in:
Florian Hübsch
2021-01-20 09:37:38 +01:00
committed by Ryan Leckey
parent d5e0f1b92b
commit 68cf2f9cdb
4 changed files with 55 additions and 0 deletions

View File

@@ -23,3 +23,9 @@ CREATE TYPE float_range AS RANGE
subtype = float8,
subtype_diff = float8mi
);
CREATE TABLE products (
product_no INTEGER,
name TEXT,
price NUMERIC CHECK (price > 0)
);