Database Schema - NoahNim/eventsonly GitHub Wiki

Database

users

column name data type details
id integer not null, primary key
name string(30) not null
email string(250) not null, unique
firstName string(250) not null, unique
lastName string(250) not null, unique
biography text nullable
profilePhoto string(7000) nullable
photo string(7000) nullable
hashedPassword string.binary not null
created_at datetime not null
updated_at datetime not null

events

column name data type details
id integer not null, primary key
name string(255) not null
description text nullable
date date not null
eventPhoto string(7000) not null
userId integer not null, foreignKey
created_at datetime not null
updated_at datetime not null

comments

column name data type details
id integer not null, primary key
content text(2000) not null
userId integer not null, foreignKey
eventId integer not null, foreignKey
created_at datetime not null
updated_at datetime not null

rsvp

column name data type details
id integer not null, primary key
userId integer not null, foreignKey
eventId integer not null, foreignKey
created_at datetime not null
updated_at datetime not null

Note To Future Self on RSVP Table

RSVP Table has a Many to One relationship with events and users. RSVP belongs to Users, Users has many RSVP's. RSVP's belongs to events, Events has many RSVP's.