Skip to content

Instantly share code, notes, and snippets.

@shrinivdeshmukh
Created May 31, 2021 15:23
Show Gist options
  • Save shrinivdeshmukh/e6a1dc5405a3cc5e8c94033ad8b78466 to your computer and use it in GitHub Desktop.
Save shrinivdeshmukh/e6a1dc5405a3cc5e8c94033ad8b78466 to your computer and use it in GitHub Desktop.
tables:
user:
columns:
- name: user_id
type: integer
primary_key: true
- name: firstname
type: varchar
length: 20
- name: lastname
type: varchar
length: 20
- name: dob
type: date
- name: contact
type: numeric
nullable: false
unique: true
- name: address
type: varchar
length: 300 # Column length changed from 200 to 300
order:
columns:
- name: order_id
type: integer
primary_key: true
- name: hotel_name
type: varchar
length: 100
- name: order_date
type: date
- name: amount
type: float
- name: user_id
type: integer
foreign_key: user.user_id
# We add a new table called restaurant here
restaurant:
columns:
- name: restaurant_id
type: integer
primary_key: true
- name: restaurant_name
type: varchar
length: 50
- name: address
type: varchar
length: 300
- name: minimum_order_amount
type: float
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment