generated from 8iq/nodejs-hackathon-boilerplate-starter-kit
-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(condo): INFRA-264 OIDC Enabled field and deletedAt fix (#4344)
* feat(condo): INFRA-264 OIDC Enabled field and deletedAt fix * feat(condo): INFRA-264 regenerate migration and throw separate error * feat(condo): INFRA-264 changed error message
- Loading branch information
1 parent
5bf4a4e
commit f04c369
Showing
8 changed files
with
542 additions
and
363 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
apps/condo/migrations/20240221230519-0368_oidcclient_isenabled_and_more.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
// auto generated by kmigrator | ||
// KMIGRATOR:0368_oidcclient_isenabled_and_more:IyBHZW5lcmF0ZWQgYnkgRGphbmdvIDQuMS41IG9uIDIwMjQtMDItMjEgMTg6MDcKCmZyb20gZGphbmdvLmRiIGltcG9ydCBtaWdyYXRpb25zLCBtb2RlbHMKCgpjbGFzcyBNaWdyYXRpb24obWlncmF0aW9ucy5NaWdyYXRpb24pOgoKICAgIGRlcGVuZGVuY2llcyA9IFsKICAgICAgICAoJ19kamFuZ29fc2NoZW1hJywgJzAzNjdfbm90aWZpY2F0aW9uYW5vbnltb3Vzc2V0dGluZ2hpc3RvcnlyZWNvcmRfYW5kX21vcmUnKSwKICAgIF0KCiAgICBvcGVyYXRpb25zID0gWwogICAgICAgIG1pZ3JhdGlvbnMuQWRkRmllbGQoCiAgICAgICAgICAgIG1vZGVsX25hbWU9J29pZGNjbGllbnQnLAogICAgICAgICAgICBuYW1lPSdpc0VuYWJsZWQnLAogICAgICAgICAgICBmaWVsZD1tb2RlbHMuQm9vbGVhbkZpZWxkKGRlZmF1bHQ9VHJ1ZSksCiAgICAgICAgICAgIHByZXNlcnZlX2RlZmF1bHQ9RmFsc2UsCiAgICAgICAgKSwKICAgICAgICBtaWdyYXRpb25zLkFkZEZpZWxkKAogICAgICAgICAgICBtb2RlbF9uYW1lPSdvaWRjY2xpZW50aGlzdG9yeXJlY29yZCcsCiAgICAgICAgICAgIG5hbWU9J2lzRW5hYmxlZCcsCiAgICAgICAgICAgIGZpZWxkPW1vZGVscy5Cb29sZWFuRmllbGQoYmxhbms9VHJ1ZSwgbnVsbD1UcnVlKSwKICAgICAgICApLAogICAgXQo= | ||
|
||
exports.up = async (knex) => { | ||
await knex.raw(` | ||
BEGIN; | ||
-- | ||
-- Add field isEnabled to oidcclient | ||
-- | ||
ALTER TABLE "OidcClient" ADD COLUMN "isEnabled" boolean DEFAULT true NOT NULL; | ||
ALTER TABLE "OidcClient" ALTER COLUMN "isEnabled" DROP DEFAULT; | ||
-- | ||
-- Add field isEnabled to oidcclienthistoryrecord | ||
-- | ||
ALTER TABLE "OidcClientHistoryRecord" ADD COLUMN "isEnabled" boolean NULL; | ||
COMMIT; | ||
`) | ||
} | ||
|
||
exports.down = async (knex) => { | ||
await knex.raw(` | ||
BEGIN; | ||
-- | ||
-- Add field isEnabled to oidcclienthistoryrecord | ||
-- | ||
ALTER TABLE "OidcClientHistoryRecord" DROP COLUMN "isEnabled" CASCADE; | ||
-- | ||
-- Add field isEnabled to oidcclient | ||
-- | ||
ALTER TABLE "OidcClient" DROP COLUMN "isEnabled" CASCADE; | ||
COMMIT; | ||
`) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters