message: added job table
diff: @@ -14,13 +14,26 @@ export function up(pgm: MigrationBuilder) {
  primaryKey: ['realm', 'original_realm', 'local_id'],
  });
  - pgm.createSequence('job_id');
  -
  + pgm.createType('job_statuses', ['waiting', 'running', 'completed', 'failed', 'fulfilled', 'rejected']);
  /* eslint-disable @typescript-eslint/camelcase */
  pgm.createTable('jobs', {
  - realm: 'varchar',
  - original_realm: 'varchar',
  - local_id: 'varchar',
  - pristine_doc: 'jsonb',
  + id: 'id', // shorthand for primary key that is an auto incremented id
  + name: {
  + type: 'varchar',
  + notNull: true,
  + },
  + args: 'jsonb',
  + status: {
  + type: 'job_statuses',
  + notNull: true,
  + },
  + published_at: {
  + type: 'timestamp',
  + notNull: true,
  + default: pgm.func('current_timestamp'),
  + },
  + finished_at: {
  + type: 'timestamp',
  + },
  });
  }
  