Skip to content

Commit 9946d52

Browse files
ViktorT-11ziggie1984
authored andcommitted
sqldb/v2: rename MigrationConfig to MigrationDescriptor
1 parent cff8836 commit 9946d52

1 file changed

Lines changed: 9 additions & 8 deletions

File tree

sqldb/v2/migrations.go

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,13 @@ var (
2727
"original record")
2828
)
2929

30-
// MigrationConfig is a configuration struct that describes SQL migrations. Each
31-
// migration is associated with a specific schema version and a global database
32-
// version. Migrations are applied in the order of their global database
33-
// version. If a migration includes a non-nil MigrationFn, it is executed after
34-
// the SQL schema has been migrated to the corresponding schema version.
35-
type MigrationConfig struct {
30+
// MigrationDescriptor is a description struct that describes SQL migrations.
31+
// Each migration is associated with a specific schema version and a global
32+
// database version. Migrations are applied in the order of their global
33+
// database version. If a migration includes a non-nil MigrationFn, it is
34+
// executed after the SQL schema has been migrated to the corresponding schema
35+
// version.
36+
type MigrationDescriptor struct {
3637
// Name is the name of the migration.
3738
Name string
3839

@@ -75,14 +76,14 @@ type MigrationSet struct {
7576
// daemon.
7677
LatestMigrationVersion uint
7778

78-
// Configs defines a list of migrations to be applied to the
79+
// Descriptors defines a list of migrations to be applied to the
7980
// database. Each migration is assigned a version number, determining
8081
// its execution order.
8182
// The schema version, tracked by golang-migrate, ensures migrations are
8283
// applied to the correct schema. For migrations involving only schema
8384
// changes, the migration function can be left nil. For custom
8485
// migrations an implemented migration function is required.
85-
Configs []MigrationConfig
86+
Descriptors []MigrationDescriptor
8687
}
8788

8889
// MigrationTarget is a functional option that can be passed to applyMigrations

0 commit comments

Comments
 (0)