Search before asking
What happened
The Asana plugin migration 20250212_add_task_transformation_fields uses gorm:"type:double" on the StoryPoint field. PostgreSQL does not have a double type (it uses double precision), so the migration fails with:
ERROR: type "double" does not exist (SQLSTATE 42704)
The failing DDL:
ALTER TABLE "_tool_asana_tasks" ALTER COLUMN "story_point" TYPE double USING "story_point"::double
What do you expect to happen
The migration should use a database-agnostic type. Removing the explicit gorm:"type:double" tag and letting GORM infer the type from *float64 would work correctly on both MySQL and PostgreSQL.
How to reproduce
- Configure DevLake v1.0.3-beta10 with a PostgreSQL backend (
DB_URL=postgres://...)
- Trigger database migration via
/proceed-db-migration
- Migration fails on the Asana plugin step
Anything else
The same class of bug was fixed for the copilot plugin's datetime type in #8779. This is the same pattern: a MySQL-specific type in a GORM struct tag that breaks PostgreSQL.
Affected file: backend/plugins/asana/models/migrationscripts/20250212_add_task_transformation_fields.go:35
StoryPoint *float64 `gorm:"type:double"`
Fix: Remove the explicit type tag:
GORM will infer double precision on PostgreSQL and double on MySQL.
Workaround: Create a PostgreSQL domain alias before running migrations:
CREATE DOMAIN double AS double precision;
Version
v1.0.3-beta10
Search before asking
What happened
The Asana plugin migration
20250212_add_task_transformation_fieldsusesgorm:"type:double"on theStoryPointfield. PostgreSQL does not have adoubletype (it usesdouble precision), so the migration fails with:The failing DDL:
What do you expect to happen
The migration should use a database-agnostic type. Removing the explicit
gorm:"type:double"tag and letting GORM infer the type from*float64would work correctly on both MySQL and PostgreSQL.How to reproduce
DB_URL=postgres://...)/proceed-db-migrationAnything else
The same class of bug was fixed for the copilot plugin's
datetimetype in #8779. This is the same pattern: a MySQL-specific type in a GORM struct tag that breaks PostgreSQL.Affected file:
backend/plugins/asana/models/migrationscripts/20250212_add_task_transformation_fields.go:35Fix: Remove the explicit type tag:
GORM will infer
double precisionon PostgreSQL anddoubleon MySQL.Workaround: Create a PostgreSQL domain alias before running migrations:
Version
v1.0.3-beta10