-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat/club events' schema #213
base: master
Are you sure you want to change the base?
Conversation
server/db/schema/clubs.schema.ts
Outdated
clubMembers: many(clubMembers), | ||
clubSocials: many(clubSocials), | ||
clubEvents: many(events), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clubMembers: many(clubMembers), | |
clubSocials: many(clubSocials), | |
clubEvents: many(events), | |
clubEvents: many(events), | |
clubMembers: many(clubMembers), | |
clubSocials: many(clubSocials), |
This is alphabetically ordered
server/db/schema/events.schema.ts
Outdated
description: varchar('description', { length: 512 }), | ||
startDate: timestamp('date').notNull(), | ||
endDate: timestamp('date').notNull(), | ||
clubId: integer('club_id') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this is a event specific to a club, name the table club_events
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
An event may or may not be related to a club, such as a convocation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then make the club_id
nullable.
server/db/schema/index.ts
Outdated
@@ -20,3 +20,4 @@ export * from './sponsored-research-projects.schema'; | |||
export * from './staff.schema'; | |||
export * from './student-academic-details.schema'; | |||
export * from './students.schema'; | |||
export * from './events.schema'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file is also alphabetically ordered. And in light of the previous comment, this would be club-events.schema
server/db/schema/clubs.schema.ts
Outdated
howToJoinUs: varchar('how_to_join_us').notNull(), | ||
whyToJoinUs: varchar('why_to_join_us').notNull(), | ||
notifications: varchar('notifications') | ||
.array() | ||
.default(sql`'{}'`), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do this in a different PR please
No description provided.