0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2024-12-16 20:26:19 -05:00
logto/packages/schemas/alterations/1.15.0-1711607772-remove-invite-member-scope-from-tenant-member-role.ts
2024-04-10 21:27:24 +08:00

20 lines
639 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`
delete from organization_role_scope_relations
where tenant_id = 'admin' and organization_role_id = 'member' and organization_scope_id = 'invite-member';
`);
},
down: async (pool) => {
await pool.query(sql`
insert into organization_role_scope_relations (tenant_id, organization_role_id, organization_scope_id)
values ('admin', 'member', 'invite-member');
`);
},
};
export default alteration;