mirror of
https://github.com/Sonny93/my-links.git
synced 2025-12-08 22:53:25 +00:00
22 lines
429 B
TypeScript
22 lines
429 B
TypeScript
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);
|
|
});
|
|
}
|
|
}
|