-
-
Notifications
You must be signed in to change notification settings - Fork 493
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: rename SAML application secrets/configs constraints (#6840)
- Loading branch information
Showing
3 changed files
with
36 additions
and
2 deletions.
There are no files selected for viewing
34 changes: 34 additions & 0 deletions
34
packages/schemas/alterations/next-1732851150-rename-saml-application-constraints.ts
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,34 @@ | ||
import { sql } from '@silverhand/slonik'; | ||
|
||
import type { AlterationScript } from '../lib/types/alteration.js'; | ||
|
||
const alteration: AlterationScript = { | ||
up: async (pool) => { | ||
await pool.query(sql` | ||
alter table saml_application_configs | ||
rename constraint application_type | ||
to saml_application_configs__application_type; | ||
`); | ||
|
||
await pool.query(sql` | ||
alter table saml_application_secrets | ||
rename constraint application_type | ||
to saml_application_secrets__application_type; | ||
`); | ||
}, | ||
down: async (pool) => { | ||
await pool.query(sql` | ||
alter table saml_application_configs | ||
rename constraint saml_application_configs__application_type | ||
to application_type; | ||
`); | ||
|
||
await pool.query(sql` | ||
alter table saml_application_secrets | ||
rename constraint saml_application_secrets__application_type | ||
to application_type; | ||
`); | ||
}, | ||
}; | ||
|
||
export default alteration; |
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