We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents af13984 + e01ffe2 commit 3bf66a3Copy full SHA for 3bf66a3
multifile/tables/orders.sql
@@ -5,8 +5,7 @@
5
CREATE TABLE IF NOT EXISTS orders (
6
id integer PRIMARY KEY,
7
user_id integer NOT NULL REFERENCES users(id),
8
- status text DEFAULT 'pending' NOT NULL CHECK (status IN ('pending', 'completed')),
9
- amount numeric(10,2) DEFAULT 0.00
+ status text DEFAULT 'pending' NOT NULL CHECK (status IN ('pending', 'completed'))
10
);
11
12
COMMENT ON TABLE orders IS 'Customer orders';
multifile/tables/users.sql
@@ -5,7 +5,8 @@
CREATE TABLE IF NOT EXISTS users (
email text NOT NULL CHECK (email LIKE '%@%'),
- name text NOT NULL
+ name text NOT NULL,
+ age integer CHECK (age >= 0)
COMMENT ON TABLE users IS 'User accounts';
0 commit comments