mirror of
https://github.com/directus/directus.git
synced 2026-02-11 09:55:06 -05:00
Move module setup to Project Settings (#8012)
* Move module bar setup to project settings * Add system modules interface to dnd configure module bar * Cleanup order * Crucially important typo * Add ability to add custom links * Show correct initial value marker
This commit is contained in:
55
api/src/database/migrations/20210910A-move-module-setup.ts
Normal file
55
api/src/database/migrations/20210910A-move-module-setup.ts
Normal file
@@ -0,0 +1,55 @@
|
||||
import { Knex } from 'knex';
|
||||
|
||||
export async function up(knex: Knex): Promise<void> {
|
||||
await knex.schema.alterTable('directus_roles', (table) => {
|
||||
table.dropColumn('module_list');
|
||||
});
|
||||
|
||||
await knex.schema.alterTable('directus_settings', (table) => {
|
||||
table.json('module_bar').defaultTo(
|
||||
JSON.stringify([
|
||||
{
|
||||
type: 'module',
|
||||
id: 'collections',
|
||||
enabled: true,
|
||||
},
|
||||
{
|
||||
type: 'module',
|
||||
id: 'users',
|
||||
enabled: true,
|
||||
},
|
||||
{
|
||||
type: 'module',
|
||||
id: 'files',
|
||||
enabled: true,
|
||||
},
|
||||
{
|
||||
type: 'module',
|
||||
id: 'insights',
|
||||
enabled: false,
|
||||
},
|
||||
{
|
||||
type: 'module',
|
||||
id: 'docs',
|
||||
enabled: true,
|
||||
},
|
||||
{
|
||||
type: 'module',
|
||||
id: 'settings',
|
||||
enabled: true,
|
||||
locked: true,
|
||||
},
|
||||
])
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
export async function down(knex: Knex): Promise<void> {
|
||||
await knex.schema.alterTable('directus_roles', (table) => {
|
||||
table.json('module_list');
|
||||
});
|
||||
|
||||
await knex.schema.alterTable('directus_settings', (table) => {
|
||||
table.dropColumn('module_bar');
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user