31 lines
1.1 KiB
Go
31 lines
1.1 KiB
Go
package system
|
|
|
|
import (
|
|
"kra/internal/data/migration"
|
|
|
|
"gorm.io/gorm"
|
|
)
|
|
|
|
// Migrations returns schema steps owned by the built-in system module.
|
|
// Administrators, menus, APIs, and policies are created only by SeedSystem
|
|
// during the explicit first-install flow.
|
|
func Migrations() []migration.Step {
|
|
return []migration.Step{
|
|
{
|
|
ID: "202608200002_system_schema",
|
|
Migrate: func(db *gorm.DB) error {
|
|
return db.AutoMigrate(
|
|
&userPO{}, &authorityPO{}, &menuPO{}, &userAuthorityPO{}, &authorityMenuPO{}, &menuParameterPO{},
|
|
&apiPO{}, &ignoredAPIPO{}, &authorityAPIPO{}, &casbinRulePO{}, &menuButtonPO{}, &authorityButtonPO{},
|
|
&departmentPO{}, &positionPO{}, &userDepartmentPO{}, &userPositionPO{}, &authorityDepartmentPO{},
|
|
&dictionaryPO{}, &dictionaryDetailPO{}, ¶meterPO{}, &apiTokenPO{}, &jwtBlacklistPO{}, &SecurityConfigPO{},
|
|
&versionPO{}, &exportTemplatePO{}, &exportConditionPO{}, &exportJoinPO{},
|
|
&operationPO{}, &loginLogPO{}, &dataAccessLogPO{}, &errorRecordPO{},
|
|
&taskPO{}, &taskLogPO{}, &mediaPO{}, &categoryPO{}, &uploadSessionPO{}, &uploadChunkPO{},
|
|
&announcementPO{},
|
|
)
|
|
},
|
|
},
|
|
}
|
|
}
|