import { BaseSchema } from "@adonisjs/lucid/schema" export default class CreateRateLimitsTable extends BaseSchema { protected tableName = "rate_limits" public override async up(): Promise { void this.schema.createTable(this.tableName, (table) => { table.string("key", 255).notNullable().primary() table.integer("points", 9).notNullable().defaultTo(0) table.bigint("expire").unsigned() }) } public override async down(): Promise { void this.schema.dropTable(this.tableName) } }