|
|
@@ -0,0 +1,20 @@
|
|
|
+import BaseSchema from '@ioc:Adonis/Lucid/Schema'
|
|
|
+
|
|
|
+export default class extends BaseSchema {
|
|
|
+ protected tableName = 'ocr_records'
|
|
|
+
|
|
|
+ public async up() {
|
|
|
+ this.schema.createTable(this.tableName, (table) => {
|
|
|
+ table.increments('id')
|
|
|
+ table.string('device_id').notNullable()
|
|
|
+ table.text('record').notNullable()
|
|
|
+ table.string('channel').notNullable()
|
|
|
+ table.timestamp('created_at', { useTz: true })
|
|
|
+ table.timestamp('updated_at', { useTz: true })
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ public async down() {
|
|
|
+ this.schema.dropTable(this.tableName)
|
|
|
+ }
|
|
|
+}
|