Files
my-links/database/migrations/1755640100586_persist_data_display_preferences_table.ts

18 lines
387 B
TypeScript

import { BaseSchema } from '@adonisjs/lucid/schema';
export default class extends BaseSchema {
protected tableName = 'users';
async up() {
this.schema.alterTable(this.tableName, (table) => {
table.jsonb('display_preferences').defaultTo('{}');
});
}
async down() {
this.schema.alterTable(this.tableName, (table) => {
table.dropColumn('display_preferences');
});
}
}