22 lines
642 B
TypeScript
22 lines
642 B
TypeScript
import { BaseSchema } from '@adonisjs/lucid/schema'
|
|
|
|
/**
|
|
* Versions of what workers drop (REBUILD.md, rules and recovery): dropped
|
|
* signatures and tools, the per-article limit, the sample share. Every range
|
|
* records the version it ran with.
|
|
*/
|
|
export default class extends BaseSchema {
|
|
async up() {
|
|
this.schema.createTable('rule_sets', (table) => {
|
|
table.integer('version').primary()
|
|
table.jsonb('rules').notNullable()
|
|
table.text('note').nullable()
|
|
table.timestamp('created_at', { useTz: true }).notNullable().defaultTo(this.now())
|
|
})
|
|
}
|
|
|
|
async down() {
|
|
this.schema.dropTable('rule_sets')
|
|
}
|
|
}
|