language
stringlengths
0
24
filename
stringlengths
9
214
code
stringlengths
99
9.93M
SQL
hydra/persistence/sql/migrations/20220210000001000073_nid.postgres.up.sql
-- Migration generated by the command below; DO NOT EDIT. -- hydra:generate hydra migrate gen ALTER TABLE hydra_oauth2_trusted_jwt_bearer_issuer ADD CONSTRAINT hydra_oauth2_trusted_jwt_bearer_issue_issuer_subject_key_id_key UNIQUE (issuer, subject, key_id, nid);
SQL
hydra/persistence/sql/migrations/20220210000001000073_nid.sqlite.up.sql
-- This blank migration was generated to meet ory/x/popx validation criteria, see https://github.com/ory/x/pull/509; DO NOT EDIT. -- hydra:generate hydra migrate gen
SQL
hydra/persistence/sql/migrations/20220210000001000074_nid.cockroach.up.sql
-- Migration generated by the command below; DO NOT EDIT. -- hydra:generate hydra migrate gen ALTER TABLE hydra_oauth2_trusted_jwt_bearer_issuer ALTER nid SET NOT NULL;
SQL
hydra/persistence/sql/migrations/20220210000001000074_nid.down.sql
-- This blank migration was generated to meet ory/x/popx validation criteria, see https://github.com/ory/x/pull/509; DO NOT EDIT. -- hydra:generate hydra migrate gen
SQL
hydra/persistence/sql/migrations/20220210000001000074_nid.mysql.up.sql
-- This blank migration was generated to meet ory/x/popx validation criteria, see https://github.com/ory/x/pull/509; DO NOT EDIT. -- hydra:generate hydra migrate gen
SQL
hydra/persistence/sql/migrations/20220210000001000074_nid.postgres.up.sql
-- Migration generated by the command below; DO NOT EDIT. -- hydra:generate hydra migrate gen ALTER TABLE hydra_oauth2_trusted_jwt_bearer_issuer DROP CONSTRAINT IF EXISTS hydra_oauth2_trusted_jwt_bearer_issuer_key_set_fkey; ALTER TABLE hydra_oauth2_trusted_jwt_bearer_issuer DROP CONSTRAINT IF EXISTS hydra_oauth2_trusted_jwt_bearer_issuer_key_set_key_id_fkey;
SQL
hydra/persistence/sql/migrations/20220210000001000074_nid.sqlite.up.sql
-- This blank migration was generated to meet ory/x/popx validation criteria, see https://github.com/ory/x/pull/509; DO NOT EDIT. -- hydra:generate hydra migrate gen
SQL
hydra/persistence/sql/migrations/20220210000001000075_nid.cockroach.up.sql
-- Migration generated by the command below; DO NOT EDIT. -- hydra:generate hydra migrate gen DROP INDEX hydra_oauth2_trusted_jwt_bearer_issuer_issuer_subject_key_id_key CASCADE; DROP INDEX hydra_oauth2_trusted_jwt_bearer_issuer_expires_at_idx;
SQL
hydra/persistence/sql/migrations/20220210000001000075_nid.down.sql
-- This blank migration was generated to meet ory/x/popx validation criteria, see https://github.com/ory/x/pull/509; DO NOT EDIT. -- hydra:generate hydra migrate gen
SQL
hydra/persistence/sql/migrations/20220210000001000075_nid.mysql.up.sql
-- This blank migration was generated to meet ory/x/popx validation criteria, see https://github.com/ory/x/pull/509; DO NOT EDIT. -- hydra:generate hydra migrate gen
SQL
hydra/persistence/sql/migrations/20220210000001000075_nid.postgres.up.sql
-- Migration generated by the command below; DO NOT EDIT. -- hydra:generate hydra migrate gen ALTER TABLE hydra_oauth2_trusted_jwt_bearer_issuer ADD CONSTRAINT hydra_oauth2_trusted_jwt_bearer_issuer_key_set_fkey FOREIGN KEY (key_set, key_id, nid) REFERENCES hydra_jwk(sid, kid, nid) ON DELETE CASCADE;
SQL
hydra/persistence/sql/migrations/20220210000001000075_nid.sqlite.up.sql
-- This blank migration was generated to meet ory/x/popx validation criteria, see https://github.com/ory/x/pull/509; DO NOT EDIT. -- hydra:generate hydra migrate gen
SQL
hydra/persistence/sql/migrations/20220210000001000076_nid.cockroach.up.sql
-- Migration generated by the command below; DO NOT EDIT. -- hydra:generate hydra migrate gen CREATE UNIQUE INDEX hydra_oauth2_trusted_jwt_bearer_issuer_issuer_subject_key_id_key ON hydra_oauth2_trusted_jwt_bearer_issuer (issuer ASC, subject ASC, key_id ASC, nid ASC); CREATE INDEX hydra_oauth2_trusted_jwt_bearer_issuer_expires_at_idx ON hydra_oauth2_trusted_jwt_bearer_issuer (expires_at ASC); CREATE INDEX hydra_oauth2_trusted_jwt_bearer_issuer_nid_idx ON hydra_oauth2_trusted_jwt_bearer_issuer (id, nid);
SQL
hydra/persistence/sql/migrations/20220210000001000076_nid.down.sql
-- This blank migration was generated to meet ory/x/popx validation criteria, see https://github.com/ory/x/pull/509; DO NOT EDIT. -- hydra:generate hydra migrate gen
SQL
hydra/persistence/sql/migrations/20220210000001000076_nid.mysql.up.sql
-- This blank migration was generated to meet ory/x/popx validation criteria, see https://github.com/ory/x/pull/509; DO NOT EDIT. -- hydra:generate hydra migrate gen
SQL
hydra/persistence/sql/migrations/20220210000001000076_nid.postgres.up.sql
-- Migration generated by the command below; DO NOT EDIT. -- hydra:generate hydra migrate gen UPDATE hydra_oauth2_trusted_jwt_bearer_issuer SET nid = (SELECT id FROM networks LIMIT 1);
SQL
hydra/persistence/sql/migrations/20220210000001000076_nid.sqlite.up.sql
-- This blank migration was generated to meet ory/x/popx validation criteria, see https://github.com/ory/x/pull/509; DO NOT EDIT. -- hydra:generate hydra migrate gen
SQL
hydra/persistence/sql/migrations/20220210000001000077_nid.cockroach.up.sql
-- This blank migration was generated to meet ory/x/popx validation criteria, see https://github.com/ory/x/pull/509; DO NOT EDIT. -- hydra:generate hydra migrate gen
SQL
hydra/persistence/sql/migrations/20220210000001000077_nid.down.sql
-- This blank migration was generated to meet ory/x/popx validation criteria, see https://github.com/ory/x/pull/509; DO NOT EDIT. -- hydra:generate hydra migrate gen
SQL
hydra/persistence/sql/migrations/20220210000001000077_nid.mysql.up.sql
-- This blank migration was generated to meet ory/x/popx validation criteria, see https://github.com/ory/x/pull/509; DO NOT EDIT. -- hydra:generate hydra migrate gen
SQL
hydra/persistence/sql/migrations/20220210000001000077_nid.postgres.up.sql
-- Migration generated by the command below; DO NOT EDIT. -- hydra:generate hydra migrate gen ALTER TABLE hydra_oauth2_trusted_jwt_bearer_issuer ALTER nid SET NOT NULL;
SQL
hydra/persistence/sql/migrations/20220210000001000077_nid.sqlite.up.sql
-- This blank migration was generated to meet ory/x/popx validation criteria, see https://github.com/ory/x/pull/509; DO NOT EDIT. -- hydra:generate hydra migrate gen
SQL
hydra/persistence/sql/migrations/20220210000001000078_nid.cockroach.up.sql
-- This blank migration was generated to meet ory/x/popx validation criteria, see https://github.com/ory/x/pull/509; DO NOT EDIT. -- hydra:generate hydra migrate gen
SQL
hydra/persistence/sql/migrations/20220210000001000078_nid.down.sql
-- This blank migration was generated to meet ory/x/popx validation criteria, see https://github.com/ory/x/pull/509; DO NOT EDIT. -- hydra:generate hydra migrate gen
SQL
hydra/persistence/sql/migrations/20220210000001000078_nid.mysql.up.sql
-- This blank migration was generated to meet ory/x/popx validation criteria, see https://github.com/ory/x/pull/509; DO NOT EDIT. -- hydra:generate hydra migrate gen
SQL
hydra/persistence/sql/migrations/20220210000001000078_nid.postgres.up.sql
-- Migration generated by the command below; DO NOT EDIT. -- hydra:generate hydra migrate gen DROP INDEX hydra_jwk_idx_id_uq; DROP INDEX hydra_oauth2_trusted_jwt_bearer_issuer_expires_at_idx;
SQL
hydra/persistence/sql/migrations/20220210000001000078_nid.sqlite.up.sql
-- This blank migration was generated to meet ory/x/popx validation criteria, see https://github.com/ory/x/pull/509; DO NOT EDIT. -- hydra:generate hydra migrate gen
SQL
hydra/persistence/sql/migrations/20220210000001000079_nid.cockroach.up.sql
-- This blank migration was generated to meet ory/x/popx validation criteria, see https://github.com/ory/x/pull/509; DO NOT EDIT. -- hydra:generate hydra migrate gen
SQL
hydra/persistence/sql/migrations/20220210000001000079_nid.down.sql
-- This blank migration was generated to meet ory/x/popx validation criteria, see https://github.com/ory/x/pull/509; DO NOT EDIT. -- hydra:generate hydra migrate gen
SQL
hydra/persistence/sql/migrations/20220210000001000079_nid.mysql.up.sql
-- This blank migration was generated to meet ory/x/popx validation criteria, see https://github.com/ory/x/pull/509; DO NOT EDIT. -- hydra:generate hydra migrate gen
SQL
hydra/persistence/sql/migrations/20220210000001000079_nid.postgres.up.sql
-- Migration generated by the command below; DO NOT EDIT. -- hydra:generate hydra migrate gen CREATE INDEX hydra_oauth2_trusted_jwt_bearer_issuer_expires_at_idx ON hydra_oauth2_trusted_jwt_bearer_issuer (expires_at ASC); CREATE INDEX hydra_oauth2_trusted_jwt_bearer_issuer_nid_idx ON hydra_oauth2_trusted_jwt_bearer_issuer (id, nid);
SQL
hydra/persistence/sql/migrations/20220210000001000079_nid.sqlite.up.sql
-- This blank migration was generated to meet ory/x/popx validation criteria, see https://github.com/ory/x/pull/509; DO NOT EDIT. -- hydra:generate hydra migrate gen
SQL
hydra/persistence/sql/migrations/20220328111500000000_support_any_subject_trusts.sqlite.down.sql
CREATE TABLE "_hydra_oauth2_trusted_jwt_bearer_issuer" ( id VARCHAR(36) PRIMARY KEY, issuer VARCHAR(255) NOT NULL, subject VARCHAR(255) NOT NULL, scope TEXT NOT NULL, key_set varchar(255) NOT NULL, key_id varchar(255) NOT NULL, created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL, expires_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL, UNIQUE (issuer, subject, key_id), FOREIGN KEY (key_set, key_id) REFERENCES hydra_jwk (sid, kid) ON DELETE CASCADE ); INSERT INTO "_hydra_oauth2_trusted_jwt_bearer_issuer" ( id, issuer, subject, scope, key_set, key_id, created_at, expires_at ) SELECT id, issuer, subject, scope, key_set, key_id, created_at, expires_at FROM "hydra_oauth2_trusted_jwt_bearer_issuer"; DROP INDEX hydra_oauth2_trusted_jwt_bearer_issuer_expires_at_idx; DROP TABLE "hydra_oauth2_trusted_jwt_bearer_issuer"; ALTER TABLE "_hydra_oauth2_trusted_jwt_bearer_issuer" RENAME TO "hydra_oauth2_trusted_jwt_bearer_issuer"; CREATE INDEX hydra_oauth2_trusted_jwt_bearer_issuer_expires_at_idx ON hydra_oauth2_trusted_jwt_bearer_issuer (expires_at);
SQL
hydra/persistence/sql/migrations/20220328111500000000_support_any_subject_trusts.sqlite.up.sql
ALTER TABLE hydra_oauth2_trusted_jwt_bearer_issuer ADD allow_any_subject INTEGER NOT NULL DEFAULT FALSE;
SQL
hydra/persistence/sql/migrations/20220328111500000000_support_any_subject_trusts.up.sql
ALTER TABLE hydra_oauth2_trusted_jwt_bearer_issuer ADD COLUMN allow_any_subject BOOL NOT NULL DEFAULT FALSE;
SQL
hydra/persistence/sql/migrations/20220513000001000000_string_slice_json.cockroach.up.sql
-- Migration generated by the command below; DO NOT EDIT. -- hydra:generate hydra migrate gen ALTER TABLE hydra_client ADD COLUMN redirect_uris_json jsonb DEFAULT '[]' NOT NULL; ALTER TABLE hydra_client ADD COLUMN grant_types_json jsonb DEFAULT '[]' NOT NULL; ALTER TABLE hydra_client ADD COLUMN response_types_json jsonb DEFAULT '[]' NOT NULL; ALTER TABLE hydra_client ADD COLUMN audience_json jsonb DEFAULT '[]' NOT NULL; ALTER TABLE hydra_client ADD COLUMN allowed_cors_origins_json jsonb DEFAULT '[]' NOT NULL; ALTER TABLE hydra_client ADD COLUMN contacts_json jsonb DEFAULT '[]' NOT NULL; ALTER TABLE hydra_client ADD COLUMN request_uris_json jsonb DEFAULT '[]' NOT NULL; ALTER TABLE hydra_client ADD COLUMN post_logout_redirect_uris_json jsonb DEFAULT '[]' NOT NULL;
SQL
hydra/persistence/sql/migrations/20220513000001000000_string_slice_json.down.sql
-- Migration generated by the command below; DO NOT EDIT. -- hydra:generate hydra migrate gen -- Down migrations from Hydra 2.x to 1.x are not available.
SQL
hydra/persistence/sql/migrations/20220513000001000000_string_slice_json.mysql.up.sql
-- Migration generated by the command below; DO NOT EDIT. -- hydra:generate hydra migrate gen ALTER TABLE hydra_client ADD COLUMN redirect_uris_json json DEFAULT ('[]') NOT NULL; ALTER TABLE hydra_client ADD COLUMN grant_types_json json DEFAULT ('[]') NOT NULL; ALTER TABLE hydra_client ADD COLUMN response_types_json json DEFAULT ('[]') NOT NULL; ALTER TABLE hydra_client ADD COLUMN audience_json json DEFAULT ('[]') NOT NULL; ALTER TABLE hydra_client ADD COLUMN allowed_cors_origins_json json DEFAULT ('[]') NOT NULL; ALTER TABLE hydra_client ADD COLUMN contacts_json json DEFAULT ('[]') NOT NULL; ALTER TABLE hydra_client ADD COLUMN request_uris_json json DEFAULT ('[]') NOT NULL; ALTER TABLE hydra_client ADD COLUMN post_logout_redirect_uris_json json DEFAULT ('[]') NOT NULL;
SQL
hydra/persistence/sql/migrations/20220513000001000000_string_slice_json.postgres.up.sql
-- Migration generated by the command below; DO NOT EDIT. -- hydra:generate hydra migrate gen ALTER TABLE hydra_client ADD COLUMN redirect_uris_json jsonb DEFAULT '[]' NOT NULL; ALTER TABLE hydra_client ADD COLUMN grant_types_json jsonb DEFAULT '[]' NOT NULL; ALTER TABLE hydra_client ADD COLUMN response_types_json jsonb DEFAULT '[]' NOT NULL; ALTER TABLE hydra_client ADD COLUMN audience_json jsonb DEFAULT '[]' NOT NULL; ALTER TABLE hydra_client ADD COLUMN allowed_cors_origins_json jsonb DEFAULT '[]' NOT NULL; ALTER TABLE hydra_client ADD COLUMN contacts_json jsonb DEFAULT '[]' NOT NULL; ALTER TABLE hydra_client ADD COLUMN request_uris_json jsonb DEFAULT '[]' NOT NULL; ALTER TABLE hydra_client ADD COLUMN post_logout_redirect_uris_json jsonb DEFAULT '[]' NOT NULL;
SQL
hydra/persistence/sql/migrations/20220513000001000000_string_slice_json.sqlite.up.sql
-- Migration generated by the command below; DO NOT EDIT. -- hydra:generate hydra migrate gen UPDATE hydra_client SET redirect_uris = '[]' WHERE redirect_uris = ''; UPDATE hydra_client SET grant_types = '[]' WHERE grant_types = ''; UPDATE hydra_client SET response_types = '[]' WHERE response_types = ''; UPDATE hydra_client SET audience = '[]' WHERE audience = ''; UPDATE hydra_client SET allowed_cors_origins = '[]' WHERE allowed_cors_origins = ''; UPDATE hydra_client SET contacts = '[]' WHERE contacts = ''; UPDATE hydra_client SET request_uris = '[]' WHERE request_uris = ''; UPDATE hydra_client SET post_logout_redirect_uris = '[]' WHERE post_logout_redirect_uris = '';
SQL
hydra/persistence/sql/migrations/20220513000001000001_string_slice_json.cockroach.up.sql
-- Migration generated by the command below; DO NOT EDIT. -- hydra:generate hydra migrate gen UPDATE hydra_client SET redirect_uris_json = cast('["' || REPLACE(redirect_uris,'|','","') || '"]' as jsonb) WHERE redirect_uris <> ''; UPDATE hydra_client SET grant_types_json = cast('["' || REPLACE(grant_types,'|','","') || '"]' as jsonb) WHERE grant_types <> ''; UPDATE hydra_client SET response_types_json = cast('["' || REPLACE(response_types,'|','","') || '"]' as jsonb) WHERE response_types <> ''; UPDATE hydra_client SET audience_json = cast('["' || REPLACE(audience,'|','","') || '"]' as jsonb) WHERE audience <> ''; UPDATE hydra_client SET allowed_cors_origins_json = cast('["' || REPLACE(allowed_cors_origins,'|','","') || '"]' as jsonb) WHERE allowed_cors_origins <> ''; UPDATE hydra_client SET contacts_json = cast('["' || REPLACE(contacts,'|','","') || '"]' as jsonb) WHERE contacts <> ''; UPDATE hydra_client SET request_uris_json = cast('["' || REPLACE(request_uris,'|','","') || '"]' as jsonb) WHERE request_uris <> ''; UPDATE hydra_client SET post_logout_redirect_uris_json = cast('["' || REPLACE(post_logout_redirect_uris,'|','","') || '"]' as jsonb) WHERE post_logout_redirect_uris <> '';
SQL
hydra/persistence/sql/migrations/20220513000001000001_string_slice_json.down.sql
-- This blank migration was generated to meet ory/x/popx validation criteria, see https://github.com/ory/x/pull/509; DO NOT EDIT. -- hydra:generate hydra migrate gen
SQL
hydra/persistence/sql/migrations/20220513000001000001_string_slice_json.mysql.up.sql
-- Migration generated by the command below; DO NOT EDIT. -- hydra:generate hydra migrate gen UPDATE hydra_client SET redirect_uris_json = cast(concat('["' , REPLACE(redirect_uris,'|','","') , '"]') as json) WHERE redirect_uris <> ''; UPDATE hydra_client SET grant_types_json = cast(concat('["' , REPLACE(grant_types,'|','","') , '"]') as json) WHERE grant_types <> ''; UPDATE hydra_client SET response_types_json = cast(concat('["' , REPLACE(response_types,'|','","') , '"]') as json) WHERE response_types <> ''; UPDATE hydra_client SET audience_json = cast(concat('["' , REPLACE(audience,'|','","') , '"]') as json) WHERE audience <> ''; UPDATE hydra_client SET allowed_cors_origins_json = cast(concat('["' , REPLACE(allowed_cors_origins,'|','","') , '"]') as json) WHERE allowed_cors_origins <> ''; UPDATE hydra_client SET contacts_json = cast(concat('["' , REPLACE(contacts,'|','","') , '"]') as json) WHERE contacts <> ''; UPDATE hydra_client SET request_uris_json = cast(concat('["' , REPLACE(request_uris,'|','","') , '"]') as json) WHERE request_uris <> ''; UPDATE hydra_client SET post_logout_redirect_uris_json = cast(concat('["' , REPLACE(post_logout_redirect_uris,'|','","') , '"]') as json) WHERE post_logout_redirect_uris <> '';
SQL
hydra/persistence/sql/migrations/20220513000001000001_string_slice_json.postgres.up.sql
-- Migration generated by the command below; DO NOT EDIT. -- hydra:generate hydra migrate gen UPDATE hydra_client SET redirect_uris = '[]' WHERE redirect_uris = ''; UPDATE hydra_client SET grant_types = '[]' WHERE grant_types = ''; UPDATE hydra_client SET response_types = '[]' WHERE response_types = ''; UPDATE hydra_client SET audience = '[]' WHERE audience = ''; UPDATE hydra_client SET allowed_cors_origins = '[]' WHERE allowed_cors_origins = ''; UPDATE hydra_client SET contacts = '[]' WHERE contacts = ''; UPDATE hydra_client SET request_uris = '[]' WHERE request_uris = ''; UPDATE hydra_client SET post_logout_redirect_uris = '[]' WHERE post_logout_redirect_uris = '';
SQL
hydra/persistence/sql/migrations/20220513000001000001_string_slice_json.sqlite.up.sql
-- Migration generated by the command below; DO NOT EDIT. -- hydra:generate hydra migrate gen UPDATE hydra_client SET redirect_uris = '["' || REPLACE(redirect_uris,'|','","') || '"]' WHERE redirect_uris <> '[]'; UPDATE hydra_client SET grant_types = '["' || REPLACE(grant_types,'|','","') || '"]' WHERE grant_types <> '[]'; UPDATE hydra_client SET response_types = '["' || REPLACE(response_types,'|','","') || '"]' WHERE response_types <> '[]'; UPDATE hydra_client SET audience = '["' || REPLACE(audience,'|','","') || '"]' WHERE audience <> '[]'; UPDATE hydra_client SET allowed_cors_origins = '["' || REPLACE(allowed_cors_origins,'|','","') || '"]' WHERE allowed_cors_origins <> '[]'; UPDATE hydra_client SET contacts = '["' || REPLACE(contacts,'|','","') || '"]' WHERE contacts <> '[]'; UPDATE hydra_client SET request_uris = '["' || REPLACE(request_uris,'|','","') || '"]' WHERE request_uris <> '[]'; UPDATE hydra_client SET post_logout_redirect_uris = '["' || REPLACE(post_logout_redirect_uris,'|','","') || '"]' WHERE post_logout_redirect_uris <> '[]';
SQL
hydra/persistence/sql/migrations/20220513000001000002_string_slice_json.cockroach.up.sql
-- Migration generated by the command below; DO NOT EDIT. -- hydra:generate hydra migrate gen ALTER TABLE hydra_client ALTER COLUMN redirect_uris_json DROP DEFAULT; ALTER TABLE hydra_client ALTER COLUMN grant_types_json DROP DEFAULT; ALTER TABLE hydra_client ALTER COLUMN response_types_json DROP DEFAULT; ALTER TABLE hydra_client ALTER COLUMN audience_json DROP DEFAULT; ALTER TABLE hydra_client ALTER COLUMN allowed_cors_origins_json DROP DEFAULT; ALTER TABLE hydra_client ALTER COLUMN contacts_json DROP DEFAULT; ALTER TABLE hydra_client ALTER COLUMN request_uris_json DROP DEFAULT; -- hydra_client/post_logout_redirect_uris_json is meant to have a default
SQL
hydra/persistence/sql/migrations/20220513000001000002_string_slice_json.down.sql
-- This blank migration was generated to meet ory/x/popx validation criteria, see https://github.com/ory/x/pull/509; DO NOT EDIT. -- hydra:generate hydra migrate gen
SQL
hydra/persistence/sql/migrations/20220513000001000002_string_slice_json.mysql.up.sql
-- Migration generated by the command below; DO NOT EDIT. -- hydra:generate hydra migrate gen ALTER TABLE hydra_client ALTER COLUMN redirect_uris_json DROP DEFAULT; ALTER TABLE hydra_client ALTER COLUMN grant_types_json DROP DEFAULT; ALTER TABLE hydra_client ALTER COLUMN response_types_json DROP DEFAULT; ALTER TABLE hydra_client ALTER COLUMN audience_json DROP DEFAULT; ALTER TABLE hydra_client ALTER COLUMN allowed_cors_origins_json DROP DEFAULT; ALTER TABLE hydra_client ALTER COLUMN contacts_json DROP DEFAULT; ALTER TABLE hydra_client ALTER COLUMN request_uris_json DROP DEFAULT; -- hydra_client/post_logout_redirect_uris_json is meant to have a default
SQL
hydra/persistence/sql/migrations/20220513000001000002_string_slice_json.postgres.up.sql
-- Migration generated by the command below; DO NOT EDIT. -- hydra:generate hydra migrate gen UPDATE hydra_client SET redirect_uris_json = cast('["' || REPLACE(redirect_uris,'|','","') || '"]' as jsonb) WHERE redirect_uris <> '[]'; UPDATE hydra_client SET grant_types_json = cast('["' || REPLACE(grant_types,'|','","') || '"]' as jsonb) WHERE grant_types <> '[]'; UPDATE hydra_client SET response_types_json = cast('["' || REPLACE(response_types,'|','","') || '"]' as jsonb) WHERE response_types <> '[]'; UPDATE hydra_client SET audience_json = cast('["' || REPLACE(audience,'|','","') || '"]' as jsonb) WHERE audience <> '[]'; UPDATE hydra_client SET allowed_cors_origins_json = cast('["' || REPLACE(allowed_cors_origins,'|','","') || '"]' as jsonb) WHERE allowed_cors_origins <> '[]'; UPDATE hydra_client SET contacts_json = cast('["' || REPLACE(contacts,'|','","') || '"]' as jsonb) WHERE contacts <> '[]'; UPDATE hydra_client SET request_uris_json = cast('["' || REPLACE(request_uris,'|','","') || '"]' as jsonb) WHERE request_uris <> '[]'; UPDATE hydra_client SET post_logout_redirect_uris_json = cast('["' || REPLACE(post_logout_redirect_uris,'|','","') || '"]' as jsonb) WHERE post_logout_redirect_uris <> '[]';
SQL
hydra/persistence/sql/migrations/20220513000001000002_string_slice_json.sqlite.up.sql
-- Migration generated by the command below; DO NOT EDIT. -- hydra:generate hydra migrate gen UPDATE hydra_oauth2_flow SET requested_scope = '[]' WHERE requested_scope = ''; UPDATE hydra_oauth2_flow SET requested_at_audience = '[]' WHERE requested_at_audience = ''; UPDATE hydra_oauth2_flow SET amr = '[]' WHERE amr = ''; UPDATE hydra_oauth2_flow SET granted_scope = '[]' WHERE granted_scope = ''; UPDATE hydra_oauth2_flow SET granted_at_audience = '[]' WHERE granted_at_audience = '';
SQL
hydra/persistence/sql/migrations/20220513000001000003_string_slice_json.cockroach.up.sql
-- Migration generated by the command below; DO NOT EDIT. -- hydra:generate hydra migrate gen ALTER TABLE hydra_client DROP COLUMN redirect_uris; ALTER TABLE hydra_client DROP COLUMN grant_types; ALTER TABLE hydra_client DROP COLUMN response_types; ALTER TABLE hydra_client DROP COLUMN audience; ALTER TABLE hydra_client DROP COLUMN allowed_cors_origins; ALTER TABLE hydra_client DROP COLUMN contacts; ALTER TABLE hydra_client DROP COLUMN request_uris; ALTER TABLE hydra_client DROP COLUMN post_logout_redirect_uris;
SQL
hydra/persistence/sql/migrations/20220513000001000003_string_slice_json.down.sql
-- This blank migration was generated to meet ory/x/popx validation criteria, see https://github.com/ory/x/pull/509; DO NOT EDIT. -- hydra:generate hydra migrate gen
SQL
hydra/persistence/sql/migrations/20220513000001000003_string_slice_json.mysql.up.sql
-- Migration generated by the command below; DO NOT EDIT. -- hydra:generate hydra migrate gen ALTER TABLE hydra_client DROP COLUMN redirect_uris; ALTER TABLE hydra_client DROP COLUMN grant_types; ALTER TABLE hydra_client DROP COLUMN response_types; ALTER TABLE hydra_client DROP COLUMN audience; ALTER TABLE hydra_client DROP COLUMN allowed_cors_origins; ALTER TABLE hydra_client DROP COLUMN contacts; ALTER TABLE hydra_client DROP COLUMN request_uris; ALTER TABLE hydra_client DROP COLUMN post_logout_redirect_uris;
SQL
hydra/persistence/sql/migrations/20220513000001000003_string_slice_json.postgres.up.sql
-- Migration generated by the command below; DO NOT EDIT. -- hydra:generate hydra migrate gen ALTER TABLE hydra_client ALTER COLUMN redirect_uris_json DROP DEFAULT; ALTER TABLE hydra_client ALTER COLUMN grant_types_json DROP DEFAULT; ALTER TABLE hydra_client ALTER COLUMN response_types_json DROP DEFAULT; ALTER TABLE hydra_client ALTER COLUMN audience_json DROP DEFAULT; ALTER TABLE hydra_client ALTER COLUMN allowed_cors_origins_json DROP DEFAULT; ALTER TABLE hydra_client ALTER COLUMN contacts_json DROP DEFAULT; ALTER TABLE hydra_client ALTER COLUMN request_uris_json DROP DEFAULT; -- hydra_client/post_logout_redirect_uris_json is meant to have a default
SQL
hydra/persistence/sql/migrations/20220513000001000003_string_slice_json.sqlite.up.sql
-- Migration generated by the command below; DO NOT EDIT. -- hydra:generate hydra migrate gen UPDATE hydra_oauth2_flow SET requested_scope = '["' || REPLACE(requested_scope,'|','","') || '"]' WHERE requested_scope <> '[]'; UPDATE hydra_oauth2_flow SET requested_at_audience = '["' || REPLACE(requested_at_audience,'|','","') || '"]' WHERE requested_at_audience <> '[]'; UPDATE hydra_oauth2_flow SET amr = '["' || REPLACE(amr,'|','","') || '"]' WHERE amr <> '[]'; UPDATE hydra_oauth2_flow SET granted_scope = '["' || REPLACE(granted_scope,'|','","') || '"]' WHERE granted_scope <> '[]'; UPDATE hydra_oauth2_flow SET granted_at_audience = '["' || REPLACE(granted_at_audience,'|','","') || '"]' WHERE granted_at_audience <> '[]';
SQL
hydra/persistence/sql/migrations/20220513000001000004_string_slice_json.cockroach.up.sql
-- Migration generated by the command below; DO NOT EDIT. -- hydra:generate hydra migrate gen ALTER TABLE hydra_client RENAME COLUMN redirect_uris_json TO redirect_uris; ALTER TABLE hydra_client RENAME COLUMN grant_types_json TO grant_types; ALTER TABLE hydra_client RENAME COLUMN response_types_json TO response_types; ALTER TABLE hydra_client RENAME COLUMN audience_json TO audience; ALTER TABLE hydra_client RENAME COLUMN allowed_cors_origins_json TO allowed_cors_origins; ALTER TABLE hydra_client RENAME COLUMN contacts_json TO contacts; ALTER TABLE hydra_client RENAME COLUMN request_uris_json TO request_uris; ALTER TABLE hydra_client RENAME COLUMN post_logout_redirect_uris_json TO post_logout_redirect_uris;
SQL
hydra/persistence/sql/migrations/20220513000001000004_string_slice_json.down.sql
-- This blank migration was generated to meet ory/x/popx validation criteria, see https://github.com/ory/x/pull/509; DO NOT EDIT. -- hydra:generate hydra migrate gen
SQL
hydra/persistence/sql/migrations/20220513000001000004_string_slice_json.mysql.up.sql
-- Migration generated by the command below; DO NOT EDIT. -- hydra:generate hydra migrate gen ALTER TABLE hydra_client RENAME COLUMN redirect_uris_json TO redirect_uris; ALTER TABLE hydra_client RENAME COLUMN grant_types_json TO grant_types; ALTER TABLE hydra_client RENAME COLUMN response_types_json TO response_types; ALTER TABLE hydra_client RENAME COLUMN audience_json TO audience; ALTER TABLE hydra_client RENAME COLUMN allowed_cors_origins_json TO allowed_cors_origins; ALTER TABLE hydra_client RENAME COLUMN contacts_json TO contacts; ALTER TABLE hydra_client RENAME COLUMN request_uris_json TO request_uris; ALTER TABLE hydra_client RENAME COLUMN post_logout_redirect_uris_json TO post_logout_redirect_uris;
SQL
hydra/persistence/sql/migrations/20220513000001000004_string_slice_json.postgres.up.sql
-- Migration generated by the command below; DO NOT EDIT. -- hydra:generate hydra migrate gen ALTER TABLE hydra_client DROP COLUMN redirect_uris; ALTER TABLE hydra_client DROP COLUMN grant_types; ALTER TABLE hydra_client DROP COLUMN response_types; ALTER TABLE hydra_client DROP COLUMN audience; ALTER TABLE hydra_client DROP COLUMN allowed_cors_origins; ALTER TABLE hydra_client DROP COLUMN contacts; ALTER TABLE hydra_client DROP COLUMN request_uris; ALTER TABLE hydra_client DROP COLUMN post_logout_redirect_uris; ALTER TABLE hydra_client RENAME COLUMN redirect_uris_json TO redirect_uris; ALTER TABLE hydra_client RENAME COLUMN grant_types_json TO grant_types; ALTER TABLE hydra_client RENAME COLUMN response_types_json TO response_types; ALTER TABLE hydra_client RENAME COLUMN audience_json TO audience; ALTER TABLE hydra_client RENAME COLUMN allowed_cors_origins_json TO allowed_cors_origins; ALTER TABLE hydra_client RENAME COLUMN contacts_json TO contacts; ALTER TABLE hydra_client RENAME COLUMN request_uris_json TO request_uris; ALTER TABLE hydra_client RENAME COLUMN post_logout_redirect_uris_json TO post_logout_redirect_uris;
SQL
hydra/persistence/sql/migrations/20220513000001000004_string_slice_json.sqlite.up.sql
-- This blank migration was generated to meet ory/x/popx validation criteria, see https://github.com/ory/x/pull/509; DO NOT EDIT. -- hydra:generate hydra migrate gen
SQL
hydra/persistence/sql/migrations/20220513000001000005_string_slice_json.cockroach.up.sql
-- Migration generated by the command below; DO NOT EDIT. -- hydra:generate hydra migrate gen ALTER TABLE hydra_oauth2_flow ADD COLUMN requested_scope_json jsonb NOT NULL DEFAULT '[]'; ALTER TABLE hydra_oauth2_flow ADD COLUMN requested_at_audience_json jsonb DEFAULT '[]'; ALTER TABLE hydra_oauth2_flow ADD COLUMN amr_json jsonb DEFAULT '[]'; ALTER TABLE hydra_oauth2_flow ADD COLUMN granted_scope_json jsonb; ALTER TABLE hydra_oauth2_flow ADD COLUMN granted_at_audience_json jsonb DEFAULT '[]';
SQL
hydra/persistence/sql/migrations/20220513000001000005_string_slice_json.down.sql
-- This blank migration was generated to meet ory/x/popx validation criteria, see https://github.com/ory/x/pull/509; DO NOT EDIT. -- hydra:generate hydra migrate gen
SQL
hydra/persistence/sql/migrations/20220513000001000005_string_slice_json.mysql.up.sql
-- Migration generated by the command below; DO NOT EDIT. -- hydra:generate hydra migrate gen ALTER TABLE hydra_oauth2_flow ADD COLUMN requested_scope_json json NOT NULL DEFAULT ('[]'); ALTER TABLE hydra_oauth2_flow ADD COLUMN requested_at_audience_json json DEFAULT ('[]'); ALTER TABLE hydra_oauth2_flow ADD COLUMN amr_json json DEFAULT ('[]'); ALTER TABLE hydra_oauth2_flow ADD COLUMN granted_scope_json json; ALTER TABLE hydra_oauth2_flow ADD COLUMN granted_at_audience_json json DEFAULT ('[]');
SQL
hydra/persistence/sql/migrations/20220513000001000005_string_slice_json.postgres.up.sql
-- Migration generated by the command below; DO NOT EDIT. -- hydra:generate hydra migrate gen ALTER TABLE hydra_oauth2_flow ADD COLUMN requested_scope_json jsonb NOT NULL DEFAULT '[]'; ALTER TABLE hydra_oauth2_flow ADD COLUMN requested_at_audience_json jsonb DEFAULT '[]'; ALTER TABLE hydra_oauth2_flow ADD COLUMN amr_json jsonb DEFAULT '[]'; ALTER TABLE hydra_oauth2_flow ADD COLUMN granted_scope_json jsonb; ALTER TABLE hydra_oauth2_flow ADD COLUMN granted_at_audience_json jsonb DEFAULT '[]';
SQL
hydra/persistence/sql/migrations/20220513000001000005_string_slice_json.sqlite.up.sql
-- This blank migration was generated to meet ory/x/popx validation criteria, see https://github.com/ory/x/pull/509; DO NOT EDIT. -- hydra:generate hydra migrate gen
SQL
hydra/persistence/sql/migrations/20220513000001000006_string_slice_json.cockroach.up.sql
-- Migration generated by the command below; DO NOT EDIT. -- hydra:generate hydra migrate gen UPDATE hydra_oauth2_flow SET requested_scope = '[]' WHERE requested_scope = ''; UPDATE hydra_oauth2_flow SET requested_at_audience = '[]' WHERE requested_at_audience = ''; UPDATE hydra_oauth2_flow SET amr = '[]' WHERE amr = ''; UPDATE hydra_oauth2_flow SET granted_scope = '[]' WHERE granted_scope = ''; UPDATE hydra_oauth2_flow SET granted_at_audience = '[]' WHERE granted_at_audience = '';
SQL
hydra/persistence/sql/migrations/20220513000001000006_string_slice_json.down.sql
-- This blank migration was generated to meet ory/x/popx validation criteria, see https://github.com/ory/x/pull/509; DO NOT EDIT. -- hydra:generate hydra migrate gen
SQL
hydra/persistence/sql/migrations/20220513000001000006_string_slice_json.mysql.up.sql
-- Migration generated by the command below; DO NOT EDIT. -- hydra:generate hydra migrate gen UPDATE hydra_oauth2_flow SET requested_scope = ('[]') WHERE requested_scope = ''; UPDATE hydra_oauth2_flow SET requested_at_audience = ('[]') WHERE requested_at_audience = ''; UPDATE hydra_oauth2_flow SET amr = ('[]') WHERE amr = ''; UPDATE hydra_oauth2_flow SET granted_scope = ('[]') WHERE granted_scope = ''; UPDATE hydra_oauth2_flow SET granted_at_audience = ('[]') WHERE granted_at_audience = '';
SQL
hydra/persistence/sql/migrations/20220513000001000006_string_slice_json.postgres.up.sql
-- Migration generated by the command below; DO NOT EDIT. -- hydra:generate hydra migrate gen UPDATE hydra_oauth2_flow SET requested_scope = '[]' WHERE requested_scope = ''; UPDATE hydra_oauth2_flow SET requested_at_audience = '[]' WHERE requested_at_audience = ''; UPDATE hydra_oauth2_flow SET amr = '[]' WHERE amr = ''; UPDATE hydra_oauth2_flow SET granted_scope = '[]' WHERE granted_scope = ''; UPDATE hydra_oauth2_flow SET granted_at_audience = '[]' WHERE granted_at_audience = '';
SQL
hydra/persistence/sql/migrations/20220513000001000006_string_slice_json.sqlite.up.sql
-- This blank migration was generated to meet ory/x/popx validation criteria, see https://github.com/ory/x/pull/509; DO NOT EDIT. -- hydra:generate hydra migrate gen
SQL
hydra/persistence/sql/migrations/20220513000001000007_string_slice_json.cockroach.up.sql
-- Migration generated by the command below; DO NOT EDIT. -- hydra:generate hydra migrate gen UPDATE hydra_oauth2_flow SET requested_scope_json = cast('["' || REPLACE(requested_scope,'|','","') || '"]' as jsonb) WHERE requested_scope <> '[]'; UPDATE hydra_oauth2_flow SET requested_at_audience_json = cast('["' || REPLACE(requested_at_audience,'|','","') || '"]' as jsonb) WHERE requested_at_audience <> '[]'; UPDATE hydra_oauth2_flow SET amr_json = cast('["' || REPLACE(amr,'|','","') || '"]' as jsonb) WHERE amr <> '[]'; UPDATE hydra_oauth2_flow SET granted_scope_json = cast('["' || REPLACE(granted_scope,'|','","') || '"]' as jsonb) WHERE granted_scope <> '[]'; UPDATE hydra_oauth2_flow SET granted_at_audience_json = cast('["' || REPLACE(granted_at_audience,'|','","') || '"]' as jsonb) WHERE granted_at_audience <> '[]';
SQL
hydra/persistence/sql/migrations/20220513000001000007_string_slice_json.down.sql
-- This blank migration was generated to meet ory/x/popx validation criteria, see https://github.com/ory/x/pull/509; DO NOT EDIT. -- hydra:generate hydra migrate gen
SQL
hydra/persistence/sql/migrations/20220513000001000007_string_slice_json.mysql.up.sql
-- Migration generated by the command below; DO NOT EDIT. -- hydra:generate hydra migrate gen UPDATE hydra_oauth2_flow SET requested_scope_json = cast(concat('["' , REPLACE(requested_scope,'|','","') , '"]') as json) WHERE requested_scope <> ('[]'); UPDATE hydra_oauth2_flow SET requested_at_audience_json = cast( concat('["' , REPLACE(requested_at_audience,'|','","') , '"]') as json) WHERE requested_at_audience <> ('[]'); UPDATE hydra_oauth2_flow SET amr_json = cast( concat('["' , REPLACE(amr,'|','","') , '"]') as json) WHERE amr <> ('[]'); UPDATE hydra_oauth2_flow SET granted_scope_json = cast(concat('["' , REPLACE(granted_scope,'|','","') , '"]') as json) WHERE granted_scope <> ('[]'); UPDATE hydra_oauth2_flow SET granted_at_audience_json = cast(concat('["' , REPLACE(granted_at_audience,'|','","') , '"]') as json) WHERE granted_at_audience <> ('[]');
SQL
hydra/persistence/sql/migrations/20220513000001000007_string_slice_json.postgres.up.sql
-- Migration generated by the command below; DO NOT EDIT. -- hydra:generate hydra migrate gen UPDATE hydra_oauth2_flow SET requested_scope_json = cast('["' || REPLACE(requested_scope,'|','","') || '"]' as jsonb) WHERE requested_scope <> '[]'; UPDATE hydra_oauth2_flow SET requested_at_audience_json = cast('["' || REPLACE(requested_at_audience,'|','","') || '"]' as jsonb) WHERE requested_at_audience <> '[]'; UPDATE hydra_oauth2_flow SET amr_json = cast('["' || REPLACE(amr,'|','","') || '"]' as jsonb) WHERE amr <> '[]'; UPDATE hydra_oauth2_flow SET granted_scope_json = cast('["' || REPLACE(granted_scope,'|','","') || '"]' as jsonb) WHERE granted_scope <> '[]'; UPDATE hydra_oauth2_flow SET granted_at_audience_json = cast('["' || REPLACE(granted_at_audience,'|','","') || '"]' as jsonb) WHERE granted_at_audience <> '[]';
SQL
hydra/persistence/sql/migrations/20220513000001000007_string_slice_json.sqlite.up.sql
-- This blank migration was generated to meet ory/x/popx validation criteria, see https://github.com/ory/x/pull/509; DO NOT EDIT. -- hydra:generate hydra migrate gen
SQL
hydra/persistence/sql/migrations/20220513000001000008_string_slice_json.cockroach.up.sql
-- Migration generated by the command below; DO NOT EDIT. -- hydra:generate hydra migrate gen ALTER TABLE hydra_oauth2_flow ALTER COLUMN requested_scope_json DROP DEFAULT;
SQL
hydra/persistence/sql/migrations/20220513000001000008_string_slice_json.down.sql
-- This blank migration was generated to meet ory/x/popx validation criteria, see https://github.com/ory/x/pull/509; DO NOT EDIT. -- hydra:generate hydra migrate gen
SQL
hydra/persistence/sql/migrations/20220513000001000008_string_slice_json.mysql.up.sql
-- Migration generated by the command below; DO NOT EDIT. -- hydra:generate hydra migrate gen ALTER TABLE hydra_oauth2_flow ALTER COLUMN requested_scope_json DROP DEFAULT;
SQL
hydra/persistence/sql/migrations/20220513000001000008_string_slice_json.postgres.up.sql
-- Migration generated by the command below; DO NOT EDIT. -- hydra:generate hydra migrate gen ALTER TABLE hydra_oauth2_flow ALTER COLUMN requested_scope_json DROP DEFAULT; ALTER TABLE hydra_oauth2_flow DROP COLUMN requested_scope; ALTER TABLE hydra_oauth2_flow DROP COLUMN requested_at_audience; ALTER TABLE hydra_oauth2_flow DROP COLUMN amr; ALTER TABLE hydra_oauth2_flow DROP COLUMN granted_scope; ALTER TABLE hydra_oauth2_flow DROP COLUMN granted_at_audience; ALTER TABLE hydra_oauth2_flow RENAME COLUMN requested_scope_json TO requested_scope; ALTER TABLE hydra_oauth2_flow RENAME COLUMN requested_at_audience_json TO requested_at_audience; ALTER TABLE hydra_oauth2_flow RENAME COLUMN amr_json TO amr; ALTER TABLE hydra_oauth2_flow RENAME COLUMN granted_scope_json TO granted_scope; ALTER TABLE hydra_oauth2_flow RENAME COLUMN granted_at_audience_json TO granted_at_audience; -- scripts/db-diff.sh can be used in code review to verify that the constraint hasn't changed; we need to recreate it due to the dropped and re-added columns ALTER TABLE hydra_oauth2_flow ADD CHECK ( state = 128 OR state = 129 OR state = 1 OR (state = 2 AND ( login_remember IS NOT NULL AND login_remember_for IS NOT NULL AND login_error IS NOT NULL AND acr IS NOT NULL AND login_was_used IS NOT NULL AND context IS NOT NULL AND amr IS NOT NULL )) OR (state = 3 AND ( login_remember IS NOT NULL AND login_remember_for IS NOT NULL AND login_error IS NOT NULL AND acr IS NOT NULL AND login_was_used IS NOT NULL AND context IS NOT NULL AND amr IS NOT NULL )) OR (state = 4 AND ( login_remember IS NOT NULL AND login_remember_for IS NOT NULL AND login_error IS NOT NULL AND acr IS NOT NULL AND login_was_used IS NOT NULL AND context IS NOT NULL AND amr IS NOT NULL AND consent_challenge_id IS NOT NULL AND consent_verifier IS NOT NULL AND consent_skip IS NOT NULL AND consent_csrf IS NOT NULL )) OR (state = 5 AND ( login_remember IS NOT NULL AND login_remember_for IS NOT NULL AND login_error IS NOT NULL AND acr IS NOT NULL AND login_was_used IS NOT NULL AND context IS NOT NULL AND amr IS NOT NULL AND consent_challenge_id IS NOT NULL AND consent_verifier IS NOT NULL AND consent_skip IS NOT NULL AND consent_csrf IS NOT NULL )) OR (state = 6 AND ( login_remember IS NOT NULL AND login_remember_for IS NOT NULL AND login_error IS NOT NULL AND acr IS NOT NULL AND login_was_used IS NOT NULL AND context IS NOT NULL AND amr IS NOT NULL AND consent_challenge_id IS NOT NULL AND consent_verifier IS NOT NULL AND consent_skip IS NOT NULL AND consent_csrf IS NOT NULL AND granted_scope IS NOT NULL AND consent_remember IS NOT NULL AND consent_remember_for IS NOT NULL AND consent_error IS NOT NULL AND session_access_token IS NOT NULL AND session_id_token IS NOT NULL AND consent_was_used IS NOT NULL )) )
SQL
hydra/persistence/sql/migrations/20220513000001000008_string_slice_json.sqlite.up.sql
-- This blank migration was generated to meet ory/x/popx validation criteria, see https://github.com/ory/x/pull/509; DO NOT EDIT. -- hydra:generate hydra migrate gen
SQL
hydra/persistence/sql/migrations/20220513000001000009_string_slice_json.cockroach.up.sql
-- Migration generated by the command below; DO NOT EDIT. -- hydra:generate hydra migrate gen ALTER TABLE hydra_oauth2_flow DROP COLUMN requested_scope; ALTER TABLE hydra_oauth2_flow DROP COLUMN requested_at_audience; ALTER TABLE hydra_oauth2_flow DROP COLUMN amr; ALTER TABLE hydra_oauth2_flow DROP COLUMN granted_scope; ALTER TABLE hydra_oauth2_flow DROP COLUMN granted_at_audience;
SQL
hydra/persistence/sql/migrations/20220513000001000009_string_slice_json.down.sql
-- This blank migration was generated to meet ory/x/popx validation criteria, see https://github.com/ory/x/pull/509; DO NOT EDIT. -- hydra:generate hydra migrate gen
SQL
hydra/persistence/sql/migrations/20220513000001000009_string_slice_json.mysql.up.sql
-- Migration generated by the command below; DO NOT EDIT. -- hydra:generate hydra migrate gen ALTER TABLE hydra_oauth2_flow DROP CONSTRAINT hydra_oauth2_flow_chk; ALTER TABLE hydra_oauth2_flow DROP COLUMN requested_scope; ALTER TABLE hydra_oauth2_flow DROP COLUMN requested_at_audience; ALTER TABLE hydra_oauth2_flow DROP COLUMN amr; ALTER TABLE hydra_oauth2_flow DROP COLUMN granted_scope; ALTER TABLE hydra_oauth2_flow DROP COLUMN granted_at_audience;
SQL
hydra/persistence/sql/migrations/20220513000001000009_string_slice_json.postgres.up.sql
-- This blank migration was generated to meet ory/x/popx validation criteria, see https://github.com/ory/x/pull/509; DO NOT EDIT. -- hydra:generate hydra migrate gen
SQL
hydra/persistence/sql/migrations/20220513000001000009_string_slice_json.sqlite.up.sql
-- This blank migration was generated to meet ory/x/popx validation criteria, see https://github.com/ory/x/pull/509; DO NOT EDIT. -- hydra:generate hydra migrate gen
SQL
hydra/persistence/sql/migrations/20220513000001000010_string_slice_json.cockroach.up.sql
-- Migration generated by the command below; DO NOT EDIT. -- hydra:generate hydra migrate gen ALTER TABLE hydra_oauth2_flow RENAME COLUMN requested_scope_json TO requested_scope; ALTER TABLE hydra_oauth2_flow RENAME COLUMN requested_at_audience_json TO requested_at_audience; ALTER TABLE hydra_oauth2_flow RENAME COLUMN amr_json TO amr; ALTER TABLE hydra_oauth2_flow RENAME COLUMN granted_scope_json TO granted_scope; ALTER TABLE hydra_oauth2_flow RENAME COLUMN granted_at_audience_json TO granted_at_audience; -- scripts/db-diff.sh can be used in code review to verify that the constraint hasn't changed; we need to recreate it due to the dropped and re-added columns ALTER TABLE hydra_oauth2_flow ADD CHECK ( state = 128 OR state = 129 OR state = 1 OR (state = 2 AND ( login_remember IS NOT NULL AND login_remember_for IS NOT NULL AND login_error IS NOT NULL AND acr IS NOT NULL AND login_was_used IS NOT NULL AND context IS NOT NULL AND amr IS NOT NULL )) OR (state = 3 AND ( login_remember IS NOT NULL AND login_remember_for IS NOT NULL AND login_error IS NOT NULL AND acr IS NOT NULL AND login_was_used IS NOT NULL AND context IS NOT NULL AND amr IS NOT NULL )) OR (state = 4 AND ( login_remember IS NOT NULL AND login_remember_for IS NOT NULL AND login_error IS NOT NULL AND acr IS NOT NULL AND login_was_used IS NOT NULL AND context IS NOT NULL AND amr IS NOT NULL AND consent_challenge_id IS NOT NULL AND consent_verifier IS NOT NULL AND consent_skip IS NOT NULL AND consent_csrf IS NOT NULL )) OR (state = 5 AND ( login_remember IS NOT NULL AND login_remember_for IS NOT NULL AND login_error IS NOT NULL AND acr IS NOT NULL AND login_was_used IS NOT NULL AND context IS NOT NULL AND amr IS NOT NULL AND consent_challenge_id IS NOT NULL AND consent_verifier IS NOT NULL AND consent_skip IS NOT NULL AND consent_csrf IS NOT NULL )) OR (state = 6 AND ( login_remember IS NOT NULL AND login_remember_for IS NOT NULL AND login_error IS NOT NULL AND acr IS NOT NULL AND login_was_used IS NOT NULL AND context IS NOT NULL AND amr IS NOT NULL AND consent_challenge_id IS NOT NULL AND consent_verifier IS NOT NULL AND consent_skip IS NOT NULL AND consent_csrf IS NOT NULL AND granted_scope IS NOT NULL AND consent_remember IS NOT NULL AND consent_remember_for IS NOT NULL AND consent_error IS NOT NULL AND session_access_token IS NOT NULL AND session_id_token IS NOT NULL AND consent_was_used IS NOT NULL )) )
SQL
hydra/persistence/sql/migrations/20220513000001000010_string_slice_json.down.sql
-- This blank migration was generated to meet ory/x/popx validation criteria, see https://github.com/ory/x/pull/509; DO NOT EDIT. -- hydra:generate hydra migrate gen
SQL
hydra/persistence/sql/migrations/20220513000001000010_string_slice_json.mysql.up.sql
-- Migration generated by the command below; DO NOT EDIT. -- hydra:generate hydra migrate gen ALTER TABLE hydra_oauth2_flow RENAME COLUMN requested_scope_json TO requested_scope; ALTER TABLE hydra_oauth2_flow RENAME COLUMN requested_at_audience_json TO requested_at_audience; ALTER TABLE hydra_oauth2_flow RENAME COLUMN amr_json TO amr; ALTER TABLE hydra_oauth2_flow RENAME COLUMN granted_scope_json TO granted_scope; ALTER TABLE hydra_oauth2_flow RENAME COLUMN granted_at_audience_json TO granted_at_audience; -- scripts/db-diff.sh can be used in code review to verify that the constraint hasn't changed; we need to recreate it due to the dropped and re-added columns ALTER TABLE hydra_oauth2_flow ADD CONSTRAINT hydra_oauth2_flow_chk CHECK ( state = 128 OR state = 129 OR state = 1 OR (state = 2 AND ( login_remember IS NOT NULL AND login_remember_for IS NOT NULL AND login_error IS NOT NULL AND acr IS NOT NULL AND login_was_used IS NOT NULL AND context IS NOT NULL AND amr IS NOT NULL )) OR (state = 3 AND ( login_remember IS NOT NULL AND login_remember_for IS NOT NULL AND login_error IS NOT NULL AND acr IS NOT NULL AND login_was_used IS NOT NULL AND context IS NOT NULL AND amr IS NOT NULL )) OR (state = 4 AND ( login_remember IS NOT NULL AND login_remember_for IS NOT NULL AND login_error IS NOT NULL AND acr IS NOT NULL AND login_was_used IS NOT NULL AND context IS NOT NULL AND amr IS NOT NULL AND consent_challenge_id IS NOT NULL AND consent_verifier IS NOT NULL AND consent_skip IS NOT NULL AND consent_csrf IS NOT NULL )) OR (state = 5 AND ( login_remember IS NOT NULL AND login_remember_for IS NOT NULL AND login_error IS NOT NULL AND acr IS NOT NULL AND login_was_used IS NOT NULL AND context IS NOT NULL AND amr IS NOT NULL AND consent_challenge_id IS NOT NULL AND consent_verifier IS NOT NULL AND consent_skip IS NOT NULL AND consent_csrf IS NOT NULL )) OR (state = 6 AND ( login_remember IS NOT NULL AND login_remember_for IS NOT NULL AND login_error IS NOT NULL AND acr IS NOT NULL AND login_was_used IS NOT NULL AND context IS NOT NULL AND amr IS NOT NULL AND consent_challenge_id IS NOT NULL AND consent_verifier IS NOT NULL AND consent_skip IS NOT NULL AND consent_csrf IS NOT NULL AND granted_scope IS NOT NULL AND consent_remember IS NOT NULL AND consent_remember_for IS NOT NULL AND consent_error IS NOT NULL AND session_access_token IS NOT NULL AND session_id_token IS NOT NULL AND consent_was_used IS NOT NULL )) )
SQL
hydra/persistence/sql/migrations/20220513000001000010_string_slice_json.postgres.up.sql
-- This blank migration was generated to meet ory/x/popx validation criteria, see https://github.com/ory/x/pull/509; DO NOT EDIT. -- hydra:generate hydra migrate gen
SQL
hydra/persistence/sql/migrations/20220513000001000010_string_slice_json.sqlite.up.sql
-- This blank migration was generated to meet ory/x/popx validation criteria, see https://github.com/ory/x/pull/509; DO NOT EDIT. -- hydra:generate hydra migrate gen
SQL
hydra/persistence/sql/migrations/20220916000010000000_hydra_oauth2_flow.cockroach.up.sql
CREATE INDEX hydra_oauth2_flow_multi_query_idx ON hydra_oauth2_flow ( consent_error ASC, state ASC, subject ASC, client_id ASC, consent_skip ASC, consent_remember ASC, nid ASC );
SQL
hydra/persistence/sql/migrations/20220916000010000000_hydra_oauth2_flow.mysql.up.sql
CREATE INDEX hydra_oauth2_flow_multi_query_idx ON hydra_oauth2_flow ( consent_error(2) ASC, state ASC, subject ASC, client_id ASC, consent_skip ASC, consent_remember ASC, nid ASC );
SQL
hydra/persistence/sql/migrations/20220916000010000000_hydra_oauth2_flow.postgres.up.sql
CREATE INDEX hydra_oauth2_flow_multi_query_idx ON hydra_oauth2_flow ( (consent_error::varchar(2)) ASC, state ASC, subject ASC, client_id ASC, consent_skip ASC, consent_remember ASC, nid ASC );
SQL
hydra/persistence/sql/migrations/20220916000010000000_hydra_oauth2_flow.sqlite.up.sql
CREATE INDEX hydra_oauth2_flow_multi_query_idx ON hydra_oauth2_flow ( consent_error ASC, state ASC, subject ASC, client_id ASC, consent_skip ASC, consent_remember ASC, nid ASC );
SQL
hydra/persistence/sql/migrations/20221109000010000000_fix_foreign_key.mysql.up.sql
ALTER TABLE hydra_oauth2_flow DROP CONSTRAINT hydra_oauth2_flow_login_session_id_fk; ALTER TABLE hydra_oauth2_flow ADD CONSTRAINT hydra_oauth2_flow_login_session_id_fk FOREIGN KEY (login_session_id) REFERENCES hydra_oauth2_authentication_session(id) ON DELETE SET NULL; ALTER TABLE hydra_oauth2_flow ALTER COLUMN login_session_id DROP DEFAULT;
SQL
hydra/persistence/sql/migrations/20221109000010000000_fix_foreign_key.postgres.up.sql
ALTER TABLE hydra_oauth2_flow DROP CONSTRAINT hydra_oauth2_flow_login_session_id_fk; ALTER TABLE hydra_oauth2_flow ADD CONSTRAINT hydra_oauth2_flow_login_session_id_fk FOREIGN KEY (login_session_id) REFERENCES hydra_oauth2_authentication_session(id) ON DELETE SET NULL; ALTER TABLE hydra_oauth2_flow ALTER COLUMN login_session_id DROP DEFAULT;
SQL
hydra/persistence/sql/migrations/20221109000010000001_fix_foreign_key.cockroach.up.sql
ALTER TABLE hydra_oauth2_flow ADD CONSTRAINT hydra_oauth2_flow_login_session_id_fk FOREIGN KEY (login_session_id) REFERENCES hydra_oauth2_authentication_session(id) ON DELETE SET NULL; ALTER TABLE hydra_oauth2_flow ALTER COLUMN login_session_id DROP DEFAULT;
SQL
hydra/persistence/sql/migrations/20230313112801000001_support_extend_session_lifespan.mysql.up.sql
ALTER TABLE hydra_oauth2_flow ADD COLUMN login_extend_session_lifespan BOOLEAN NOT NULL DEFAULT FALSE;
SQL
hydra/persistence/sql/migrations/20230606112801000001_remove_flow_indices.down.sql
CREATE UNIQUE INDEX hydra_oauth2_flow_login_verifier_idx ON hydra_oauth2_flow (login_verifier); CREATE UNIQUE INDEX hydra_oauth2_flow_consent_verifier_idx ON hydra_oauth2_flow (consent_verifier); CREATE INDEX hydra_oauth2_flow_multi_query_idx ON hydra_oauth2_flow ( consent_error ASC, state ASC, subject ASC, client_id ASC, consent_skip ASC, consent_remember ASC, nid ASC ); DROP INDEX hydra_oauth2_flow_previous_consents_idx;
SQL
hydra/persistence/sql/migrations/20230606112801000001_remove_flow_indices.mysql.down.sql
CREATE UNIQUE INDEX hydra_oauth2_flow_login_verifier_idx ON hydra_oauth2_flow (login_verifier); CREATE UNIQUE INDEX hydra_oauth2_flow_consent_verifier_idx ON hydra_oauth2_flow (consent_verifier); CREATE INDEX hydra_oauth2_flow_multi_query_idx ON hydra_oauth2_flow ( consent_error(2) ASC, state ASC, subject ASC, client_id ASC, consent_skip ASC, consent_remember ASC, nid ASC ); DROP INDEX hydra_oauth2_flow_previous_consents_idx ON hydra_oauth2_flow;