mirror of
https://github.com/Rain-kl/OpenFlare.git
synced 2026-10-03 15:06:36 +08:00
[优化] 重构数据库迁移逻辑,整合遗留和Goose迁移处理
This commit is contained in:
@@ -6,11 +6,14 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
legacyDatabaseSchemaVersion = migrate.BaseDatabaseSchemaVersion
|
||||
databaseSchemaVersionRowID = 1
|
||||
legacyDatabaseSchemaVersion = migrate.BaseDatabaseSchemaVersion
|
||||
legacyMigrationTerminalVersion = 17
|
||||
databaseSchemaVersionRowID = 1
|
||||
)
|
||||
|
||||
var currentDatabaseSchemaVersion = migrate.CurrentVersion()
|
||||
// currentDatabaseSchemaVersion tracks the current physical schema validated by the
|
||||
// legacy validator set. Goose owns only post-v17 migrations, and none exist yet.
|
||||
var currentDatabaseSchemaVersion = legacyMigrationTerminalVersion
|
||||
|
||||
type DatabaseSchemaVersion struct {
|
||||
ID uint `json:"id" gorm:"primaryKey"`
|
||||
|
||||
Reference in New Issue
Block a user