1737365613305_text_records.ts 579 B

1234567891011121314151617181920
  1. import BaseSchema from '@ioc:Adonis/Lucid/Schema'
  2. export default class extends BaseSchema {
  3. protected tableName = 'text_records'
  4. public async up () {
  5. this.schema.createTable(this.tableName, (table) => {
  6. table.increments('id')
  7. table.string('device_id').notNullable()
  8. table.string('app_name').notNullable()
  9. table.string('record').notNullable()
  10. table.timestamp('created_at', { useTz: true })
  11. table.timestamp('updated_at', { useTz: true })
  12. })
  13. }
  14. public async down () {
  15. this.schema.dropTable(this.tableName)
  16. }
  17. }