2024-03-16 06:04:55 -05:00
|
|
|
import { sql } from '@silverhand/slonik';
|
2022-10-07 06:48:17 -05:00
|
|
|
|
2022-12-20 00:33:53 -05:00
|
|
|
import type { AlterationScript } from '../lib/types/alteration.js';
|
2022-10-07 06:48:17 -05:00
|
|
|
|
|
|
|
const alteration: AlterationScript = {
|
|
|
|
up: async (pool) => {
|
|
|
|
await pool.query(sql`
|
|
|
|
create table _logto_configs (
|
|
|
|
key varchar(256) not null,
|
2023-04-23 22:11:27 -05:00
|
|
|
value jsonb /* @use JsonObject */ not null default '{}'::jsonb,
|
2022-10-07 06:48:17 -05:00
|
|
|
primary key (key)
|
|
|
|
);
|
|
|
|
`);
|
|
|
|
},
|
|
|
|
down: async (pool) => {
|
|
|
|
await pool.query(sql`drop table _logto_configs;`);
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
export default alteration;
|