little-fireman-5336
03/28/2023, 8:45 PMlittle-fireman-5336
03/28/2023, 8:47 PMERROR: unsupported Unicode escape sequence (SQLSTATE 22P05)
error executing migrations/20211019000001000001_merge_authentication_request_tables.postgres.up.sql, sql: -- Migration generated by the command below; DO NOT EDIT.little-fireman-5336
03/28/2023, 8:48 PMINSERT INTO hydra_oauth2_flow (
state,
login_challenge,
requested_scope,
login_verifier,
login_csrf,
subject,
request_url,
login_skip,
client_id,
requested_at,
login_initialized_at,
oidc_context,
login_session_id,
requested_at_audience,
login_remember,
login_remember_for,
login_error,
acr,
login_authenticated_at,
login_was_used,
this error should never be printed
forced_subject_identifier,
context,
amr,
consent_challenge_id,
consent_verifier,
consent_skip,
consent_csrf,
granted_scope,
consent_remember,
consent_remember_for,
consent_error,
session_access_token,
session_id_token,
consent_was_used,
granted_at_audience,
consent_handled_at
) SELECT
case
when hydra_oauth2_authentication_request_handled.error IS NOT NULL then 128
when hydra_oauth2_consent_request_handled.error IS NOT NULL then 129
when hydra_oauth2_consent_request_handled.was_used = true then 6
when hydra_oauth2_consent_request_handled.challenge IS NOT NULL then 5
when hydra_oauth2_consent_request.challenge IS NOT NULL then 4
when hydra_oauth2_authentication_request_handled.was_used = true then 3
when hydra_oauth2_authentication_request_handled.challenge IS NOT NULL then 2
else 1
end,
hydra_oauth2_authentication_request.challenge,
hydra_oauth2_authentication_request.requested_scope,
hydra_oauth2_authentication_request.verifier,
hydra_oauth2_authentication_request.csrf,
hydra_oauth2_authentication_request.subject,
hydra_oauth2_authentication_request.request_url,
hydra_oauth2_authentication_request.skip,
hydra_oauth2_authentication_request.client_id,
hydra_oauth2_authentication_request.requested_at,
hydra_oauth2_authentication_request.authenticated_at,
cast(coalesce(hydra_oauth2_authentication_request.oidc_context, '{}') as jsonb),
hydra_oauth2_authentication_request.login_session_id,
hydra_oauth2_authentication_request.requested_at_audience,
coalesce(hydra_oauth2_authentication_request_handled.remember, false),
coalesce(hydra_oauth2_authentication_request_handled.remember_for, 0),
hydra_oauth2_authentication_request_handled.error,
coalesce(hydra_oauth2_authentication_request_handled.acr, ''),
hydra_oauth2_authentication_request_handled.authenticated_at,
coalesce(hydra_oauth2_authentication_request_handled.was_used, false),
coalesce(hydra_oauth2_consent_request.forced_subject_identifier, hydra_oauth2_authentication_request_handled.forced_subject_identifier, ''),
cast(coalesce(hydra_oauth2_authentication_request_handled.context, '{}') as jsonb),
coalesce(hydra_oauth2_authentication_request_handled.amr, ''),
hydra_oauth2_consent_request.challenge,
hydra_oauth2_consent_request.verifier,
coalesce(hydra_oauth2_consent_request.skip, false),
hydra_oauth2_consent_request.csrf,
coalesce(hydra_oauth2_consent_request_handled.granted_scope, '[]'),
coalesce(hydra_oauth2_consent_request_handled.remember, false),
coalesce(hydra_oauth2_consent_request_handled.remember_for, 0),
hydra_oauth2_consent_request_handled.error,
cast(coalesce(hydra_oauth2_consent_request_handled.session_access_token, '{}') as jsonb),
cast(coalesce(hydra_oauth2_consent_request_handled.session_id_token, '{}') as jsonb),
coalesce(hydra_oauth2_consent_request_handled.was_used, false),
coalesce(hydra_oauth2_consent_request_handled.granted_at_audience, '[]'),
hydra_oauth2_consent_request_handled.handled_at
FROM hydra_oauth2_authentication_request
LEFT JOIN hydra_oauth2_authentication_request_handled
ON hydra_oauth2_authentication_request.challenge = hydra_oauth2_authentication_request_handled.challenge
LEFT JOIN hydra_oauth2_consent_request
ON hydra_oauth2_authentication_request.challenge = hydra_oauth2_consent_request.login_challenge
LEFT JOIN hydra_oauth2_consent_request_handled
ON hydra_oauth2_consent_request.challenge = hydra_oauth2_consent_request_handled.challenge;
UPDATE hydra_oauth2_access AS t1
SET challenge_id = NULL
WHERE challenge_id IS NOT NULL
AND NOT exists(SELECT NULL FROM hydra_oauth2_flow t2 WHERE t1.challenge_id = t2.consent_challenge_id);
UPDATE hydra_oauth2_code AS t1
SET challenge_id = NULL
WHERE challenge_id IS NOT NULL
AND NOT exists(SELECT NULL FROM hydra_oauth2_flow t2 WHERE t1.challenge_id = t2.consent_challenge_id);
UPDATE hydra_oauth2_oidc AS t1
SET challenge_id = NULL
WHERE challenge_id IS NOT NULL
AND NOT exists(SELECT NULL FROM hydra_oauth2_flow t2 WHERE t1.challenge_id = t2.consent_challenge_id);
UPDATE hydra_oauth2_refresh AS t1
SET challenge_id = NULL
WHERE challenge_id IS NOT NULL
AND NOT exists(SELECT NULL FROM hydra_oauth2_flow t2 WHERE t1.challenge_id = t2.consent_challenge_id);
UPDATE hydra_oauth2_pkce AS t1
SET challenge_id = NULL
WHERE challenge_id IS NOT NULL
AND NOT exists(SELECT NULL FROM hydra_oauth2_flow t2 WHERE t1.challenge_id = t2.consent_challenge_id);
<http://github.com/ory/x/popx.NewMigrationBox.func1.1|github.com/ory/x/popx.NewMigrationBox.func1.1>
/go/pkg/mod/github.com/ory/[email protected]/popx/migration_box.go:161
<http://github.com/ory/x/popx.Migration.Run|github.com/ory/x/popx.Migration.Run>
/go/pkg/mod/github.com/ory/[email protected]/popx/migration_info.go:37
<http://github.com/ory/x/popx.(*Migrator).UpTo.func1.2|github.com/ory/x/popx.(*Migrator).UpTo.func1.2>
/go/pkg/mod/github.com/ory/[email protected]/popx/migrator.go:149
<http://github.com/ory/x/popx.(*Migrator).isolatedTransaction|github.com/ory/x/popx.(*Migrator).isolatedTransaction>
/go/pkg/mod/github.com/ory/[email protected]/popx/migrator.go:323
<http://github.com/ory/x/popx.(*Migrator).UpTo.func1|github.com/ory/x/popx.(*Migrator).UpTo.func1>
/go/pkg/mod/github.com/ory/[email protected]/popx/migrator.go:148
<http://github.com/ory/x/popx.(*Migrator).exec|github.com/ory/x/popx.(*Migrator).exec>
/go/pkg/mod/github.com/ory/[email protected]/popx/migrator.go:567
<http://github.com/ory/x/popx.(*Migrator).UpTo|github.com/ory/x/popx.(*Migrator).UpTo>
/go/pkg/mod/github.com/ory/[email protected]/popx/migrator.go:102
<http://github.com/ory/x/popx.(*Migrator).Up|github.com/ory/x/popx.(*Migrator).Up>
/go/pkg/mod/github.com/ory/[email protected]/popx/migrator.go:88
<http://github.com/ory/hydra/persistence/sql.(*Persister).MigrateUp|github.com/ory/hydra/persistence/sql.(*Persister).MigrateUp>
/project/persistence/sql/persister_migration.go:51
<http://github.com/ory/hydra/cmd/cli.(*MigrateHandler).MigrateSQL|github.com/ory/hydra/cmd/cli.(*MigrateHandler).MigrateSQL>
/project/cmd/cli/handler_migrate.go:344
<http://github.com/spf13/cobra.(*Command).execute|github.com/spf13/cobra.(*Command).execute>
/go/pkg/mod/github.com/spf13/[email protected]/command.go:916
<http://github.com/spf13/cobra.(*Command).ExecuteC|github.com/spf13/cobra.(*Command).ExecuteC>
/go/pkg/mod/github.com/spf13/[email protected]/command.go:1044
<http://github.com/spf13/cobra.(*Command).Execute|github.com/spf13/cobra.(*Command).Execute>
/go/pkg/mod/github.com/spf13/[email protected]/command.go:968
<http://github.com/ory/hydra/cmd.Execute|github.com/ory/hydra/cmd.Execute>
/project/cmd/root.go:101
main.main
/project/main.go:14
runtime.main
/usr/local/go/src/runtime/proc.go:250
runtime.goexit
/usr/local/go/src/runtime/asm_amd64.s:1594little-fireman-5336
03/28/2023, 8:50 PMlate-balloon-3804
03/28/2023, 9:08 PMlittle-fireman-5336
03/28/2023, 9:14 PMlate-balloon-3804
03/28/2023, 9:16 PMhappy-advantage-63621
03/29/2023, 6:45 AMlittle-fireman-5336
04/03/2023, 2:18 PM