Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
server
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
m-team
oidc
mytoken
server
Commits
4bce4bfb
Verified
Commit
4bce4bfb
authored
11 months ago
by
Gabriel Zachmann
Browse files
Options
Downloads
Patches
Plain Diff
fix sql migration
parent
c7f665c3
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
internal/db/dbmigrate/scripts/v0.10.0.pre.sql
+15
-12
15 additions, 12 deletions
internal/db/dbmigrate/scripts/v0.10.0.pre.sql
with
15 additions
and
12 deletions
internal/db/dbmigrate/scripts/v0.10.0.pre.sql
+
15
−
12
View file @
4bce4bfb
...
...
@@ -197,7 +197,7 @@ SELECT `me`.`time` AS `time`,
FROM
(
`Events`
`e`
JOIN
`MT_Events`
`me`
ON
(
`e`
.
`id`
=
`me`
.
`event_id`
))
ORDER
BY
`me`
.
`time`
DESC
;
CREATE
VIEW
IF
NOT
EXISTS
MailVerificationCodes
AS
CREATE
OR
REPLACE
VIEW
MailVerificationCodes
AS
SELECT
`fa`
.
`id`
AS
`id`
,
`fa`
.
`action`
AS
`action`
,
`fa`
.
`code`
AS
`code`
,
...
...
@@ -210,7 +210,7 @@ SELECT `fa`.`id` AS `id`,
WHERE
`a`
.
`action`
=
'verify_email'
))
`fa`
JOIN
`ActionReferencesUser`
`aru`
ON
(
`aru`
.
`action_id`
=
`fa`
.
`id`
));
CREATE
VIEW
IF
NOT
EXISTS
MytokenRecreateCodes
AS
CREATE
OR
REPLACE
VIEW
MytokenRecreateCodes
AS
SELECT
`fa`
.
`id`
AS
`id`
,
`fa`
.
`action`
AS
`action`
,
`fa`
.
`code`
AS
`code`
,
...
...
@@ -220,16 +220,19 @@ SELECT `fa`.`id` AS `id`,
`mt`
.
`capabilities`
AS
`capabilities`
,
`mt`
.
`rotation`
AS
`rotation`
,
`mt`
.
`restrictions`
AS
`restrictions`
,
`mt`
.
`created`
AS
`token_created`
FROM
(((
SELECT
`ac`
.
`id`
AS
`id`
,
`ac`
.
`action`
AS
`action`
,
`ac`
.
`code`
AS
`code`
,
`ac`
.
`expires_at`
AS
`expires_at`
FROM
`ActionCodes`
`ac`
WHERE
`ac`
.
`action`
=
(
SELECT
`a`
.
`id`
FROM
`Actions`
`a`
WHERE
`a`
.
`action`
=
'recreate_token'
))
`fa`
JOIN
`ActionReferencesMytokens`
`arm`
ON
(
`arm`
.
`action_id`
=
`fa`
.
`id`
))
JOIN
`MTokens`
`mt`
ON
(
`mt`
.
`id`
=
`arm`
.
`MT_id`
));
`mt`
.
`created`
AS
`token_created`
,
`u`
.
`iss`
AS
`issuer`
FROM
((((
SELECT
`ac`
.
`id`
AS
`id`
,
`ac`
.
`action`
AS
`action`
,
`ac`
.
`code`
AS
`code`
,
`ac`
.
`expires_at`
AS
`expires_at`
FROM
`ActionCodes`
`ac`
WHERE
`ac`
.
`action`
=
(
SELECT
`a`
.
`id`
FROM
`Actions`
`a`
WHERE
`a`
.
`action`
=
'recreate_token'
))
`fa`
JOIN
`ActionReferencesMytokens`
`arm`
ON
(
`arm`
.
`action_id`
=
`fa`
.
`id`
))
JOIN
`MTokens`
`mt`
ON
(
`mt`
.
`id`
=
`arm`
.
`MT_id`
))
JOIN
`Users`
`u`
ON
(
`mt`
.
`user_id`
=
`u`
.
`id`
));
###
Procedures
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment