We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 7a97462 + a30b8ac commit 8686fd4Copy full SHA for 8686fd4
1 file changed
singlefile/schema.sql
@@ -71,13 +71,12 @@ $$;
71
CREATE TABLE IF NOT EXISTS users (
72
id integer PRIMARY KEY,
73
email text NOT NULL CHECK (email LIKE '%@%'),
74
- name text NOT NULL
+ name text NOT NULL,
75
+ age integer CHECK (age >= 0)
76
);
77
78
COMMENT ON TABLE users IS 'User accounts';
79
-COMMENT ON COLUMN users.email IS 'User email address';
80
-
81
--
82
-- Name: idx_users_email; Type: INDEX; Schema: -; Owner: -
83
@@ -117,7 +116,6 @@ CREATE OR REPLACE TRIGGER users_update_trigger
117
116
CREATE TABLE IF NOT EXISTS orders (
118
119
user_id integer NOT NULL REFERENCES users(id),
120
- status text DEFAULT 'pending' NOT NULL CHECK (status IN ('pending', 'completed')),
121
amount numeric(10,2) DEFAULT 0.00
122
123
0 commit comments