fix: preserve legacy migration lineage
This commit is contained in:
1 parent
f9dc1c561b
commit
cce2d2d399
1 file changed
+3
-2
@@ -11,7 +11,7 @@ import (
|
|||||||
"gorm.io/gorm"
|
"gorm.io/gorm"
|
||||||
)
|
)
|
||||||
|
|
||||||
const CurrentSchemaVersion int64 = 27
|
const CurrentSchemaVersion int64 = 28
|
||||||
|
|
||||||
const baselineSchemaChecksum = "sha256:open-ai-canvas-schema-v1-20260830"
|
const baselineSchemaChecksum = "sha256:open-ai-canvas-schema-v1-20260830"
|
||||||
const schemaMigrationAppliedAtIndexChecksum = "sha256:schema-migrations-applied-at-index-v2-20260830"
|
const schemaMigrationAppliedAtIndexChecksum = "sha256:schema-migrations-applied-at-index-v2-20260830"
|
||||||
@@ -89,10 +89,11 @@ var schemaMigrations = []migration{
|
|||||||
{version: 23, name: "canvas_revision_history", checksum: "sha256:canvas-revision-history-v23-20260918", apply: func(tx *gorm.DB) error {
|
{version: 23, name: "canvas_revision_history", checksum: "sha256:canvas-revision-history-v23-20260918", apply: func(tx *gorm.DB) error {
|
||||||
return tx.AutoMigrate(&model.CanvasProject{}, &model.CanvasSnapshot{}, &model.CanvasSnapshotResource{})
|
return tx.AutoMigrate(&model.CanvasProject{}, &model.CanvasSnapshot{}, &model.CanvasSnapshotResource{})
|
||||||
}},
|
}},
|
||||||
{version: 24, name: "channel_model_label", checksum: "sha256:channel-model-label-v24", apply: migrateChannelModelLabel},
|
{version: 24, name: "channel_model_description", checksum: "sha256:channel-model-description-v24-20260918", apply: migrateChannelModelDescription},
|
||||||
{version: 25, name: "video_token_formula_snapshot", checksum: "sha256:video-token-formula-snapshot-v25", apply: migrateVideoTokenFormulaSnapshot},
|
{version: 25, name: "video_token_formula_snapshot", checksum: "sha256:video-token-formula-snapshot-v25", apply: migrateVideoTokenFormulaSnapshot},
|
||||||
{version: 26, name: "channel_model_description", checksum: "sha256:channel-model-description-v26", apply: migrateChannelModelDescription},
|
{version: 26, name: "channel_model_description", checksum: "sha256:channel-model-description-v26", apply: migrateChannelModelDescription},
|
||||||
{version: 27, name: "channel_credit_cost", checksum: "sha256:channel-credit-cost-v27", apply: migrateChannelCreditCost},
|
{version: 27, name: "channel_credit_cost", checksum: "sha256:channel-credit-cost-v27", apply: migrateChannelCreditCost},
|
||||||
|
{version: 28, name: "channel_model_label", checksum: "sha256:channel-model-label-v28", apply: migrateChannelModelLabel},
|
||||||
}
|
}
|
||||||
|
|
||||||
func migrateChannelCreditCost(tx *gorm.DB) error {
|
func migrateChannelCreditCost(tx *gorm.DB) error {
|
||||||
|
|||||||
Reference in new issue
Block a user