Skip to content

Custom migrations table name#1475

Closed
sergeiivankov wants to merge 2 commits intoSeaQL:masterfrom
sergeiivankov:custom-migrations-table-name
Closed

Custom migrations table name#1475
sergeiivankov wants to merge 2 commits intoSeaQL:masterfrom
sergeiivankov:custom-migrations-table-name

Conversation

@sergeiivankov
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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