mirror of
https://github.com/Sonny93/my-links.git
synced 2025-12-08 14:43:24 +00:00
18 lines
387 B
TypeScript
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');
|
|
});
|
|
}
|
|
}
|