Skip to content
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

Merged
merged 2 commits into from
Mar 29, 2024

Conversation

SpartanDeBoss
Copy link
Collaborator

…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

  • I have performed a self-review of my own code
  • I have followed the name conventions for CSS Classnames and filenames, Components names and filenames, Style filenames, if you are in doubt check the the project README.MD and here https://github.com/HackYourFuture-CPH/curriculum/blob/master/review/review-checklist.md
  • I have commented my code, particularly in hard-to-understand areas, if you code was simple enough mark the box anyway
  • I have made corresponding changes to the documentation, if you code was simple enough mark the box anyway
  • This PR is ready to be merged and not breaking any other functionality

Copy link
Member

@DanJecu DanJecu left a 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) => {
Copy link
Member

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) => {
Copy link
Member

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.

Copy link
Collaborator

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.

Copy link
Member

@DanJecu DanJecu Mar 24, 2024

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 ?

@orhantoy orhantoy requested a review from a team March 26, 2024 12:17
@@ -0,0 +1,28 @@
// const mysql = require('mysql');
Copy link
Contributor

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?

Copy link
Collaborator Author

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

@SpartanDeBoss SpartanDeBoss merged commit 1301294 into main Mar 29, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants