You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
420 B
19 lines
420 B
2 months ago
|
package tenant
|
||
|
|
||
|
import (
|
||
|
"ims/app/models"
|
||
|
|
||
|
"github.com/go-gormigrate/gormigrate/v2"
|
||
|
"gorm.io/gorm"
|
||
|
)
|
||
|
|
||
|
var m202409291240_02_initialize_districts = gormigrate.Migration{
|
||
|
ID: "202409291240_02_initialize_districts",
|
||
|
Migrate: func(tx *gorm.DB) error {
|
||
|
return models.InstallDistricts(tx)
|
||
|
},
|
||
|
Rollback: func(tx *gorm.DB) error {
|
||
|
return tx.Exec("TRUNCATE TABLE " + tx.NamingStrategy.TableName("district")).Error
|
||
|
},
|
||
|
}
|