0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2025-02-24 22:05:56 -05:00
logto/packages/schemas/alterations/1.23.0-1732851150-rename-saml-application-constraints.ts
silverhand-bot 460ea89dd6
release: version packages (#6850)
* release: version packages

* chore: update new connectors version number

---------

Co-authored-by: Darcy Ye <darcyye@silverhand.io>
2025-01-02 12:11:10 +08:00

34 lines
950 B
TypeScript

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;