jiangshuai
2023-11-03 68200e7e7ac1cfd021b8b37a92b7ab8eb11c759e
models/db.go
@@ -72,7 +72,22 @@
func RegisterTables() error {
   db := mysqlx.GetDB()
   err := db.AutoMigrate()
   err := db.AutoMigrate(
      Company{},
      Warehouse{},
      OperationType{},
      Location{},
      OperationType{},
      Operation{},
      OperationDetails{},
      Scrap{},
      MoveHistory{},
      //Product{},
      ProductCategory{},
      Material{},
      LocationProduct{},
      LocationProductAmount{},
   )
   return err
}
@@ -83,6 +98,7 @@
func InsertDefaultData() {
   models := []interface{}{
      NewDepartmentSearch(),
      NewLocationSearch(),
   }
   for _, model := range models {
      if id, ok := model.(InitDefaultData); ok {