-
Notifications
You must be signed in to change notification settings - Fork 0
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
Updated Knex version and added migrations directory for managing data… #1
Conversation
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.
It looks good, good job 👏.
I'm leaving some small comments 👀
* @returns { Promise<void> } | ||
*/ | ||
exports.up = function (knex) { | ||
return knex.schema.createTable('Teams', (table) => { |
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.
I will not use uppercase letter for table names. It's generally recommended to use lowercase letters for table names to ensure consistency and compatibility across different environments and database systems.
* @returns { Promise<void> } | ||
*/ | ||
exports.up = function (knex) { | ||
return knex.schema.hasTable('TeamMembers').then((exists) => { |
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 you guys really need this table? Maybe employees
table could have another column.
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.
The purpose of this TeamMembers table is to keep records of the team members, as well as to make it easy to record if one person becomes a part of a different team in the future.
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.
Ok, I understand now.
Maybe you guys need to add some foreign keys here as well 🤔
What do you think @nishadipri @SpartanDeBoss ?
@@ -0,0 +1,28 @@ | |||
// const mysql = require('mysql'); |
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.
Why is all of this being commented out? Is the file needed or not?
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.
Why is all of this being commented out? Is the file needed or not?
I was supposed to delete that, but unfortunately, I forgot it and then pushed it. @orhantoy
…base schema changes
Description
Please provide a short summary explaining what this PR is about.
Fixes # (issue)
How to test?
Please provide a short summary how your changes can be tested?
Checklist