0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2024-12-23 20:33:16 -05:00
logto/packages/schemas/alterations/next-1710408335-make-resource-scopes-description-nullable.ts
simeng-li 9518658595
fix(schemas): fix the get interation/consent api bug (#5503)
* fix(schemas): fix the get interation/consent api bug

fix the get interation/consent api bug

* chore: update changeset

update changeset

* fix: update changeset

update changeset

* refactor(schemas, console): alter the resource scopes description field to nullable (#5504)

* refactor(schemas, console): alter the resoruce scopes description field nullable

make the resourec scopes description nullable

* fix(test): fix the type issue in the integration test

fix the type issue in the integration test

* fix(console): add the field register

add the field register

* fix: update the changeset

update the changeset

* fix(console,test): update comments and rebase

update comments and rebase the master
2024-03-20 14:31:35 +08:00

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;