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

chore(migrations): squash migrations #176

Merged
merged 3 commits into from
Jul 20, 2024
Merged

chore(migrations): squash migrations #176

merged 3 commits into from
Jul 20, 2024

Conversation

timDeHof
Copy link
Contributor

@timDeHof timDeHof commented Jul 15, 2024

Description

This PR squashes all previous migrations into one.

Issue link

86b15t5bm

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • Feature updates / changes
  • Tests
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • I have updated the change log

Useful links

squash migrations wiki page
How to squash migrations in prisma
postgres Docs: pgdump

timDeHof added 2 commits July 15, 2024 19:26
…es and foreign key constraints

This commit adds the initial migration file that creates all the necessary tables and foreign key constraints for the database schema. The migration file includes the creation of tables such as "FormType", "Form", "Question", "InputType", "OptionGroup", "OptionChoice", "Response", and many others. It also includes the creation of unique indexes and foreign key constraints between the tables.

The purpose of this commit is to set up the initial database schema and structure for the application. This migration file will be used to create the necessary tables and establish the relationships between them.
@timDeHof timDeHof self-assigned this Jul 15, 2024
The migration files have been squashed into one to improve maintainability and reduce clutter in the project. This change helps to keep the project organized and makes it easier to manage the database migrations.
Copy link
Contributor

@cherylli cherylli left a comment

Choose a reason for hiding this comment

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

I tested both cases mentioned above and both were fine.

Copy link
Contributor

@JoshuaHinman JoshuaHinman left a comment

Choose a reason for hiding this comment

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

I migrated and seeded the DB, ran all tests - looks good! I have one question about the instructions in the wiki: where do you execute the pg_dump command? It wasn't recognized when i tried it. Do you have to be on the postgres CL?

@timDeHof
Copy link
Contributor Author

I migrated and seeded the DB, ran all tests - looks good! I have one question about the instructions in the wiki: where do you execute the pg_dump command? It wasn't recognized when i tried it. Do you have to be on the postgres CL?

Glad that you were able migrate and the DB too. the pg_dump command can be run in the terminal. But some searching I found that some people were having issues with the command not being found. So I will work on making that step clearer and include the command to use it in docker.

@timDeHof
Copy link
Contributor Author

I'm going ahead and merge this branch into dev since now its just editing the wiki page.

@timDeHof timDeHof merged commit e0b06cc into dev Jul 20, 2024
1 check passed
@timDeHof timDeHof deleted the chore/squash_migrations branch July 20, 2024 17:06
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.

3 participants