feat: 建立商品颜色映射数据模型 (#293)
This commit is contained in:
@@ -1282,6 +1282,28 @@ func TestMySQLMigrate_V28升级V29修复原始SKU排序规则(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestMySQLMigrate_V29升级V30建立商品颜色映射与审计(t *testing.T) {
|
||||
db := openMySQLMigrationTestDB(t)
|
||||
defer db.Close()
|
||||
cleanMySQLTestSchema(t, db)
|
||||
defer cleanMySQLTestSchema(t, db)
|
||||
if err := MigrateMySQL(db); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
mustExec(t, db, `DROP TABLE product_color_mapping_audits`)
|
||||
mustExec(t, db, `DROP TABLE product_color_mappings`)
|
||||
mustExec(t, db, `DELETE FROM schema_migrations WHERE version=30`)
|
||||
if err := MigrateMySQL(db); err != nil {
|
||||
t.Fatalf("v29 升级 v30 失败: %v", err)
|
||||
}
|
||||
if err := MigrateMySQL(db); err != nil {
|
||||
t.Fatalf("v30 重复迁移失败: %v", err)
|
||||
}
|
||||
if err := checkMySQLV30Shape(db); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
}
|
||||
|
||||
func TestUpsertInnerCodeImportRow_软删除记录按状态安全恢复(t *testing.T) {
|
||||
db := openMySQLMigrationTestDB(t)
|
||||
defer db.Close()
|
||||
|
||||
Reference in New Issue
Block a user