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.
ims/database/tenant/202409291240_01_initialize_...

49 lines
1.1 KiB

package tenant
import (
"ims/app/models"
"github.com/go-gormigrate/gormigrate/v2"
"gorm.io/gorm"
)
var m202409291240_01_initialize_database = gormigrate.Migration{
ID: "202409291240_01_initialize_database",
Migrate: func(tx *gorm.DB) error {
return tx.AutoMigrate(
&models.Address{},
&models.Certification{},
&models.Customer{},
&models.CustomerTrack{},
&models.Department{},
&models.DistributionPlan{},
&models.District{},
&models.Employee{},
&models.File{},
&models.Inbound{},
&models.InboundItem{},
&models.Linkman{},
&models.Material{},
&models.Outbound{},
&models.OutboundItem{},
&models.PaymentPlan{},
&models.Product{},
&models.ProductCategory{},
&models.PurchaseAudit{},
&models.PurchaseExecution{},
&models.PurchaseOrder{},
&models.PurchaseProduct{},
&models.PurchaseRequisition{},
&models.Remittance{},
&models.Supplier{},
&models.SupplyPrice{},
&models.Tag{},
&models.Warehouse{},
&models.WarehouseLocation{},
)
},
Rollback: func(tx *gorm.DB) error {
//return tx.Migrator().DropTable("credit_cards")
return nil
},
}