fix: "cannot remove collection" related to unused stuff

This commit is contained in:
Sonny
2025-01-21 18:14:43 +01:00
parent fb0345bf68
commit 151ac0602a
8 changed files with 22 additions and 10 deletions

View File

@@ -0,0 +1,21 @@
import { BaseSchema } from '@adonisjs/lucid/schema';
export default class extends BaseSchema {
protected tableName = 'collections';
async up() {
this.schema.alterTable('collections', (table) => {
table.dropColumn('next_id');
});
}
async down() {
this.schema.alterTable('collections', (table) => {
table
.integer('next_id')
.references('id')
.inTable('collections')
.defaultTo(null);
});
}
}