Ignore GORM tag in certain databases for testing?

Viewed 23

I'm using GORM to define my db model (MySQL).

Status string db:"status" gorm:"type:enum('enabled','disabled')"

I want to create a testing database using SQLite, which does not support enums. I don't care if they're not enums in the testing database, but they should be enums in the transactional one.

When I try to use GORM to set up the testing database, it fails.

Is there a way to ignore the "type" for testing?

0 Answers
Related