-
Notifications
You must be signed in to change notification settings - Fork 0
Database Schema
clintonhill edited this page Feb 21, 2021
·
14 revisions
Column Name | Data Type | Details |
---|---|---|
id | integer | not null, primary key |
varchar(50) | not null, indexed, unique | |
first_name | varchar(50) | not null |
last_name | varchar(50) | not null |
image_url | text | |
location | text | |
hashed_password | string | not null |
created_at | datetime | not null |
updated_at | datetime | not null |
Column Name | Data Type | Details |
---|---|---|
id | integer | not null, primary key |
user_id | integer | foreign key, not null |
group_id | integer | foreign key, not null |
-
user_id
belongs toUsers
table -
group_id
belongs toGroups
table
Column Name | Data Type | Details |
---|---|---|
id | integer | not null, primary key |
owner_id | integer | not null, foreign key |
name | varchar(50) | not null, unique |
description | text | |
location | text | |
image_url | text | |
is_private | boolean | default=false |
created_at | datetime | not null |
updated_at | datetime | not null |
-
owner_id
belongs toUsers
table
Column Name | Data Type | Details |
---|---|---|
id | integer | not null, primary key |
user_id | integer | foreign key, not null |
group_id | integer | foreign key, not null |
-
user_id
belongs toUsers
table -
group_id
belongs toGroups
table
Column Name | Data Type | Details |
---|---|---|
id | integer | not null, primary key |
user_id | integer | foreign key, not null |
event_id | integer | foreign key, not null |
-
user_id
belongs toUsers
table -
event_id
belongs toEvents
table
Column Name | Data Type | Details |
---|---|---|
id | integer | not null, primary key |
owner_id | integer | foreign key, not null |
group_id | integer | foreign key, not null |
details | text | |
location | text | |
date | datetime | |
capacity | int | not null |
image_url | text | |
created_at | datetime | not null |
updated_at | datetime | not null |
-
owner_id
belongs toUsers
table -
group_id
belongs toGroups
table
Column Name | Data Type | Details |
---|---|---|
id | integer | not null, primary key |
name | varchar(30) | not null, indexed |
Column Name | Data Type | Details |
---|---|---|
id | integer | not null, primary key |
tag_id | integer | not null, foreign key |
event_id | integer | not null, foreign key |
-
tag_id
belongs toTags
table -
event_id
belongs toEvents
table