Skip to content

Commit

Permalink
fix(tables-schema): add missing fields to tables
Browse files Browse the repository at this point in the history
- add food_image column to menu table
- add unique constraint on email column in users table

[Fixes #160876037]
  • Loading branch information
akhilome committed Sep 30, 2018
1 parent 5b50008 commit 0bffac8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion server/db/schema.sql
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
CREATE TABLE IF NOT EXISTS users (
id serial PRIMARY KEY,
name VARCHAR(50) NOT NULL,
email VARCHAR(50) NOT NULL,
email VARCHAR(50) UNIQUE NOT NULL,
password VARCHAR(255) NOT NULL,
is_admin BOOLEAN NOT NULL
);

CREATE TABLE IF NOT EXISTS menu (
id serial PRIMARY KEY,
food_name VARCHAR(255) NOT NULL,
food_image VARCHAR(255) NOT NULL DEFAULT 'https://i.imgur.com/yRLsidK.jpg',
price REAL NOT NULL
);

Expand Down

0 comments on commit 0bffac8

Please sign in to comment.