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

dialect/sql/schema: init db version before executing diff #2440

Merged
merged 1 commit into from Apr 6, 2022

Commits on Apr 1, 2022

  1. init db version before executing diff

    What's the problem: Under versioned migration on MySQL 8.0, unique string field would be generated as type varchar(191) instead of varchar(255). This is because in generating migration files by NamedDiff(), sqlDialect's init() method is not called. 
    
    Further concern: For init() function, MySQL and Postgres's implementation checks the database version which is what I want. But SQLite's implementation checks the foreign_keys support. So I think there might be a better may to check the database version before doing Diff().
    CharlesGe129 committed Apr 1, 2022
    Configuration menu
    Copy the full SHA
    9604d25 View commit details
    Browse the repository at this point in the history