mirror of
https://github.com/morten-olsen/mini-loader.git
synced 2026-02-08 01:36:26 +01:00
feat: add scheduler (#30)
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
import { Knex } from 'knex';
|
||||
|
||||
const name = 'schedule-support';
|
||||
|
||||
const up = async (knex: Knex) => {
|
||||
await knex.schema.createTable('schedules', (table) => {
|
||||
table.string('id').primary();
|
||||
table.string('name').nullable();
|
||||
table.string('description').nullable();
|
||||
table.string('load').notNullable();
|
||||
table.string('cron').notNullable();
|
||||
table.string('input').nullable();
|
||||
table.timestamp('createdAt').notNullable();
|
||||
table.timestamp('updatedAt').notNullable();
|
||||
});
|
||||
};
|
||||
|
||||
const down = async (knex: Knex) => {
|
||||
await knex.schema.dropTable('schedule');
|
||||
};
|
||||
|
||||
export { name, up, down };
|
||||
Reference in New Issue
Block a user