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

Migrations table name #5

Open
eduardoboucas opened this issue May 9, 2020 · 1 comment
Open

Migrations table name #5

eduardoboucas opened this issue May 9, 2020 · 1 comment

Comments

@eduardoboucas
Copy link

Hi! First of all, thanks for sharing this suite of tools.

Would you be open to allowing the table name used for storing migrations to be customised? This would be useful if you're using Postgres schemas, so that __migrations__ becomes schema1.__migrations__, for example.

Also, when do you typically run migrations? Do you have any experience with automatically running migrations after the function is deployed?

Thanks again!

@marcgreenstock
Copy link
Owner

Hi @eduardoboucas, you're welcome :)

Customizing the migrations table name should be relatively easy to do. Would you like to create a PR?

As for when to run migrations, they can be run before or after the functions are deployed, it all depends on how forwards/backwards compatible you make your migrations/handlers.

I normally run them before the functions are deployed in-case I have added new columns that are expected to exist. However there are cases where you will want to run them after, for instance when dropping a column. Although if you automate deployment and migrations with CI, you may want to deploy in multiple commits to ensure your schema and code are compatible.

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

No branches or pull requests

2 participants