File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 7171CREATE TABLE IF NOT EXISTS users (
7272 id integer PRIMARY KEY ,
7373 email text NOT NULL CHECK (email LIKE ' %@%' ),
74- name text NOT NULL
74+ name text NOT NULL ,
75+ age integer CHECK (age >= 0 )
7576);
7677
7778COMMENT ON TABLE users IS ' User accounts' ;
@@ -117,8 +118,7 @@ CREATE OR REPLACE TRIGGER users_update_trigger
117118CREATE TABLE IF NOT EXISTS orders (
118119 id integer PRIMARY KEY ,
119120 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
121+ status text DEFAULT ' pending' NOT NULL CHECK (status IN (' pending' , ' completed' ))
122122);
123123
124124COMMENT ON TABLE orders IS ' Customer orders' ;
You can’t perform that action at this time.
0 commit comments