Skip to content

DB Schema

Tayon edited this page Aug 20, 2024 · 6 revisions

Database Schema

DB_SCEHMA

Users

column name data type details
id integer not null, primary key
first_name string not null
last_name string not null
email string not null, unique
username string not null, unique
hashed_password string not null
bio text not null
profile_img_url text not null
created_at datetime not null
updated_at datetime not null

Groups

column name data type details
id integer not null, primary key
organizer_id integer not null
name string not null
about text not null
type enum not null
city string not null
state string not null
created_at datetime not null
updated_at datetime not null

Events

column name data type details
id integer not null, primary key
venue_id integer not null
organizer_id integer not null
name string not null
description text not null
type string not null
capacity integer not null
start_date date not null
end_date date not null
created_at datetime not null
updated_at datetime not null

Venues

column name data type details
id integer not null, primary key
group_id integer not null
city string not null
state string not null
latitude decimal not null
longitude decimal not null
created_at datetime not null
updated_at datetime not null

Group_Images

column name data type details
id integer not null, primary key
group_id integer not null
group_image string not null
preview boolean not null
created_at datetime not null
updated_at datetime not null

Event_Images

column name data type details
id integer not null, primary key
event_id integer not null
event_image string not null
preview boolean not null
created_at datetime not null
updated_at datetime not null

Members

column name data type details
id integer not null, primary key
user_id integer not null
group_id integer not null
status enum not null
created_at datetime not null
updated_at datetime not null

Attendance

column name data type details
id integer not null, primary key
user_id integer not null
event_id integer not null
status enum not null
created_at datetime not null
updated_at datetime not null

Posts

column name data type details
id integer not null, primary key
user_id integer not null
title string not null
caption string not null
image string not null
created_at datetime not null
updated_at datetime not null

Comments

column name data type details
id integer not null, primary key
posts_id integer not null
user_id integer not null
message string not null
created_at datetime not null
updated_at datetime not null

Tags

column name data type details
id integer not null, primary key
user_id integer not null
name string not null
created_at datetime not null
updated_at datetime not null

Likes

column name data type details
id integer not null, primary key
posts_id integer not null
user_id integer not null
created_at datetime not null
updated_at datetime not null

Follows

column name data type details
id integer not null, primary key
user_id integer not null
created_at datetime not null
updated_at datetime not null
Clone this wiki locally