Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
陈曦
sub2api
Commits
45065c23
Commit
45065c23
authored
Apr 22, 2026
by
shaw
Browse files
fix(ci): run 108a migration before 109 in backfill integration test
parent
ddf80f5e
Changes
1
Hide whitespace changes
Inline
Side-by-side
backend/internal/repository/auth_identity_compat_backfill_integration_test.go
View file @
45065c23
...
@@ -20,6 +20,10 @@ func TestAuthIdentityCompatBackfillMigration_AllowsLongReportTypes(t *testing.T)
...
@@ -20,6 +20,10 @@ func TestAuthIdentityCompatBackfillMigration_AllowsLongReportTypes(t *testing.T)
migration108SQL
,
err
:=
os
.
ReadFile
(
migration108Path
)
migration108SQL
,
err
:=
os
.
ReadFile
(
migration108Path
)
require
.
NoError
(
t
,
err
)
require
.
NoError
(
t
,
err
)
migration108aPath
:=
filepath
.
Join
(
".."
,
".."
,
"migrations"
,
"108a_widen_auth_identity_migration_report_type.sql"
)
migration108aSQL
,
err
:=
os
.
ReadFile
(
migration108aPath
)
require
.
NoError
(
t
,
err
)
migration109Path
:=
filepath
.
Join
(
".."
,
".."
,
"migrations"
,
"109_auth_identity_compat_backfill.sql"
)
migration109Path
:=
filepath
.
Join
(
".."
,
".."
,
"migrations"
,
"109_auth_identity_compat_backfill.sql"
)
migration109SQL
,
err
:=
os
.
ReadFile
(
migration109Path
)
migration109SQL
,
err
:=
os
.
ReadFile
(
migration109Path
)
require
.
NoError
(
t
,
err
)
require
.
NoError
(
t
,
err
)
...
@@ -41,6 +45,9 @@ ALTER TABLE users
...
@@ -41,6 +45,9 @@ ALTER TABLE users
_
,
err
=
tx
.
ExecContext
(
ctx
,
string
(
migration108SQL
))
_
,
err
=
tx
.
ExecContext
(
ctx
,
string
(
migration108SQL
))
require
.
NoError
(
t
,
err
)
require
.
NoError
(
t
,
err
)
_
,
err
=
tx
.
ExecContext
(
ctx
,
string
(
migration108aSQL
))
require
.
NoError
(
t
,
err
)
var
userID
int64
var
userID
int64
require
.
NoError
(
t
,
tx
.
QueryRowContext
(
ctx
,
`
require
.
NoError
(
t
,
tx
.
QueryRowContext
(
ctx
,
`
INSERT INTO users (email, password_hash, role, status, balance, concurrency)
INSERT INTO users (email, password_hash, role, status, balance, concurrency)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment