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

Create team.js #596

Closed
wants to merge 11 commits into from
Closed

Create team.js #596

wants to merge 11 commits into from

Conversation

arpit9667
Copy link
Member

Description

Added model for the Team

Issue

Closes #547

Impacted Area

Main page

Steps to test

Steps needed to reproduce the scenario from this change to validate if the pull request solve this issue

  • Create a team containing the users.

Copy link
Member

@alexanmtz alexanmtz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@arpit9667, thanks for the Pull Request. This is not enough to set up the models in a Node application using equalize, you need to create a migration.

You need to do something like:
sequelize migration:generate --name name-of-your-migration

Check our current migrations to see how it works

@alexanmtz
Copy link
Member

Great @arpit9667, but we have an issue when run the migration:
https://circleci.com/gh/worknenjoy/gitpay/1403?utm_campaign=vcs-integration-link&utm_medium=referral&utm_source=github-checks-link

Unhandled rejection SequelizeBaseError: column "TeamId" does not exist

@arpit9667
Copy link
Member Author

@alexanmtz How to run the migration? I have created the migration for Team but the table is not getting created in the database.
migraion
model

`

@alexanmtz
Copy link
Member

@arpit9667 you can run the migration with npm run migrate

@arpit9667
Copy link
Member Author

arpit9667 commented May 6, 2020

@alexanmtz
The last two migration files are not running.
== One for the Plans Table
== One for the Teams Table
I think this is the problem. Can you check please?
Locally Also when I try to run the npm run migrate command. The two tables are not getting created in the database.
Screenshot from 2020-05-06 18-03-36

@alexanmtz
Copy link
Member

@arpit9667 , if you run the migration already, you would need to drop the database and create again to run from scratch

@alexanmtz
Copy link
Member

@arpit9667, there's changes on Plan model that should not be included.

Maybe you're not in sync with the upstream master.

@arpit9667
Copy link
Member Author

arpit9667 commented May 10, 2020

@alexanmtz Yes, that was the problem. Now I have pulled all the changes for the master. Also I have implemented the Team model with the migrations that are needed. But, why is there a change for package-lock.json? Please help me with that.

@alexanmtz
Copy link
Member

Thanks for the update @arpit9667, but it seems that makes sense the user be able to join many teams

@alexanmtz
Copy link
Member

@arpit9667 yeah, the package-lock.json should not be included on the commit, because there's no new library installed, you should commit only the files required for this PR, otherwise, we may have conflict when merging.

You can maybe check the file from master (needs to be an updated master) with git checkout master -- package-lock.json (I think, please research about it).

@alexanmtz alexanmtz closed this Feb 6, 2023
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.

A model for teams
2 participants