ATC_SIMPLE/BACKEND/database/migrations/1776031200000_create_prompt...

20 lines
470 B
TypeScript

import { BaseSchema } from '@adonisjs/lucid/schema'
export default class extends BaseSchema {
protected tableName = 'prompt_ais'
async up() {
this.schema.createTable(this.tableName, (table) => {
table.increments('id')
table.string('title').notNullable().unique()
table.text('content').notNullable()
table.string('type').notNullable()
table.timestamps()
})
}
async down() {
this.schema.dropTable(this.tableName)
}
}