fix: add pastStudentId migration

This commit is contained in:
Nathan Lamy 2026-02-24 23:47:01 +01:00
parent 233f539b07
commit 23ce4e22e8

View file

@ -1,18 +1,17 @@
import { BaseSchema } from '@adonisjs/lucid/schema' import { BaseSchema } from '@adonisjs/lucid/schema'
export default class extends BaseSchema { export default class extends BaseSchema {
protected tableName = 'add_past_student_id_to_users' protected tableName = 'users'
async up() { async up() {
this.schema.createTable(this.tableName, (table) => { this.schema.alterTable(this.tableName, (table) => {
table.increments('id') table.integer('past_student_id').unsigned().nullable()
table.timestamp('created_at')
table.timestamp('updated_at')
}) })
} }
async down() { async down() {
this.schema.dropTable(this.tableName) this.schema.alterTable(this.tableName, (table) => {
table.dropColumn('past_student_id')
})
} }
} }