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'
export default class extends BaseSchema {
protected tableName = 'add_past_student_id_to_users'
protected tableName = 'users'
async up() {
this.schema.createTable(this.tableName, (table) => {
table.increments('id')
table.timestamp('created_at')
table.timestamp('updated_at')
this.schema.alterTable(this.tableName, (table) => {
table.integer('past_student_id').unsigned().nullable()
})
}
async down() {
this.schema.dropTable(this.tableName)
this.schema.alterTable(this.tableName, (table) => {
table.dropColumn('past_student_id')
})
}
}