mirror of
https://github.com/logto-io/logto.git
synced 2024-12-16 20:26:19 -05:00
22 lines
559 B
TypeScript
22 lines
559 B
TypeScript
import { sql } from '@silverhand/slonik';
|
|
|
|
import type { AlterationScript } from '../lib/types/alteration.js';
|
|
|
|
const alteration: AlterationScript = {
|
|
up: async (pool) => {
|
|
// Make the resource scopes description nullable
|
|
await pool.query(sql`
|
|
alter table scopes
|
|
alter column description drop not null;
|
|
`);
|
|
},
|
|
down: async (pool) => {
|
|
// Revert the resource scopes description nullable
|
|
await pool.query(sql`
|
|
alter table scopes
|
|
alter column description set not null;
|
|
`);
|
|
},
|
|
};
|
|
|
|
export default alteration;
|