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

Update web container to include migrations #2234

Merged
merged 1 commit into from Apr 7, 2023
Merged

Conversation

AbdBarho
Copy link
Collaborator

@AbdBarho AbdBarho commented Mar 26, 2023

Follow up to #2233

  • update website container to include migrations
  • remove outdated prisma container
  • update other containers for better layer caching.

This PR contains no behavioural changes.

More context:

We started using prisma db push to sync our web db prisma schema with the db, with the intention of moving to migrations soon™, but we never did this because we never needed it.

Now I wanted to add a new table to the database and realized that the infrastructure for something like this is not in place.

I created an initial migration from the already available db scheme, to be able to deploy this without losing any data, we would need to force prisma to mark this migration as applied.

The command is as follows:

npx prisma migrate resolve --applied 20230326131923_initial_migration

This PR prepare the web docker container to have migrations as a first class citizen.

@AbdBarho AbdBarho marked this pull request as ready for review March 26, 2023 20:22
Copy link
Collaborator

@yk yk left a comment

Choose a reason for hiding this comment

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

thank you!

@AbdBarho AbdBarho merged commit 59a9fe1 into main Apr 7, 2023
4 checks passed
@AbdBarho AbdBarho deleted the website-db-docker branch April 7, 2023 17:43
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.

None yet

3 participants