fix(migrations): remove hard-coded bigint types for postgres#8934
fix(migrations): remove hard-coded bigint types for postgres#8934bujjibabukatta wants to merge 1 commit into
Conversation
|
Are you using the project with all these plugins you are submitting PRs to? |
|
@klesh I use DevLake with Postgres, and while I haven't personally set up Testmo or Q Dev specifically. I came across this issue #8867 and the fix was straightforward and removing the hardcoded dialect-specific types so GORM handles it correctly across databases. Happy to test it further if there's a specific scenario you'd like validated.Thanks |
|
Please make sure to test this before submitting. Just a quick reminder regarding the migration scripts: we shouldn't modify existing ones. Think of migrations as moving forward in time—altering past scripts breaks the sequence and can cause deployment issues. If we need changes, we should always roll forward with a new script! |
Fixes #8867.
Updated the Testmo and Q Dev scope_config_id migrations to avoid hard-coded BIGINT SQL type declarations in GORM tags. The migrations continue using migrationhelper.AutoMigrateTables, but now allow GORM to generate dialect-compatible column definitions for both MySQL and PostgreSQL.
Validated with git diff --check and targeted searches for the previous BIGINT UNSIGNED/raw ALTER TABLE patterns.