Open Shhmabbey opened 1 year ago
Change check in and check out to type date!
Nicely done! Just double check your datatypes and be more specific on what foreign keys reference which tables. Below is a sample to help. Thanks!
users
column name | data type | details |
---|---|---|
id |
bigint | not null, primary key |
email |
string | not null |
password_digest |
string | not null |
session_token |
bigInt | not null, indexed |
email
, unique: true session_token
, unique: true
carts
column name | data type | details |
---|---|---|
id |
bigint | not null, primary key |
user_id |
integer | not null, foreign key |
user_id
, unique: true user_id
foreign key referencing user
table primary key
products
column name | data type | details |
---|---|---|
id |
bigint | not null, primary key |
title |
string | not null |
description |
string | not null |
size |
string | |
style |
string | |
price |
decimal | not null |
stock |
integer | not null |
category_id |
integer | foreign key, indexed |
title
, unique: true category_id
category_id
foreign key referencing categories
table primary key
Database Schema
back_ticked
back_ticked
back_ticked