aboutsummaryrefslogtreecommitdiffstats
path: root/internal/models
diff options
context:
space:
mode:
authorEugene Triguba <eugenetriguba@gmail.com>2024-03-23 09:12:52 -0400
committerEugene Triguba <eugenetriguba@gmail.com>2024-03-23 09:12:52 -0400
commit99c4818223ac87eee30bb1ecbf96dbdd32a31a1f (patch)
tree0b40ba322d1d42a8d17aa182aac78e3822ee6895 /internal/models
parentAdd workflow to bump homebrew formula version (diff)
downloadcli-99c4818223ac87eee30bb1ecbf96dbdd32a31a1f.zip
Add handling of duplicate local migration versions
Diffstat (limited to 'internal/models')
-rw-r--r--internal/models/migration_test.go10
1 files changed, 8 insertions, 2 deletions
diff --git a/internal/models/migration_test.go b/internal/models/migration_test.go
index 809887f..15f3123 100644
--- a/internal/models/migration_test.go
+++ b/internal/models/migration_test.go
@@ -45,7 +45,10 @@ func TestName(t *testing.T) {
expectedName: "001_test_message",
},
{
- migration: models.NewTimestampMigration(time.Date(1234, 1, 2, 3, 4, 5, 6, time.UTC), "test_message"),
+ migration: models.NewTimestampMigration(
+ time.Date(1234, 1, 2, 3, 4, 5, 6, time.UTC),
+ "test_message",
+ ),
expectedName: "12340102030405_test_message",
},
// Leading/Trailing spaces trimmed, lowercased, and spaces converted to underscores.
@@ -54,7 +57,10 @@ func TestName(t *testing.T) {
expectedName: "001_test_message",
},
{
- migration: models.NewTimestampMigration(time.Date(1234, 1, 2, 3, 4, 5, 6, time.UTC), " teST mesSAGE "),
+ migration: models.NewTimestampMigration(
+ time.Date(1234, 1, 2, 3, 4, 5, 6, time.UTC),
+ " teST mesSAGE ",
+ ),
expectedName: "12340102030405_test_message",
},
}