mirror of
https://github.com/logto-io/logto.git
synced 2024-12-16 20:26:19 -05:00
34 lines
950 B
TypeScript
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;
|