diff options
| author | Eugene Triguba <hello@eugenetriguba.com> | 2026-11-13 21:43:11 -0800 |
|---|---|---|
| committer | Eugene Triguba <hello@eugenetriguba.com> | 2026-11-13 21:43:11 -0800 |
| commit | 28dd0bfc1373746b8c056a211f068da71fdc80b2 (patch) | |
| tree | 9c04a08501bc5abe7413263f60eaa55400dd162f /internal/models | |
| parent | Release v0.13.1 (diff) | |
| download | cli-28dd0bfc1373746b8c056a211f068da71fdc80b2.zip | |
Remove migration dependencies
Diffstat (limited to 'internal/models')
| -rw-r--r-- | internal/models/migration.go | 19 | ||||
| -rw-r--r-- | internal/models/migration_test.go | 2 |
2 files changed, 8 insertions, 13 deletions
diff --git a/internal/models/migration.go b/internal/models/migration.go index baf5de9..ed48073 100644 --- a/internal/models/migration.go +++ b/internal/models/migration.go @@ -7,10 +7,9 @@ import ( ) type Migration struct { - Version string - Message string - Applied bool - Dependencies []string + Version string + Message string + Applied bool } func NewTimestampMigration(version time.Time, message string) *Migration { @@ -20,18 +19,16 @@ func NewTimestampMigration(version time.Time, message string) *Migration { version.Year(), version.Month(), version.Day(), version.Hour(), version.Minute(), version.Second(), ), - Message: message, - Applied: false, - Dependencies: []string{}, + Message: message, + Applied: false, } } func NewSequentialMigration(version uint64, message string) *Migration { return &Migration{ - Version: fmt.Sprintf("%03d", version), - Message: message, - Applied: false, - Dependencies: []string{}, + Version: fmt.Sprintf("%03d", version), + Message: message, + Applied: false, } } diff --git a/internal/models/migration_test.go b/internal/models/migration_test.go index d7c1d6d..aae1cba 100644 --- a/internal/models/migration_test.go +++ b/internal/models/migration_test.go @@ -16,7 +16,6 @@ func TestNewTimestampMigration(t *testing.T) { check.Equal(t, m.Version, "20200101000000") check.Equal(t, m.Message, "test message") check.Equal(t, m.Applied, false) - check.DeepEqual(t, m.Dependencies, []string{}) } func TestNewSequentialMigration(t *testing.T) { @@ -31,7 +30,6 @@ func TestNewSequentialMigration(t *testing.T) { check.Equal(t, m.Version, "100") check.Equal(t, m.Message, "test message") check.Equal(t, m.Applied, false) - check.DeepEqual(t, m.Dependencies, []string{}) } func TestName(t *testing.T) { |