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
72301fe6
Commit
72301fe6
authored
3 years ago
by
Gabriel Zachmann
Browse files
Options
Downloads
Patches
Plain Diff
fix dbmigrate
parent
d68773e3
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/v0.3.0.go
+23
-25
23 additions, 25 deletions
internal/db/dbmigrate/v0.3.0.go
with
23 additions
and
25 deletions
internal/db/dbmigrate/v0.3.0.go
+
23
−
25
View file @
72301fe6
...
...
@@ -2,31 +2,29 @@ package dbmigrate
var
v0_3_0_Before
=
[]
string
{
// Tables
"DROP TRIGGER IF EXISTS updtrigger"
,
"ALTER TABLE RT_EncryptionKeys ADD CONSTRAINT RT_EncryptionKeys_FK_2 FOREIGN KEY (MT_id) REFERENCES MTokens(id) ON DELETE CASCADE ON UPDATE CASCADE"
,
"TRUNCATE TABLE AuthInfo"
,
"ALTER TABLE AuthInfo ADD rotation json NULL"
,
"ALTER TABLE AuthInfo ADD response_type varchar(128) NOT NULL"
,
"ALTER TABLE AuthInfo ADD max_token_len INT DEFAULT NULL NULL"
,
"ALTER TABLE AuthInfo ADD code_verifier varchar(128) NULL"
,
"ALTER TABLE TransferCodesAttributes ADD max_token_len INT NULL"
,
"CREATE OR REPLACE "
+
"ALGORITHM = UNDEFINED VIEW `TransferCodes` AS"
+
"select"
+
"`pt`.`id` AS `id`,"
+
"`pt`.`jwt` AS `jwt`,"
+
"`tca`.`created` AS `created`,"
+
"`tca`.`expires_in` AS `expires_in`,"
+
"`tca`.`expires_at` AS `expires_at`,"
+
"`tca`.`revoke_MT` AS `revoke_MT`,"
+
"`tca`.`response_type` AS `response_type`,"
+
"`tca`.`max_token_len` AS `max_token_len`,"
+
"`tca`.`consent_declined` AS `consent_declined`"
+
"from"
+
"(`ProxyTokens` `pt`"
+
"join `TransferCodesAttributes` `tca` on"
+
"(`pt`.`id` = `tca`.`id`))"
,
"DROP TRIGGER IF EXISTS updtrigger;"
,
"ALTER TABLE RT_EncryptionKeys ADD CONSTRAINT RT_EncryptionKeys_FK_2 FOREIGN KEY (MT_id) REFERENCES MTokens(id) ON DELETE CASCADE ON UPDATE CASCADE;"
,
"TRUNCATE TABLE AuthInfo;"
,
"ALTER TABLE AuthInfo ADD rotation json NULL;"
,
"ALTER TABLE AuthInfo ADD response_type varchar(128) NOT NULL;"
,
"ALTER TABLE AuthInfo ADD max_token_len INT DEFAULT NULL NULL;"
,
"ALTER TABLE AuthInfo ADD code_verifier varchar(128) NULL;"
,
"ALTER TABLE TransferCodesAttributes ADD max_token_len INT NULL;"
,
"CREATE OR REPLACE ALGORITHM = UNDEFINED VIEW `TransferCodes` "
+
"AS "
+
"SELECT "
+
" `pt`.`id` AS `id`, "
+
" `pt`.`jwt` AS `jwt`, "
+
" `tca`.`created` AS `created`, "
+
" `tca`.`expires_in` AS `expires_in`, "
+
" `tca`.`expires_at` AS `expires_at`, "
+
" `tca`.`revoke_MT` AS `revoke_MT`, "
+
" `tca`.`response_type` AS `response_type`, "
+
" `tca`.`max_token_len` AS `max_token_len`, "
+
" `tca`.`consent_declined` AS `consent_declined` "
+
"FROM (`ProxyTokens` `pt` JOIN `TransferCodesAttributes` `tca` ON (`pt`.`id` = `tca`.`id`));"
,
// Predefined Values
"INSERT IGNORE INTO Events (event) VALUES('token_rotated')"
,
"INSERT IGNORE INTO Events (event) VALUES('token_rotated')
;
"
,
}
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