Created
June 27, 2020 22:14
-
-
Save alyrlee/5e3f4d4b2076040e52c39b53221f502d to your computer and use it in GitHub Desktop.
create.shopping-list.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DROP TYPE IF EXISTS grocery; | |
CREATE TYPE grocery AS ENUM ( | |
'Main', | |
'Snack', | |
'Lunch', | |
'Breakfast' | |
); | |
CREATE TABLE IF NOT EXISTS amazong_products ( | |
id INTEGER PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY, | |
name TEXT NOT NULL, | |
price decimal(12,2) NOT NULL, | |
date_added TIMESTAMP DEFAULT now() NOT NULL, | |
checked BOOLEAN DEFAULT FALSE NOT NULL, | |
category grocery NOT NULL | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment