@directus/api
Version:
Directus is a real-time API and App dashboard for managing SQL database content
22 lines (21 loc) • 836 B
JavaScript
//#region src/database/migrations/20250813A-add-mcp.ts
async function up(knex) {
await knex.schema.alterTable("directus_settings", (table) => {
table.boolean("mcp_enabled").defaultTo(false).notNullable();
table.boolean("mcp_allow_deletes").defaultTo(false).notNullable();
table.string("mcp_prompts_collection").defaultTo(null).nullable();
table.boolean("mcp_system_prompt_enabled").defaultTo(true).notNullable();
table.text("mcp_system_prompt").defaultTo(null).nullable();
});
}
async function down(knex) {
await knex.schema.alterTable("directus_settings", (table) => {
table.dropColumn("mcp_enabled");
table.dropColumn("mcp_allow_deletes");
table.dropColumn("mcp_prompts_collection");
table.dropColumn("mcp_system_prompt_enabled");
table.dropColumn("mcp_system_prompt");
});
}
//#endregion
export { down, up };