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

Custom migrations table name #1475

Closed
wants to merge 2 commits into from
Closed

Custom migrations table name #1475

wants to merge 2 commits into from

Conversation

sergeiivankov
Copy link
Contributor

PR Info

New Features

  • By enabling sea-orm-migration crate feature custom-migrations-table-name user can set migrations table name to SEA_ORM_MIGRATIONS_TABLE_NAME environment variable and crate will use it name

Breaking Changes

  • No breaking changes

Changes

  • New functional under feature, had to expand migration entity structure to be able dynamic change table name

Copy link
Member

@billy1624 billy1624 left a comment

Choose a reason for hiding this comment

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

Hey @sergeiivankov, thanks for contributing!!

I think it's not ideal to override the migration table name with environment variable. It should be part of "migrator" and should be configured once and for all.

Inspired by your work, I just draft a PR, please check #1511 and let me know your thought :)

@sergeiivankov
Copy link
Contributor Author

Hi @billy1624. I agree with you about my solution, I'm still not very good at navigating in sea-orm codebase to implement a more elegant solution. Your solution is great for me. I test it in my project, it work fine. Looking forward to being included in the next release. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

[FR] Change migrations table name
2 participants