@directus/api
Version:
Directus is a real-time API and App dashboard for managing SQL database content
20 lines (19 loc) • 742 B
JavaScript
import { getHelpers } from '../helpers/index.js';
export async function up(knex) {
const helper = getHelpers(knex).schema;
await helper.changeToType('directus_presets', 'icon', 'string', {
nullable: true,
default: 'bookmark',
length: 30,
});
await knex('directus_presets').update({ icon: 'bookmark_border' }).where('icon', '=', 'bookmark_outline');
}
export async function down(knex) {
const helper = getHelpers(knex).schema;
await helper.changeToType('directus_presets', 'icon', 'string', {
nullable: true,
default: 'bookmark_outline',
length: 30,
});
await knex('directus_presets').update({ icon: 'bookmark_outline' }).where('icon', '=', 'bookmark_border');
}