@directus/api
Version:
Directus is a real-time API and App dashboard for managing SQL database content
14 lines (13 loc) • 564 B
JavaScript
import { getHelpers } from '../helpers/index.js';
export async function up(knex) {
const helper = getHelpers(knex).schema;
const type = helper.isOneOfClients(['oracle', 'cockroachdb']) ? 'text' : 'string';
await helper.changeToType('directus_webhooks', 'collections', type, {
nullable: false,
});
}
export async function down(knex) {
const helper = getHelpers(knex).schema;
const type = helper.isOneOfClients(['oracle', 'cockroachdb']) ? 'text' : 'string';
await helper.changeToType('directus_webhooks', 'collections', type);
}