mirror of
https://github.com/directus/directus.git
synced 2026-02-11 18:44:55 -05:00
Allow disabling activity/revisions (#5112)
* Add accountability column * Add field info for accountability * Add accountability to collection type * Fetch accountability info from collection meta * Add field name translation for accountability field * Hide revisions drawer detail if revisions aren't available * Only save activity where accountability flag matches * Disable revisions for directus_presets Fixes #3767 * Tweak field option naming
This commit is contained in:
@@ -7,7 +7,7 @@ export async function up(knex: Knex) {
|
||||
}
|
||||
|
||||
export async function down(knex: Knex) {
|
||||
await knex.schema.alterTable('directus_presets', (table) => {
|
||||
await knex.schema.alterTable('directus_files', (table) => {
|
||||
table.integer('filesize').notNullable().defaultTo(0).alter();
|
||||
});
|
||||
}
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
import { Knex } from 'knex';
|
||||
|
||||
export async function up(knex: Knex) {
|
||||
await knex.schema.alterTable('directus_collections', (table) => {
|
||||
table.string('accountability').defaultTo('all');
|
||||
});
|
||||
|
||||
await knex('directus_collections').update({ accountability: 'all' });
|
||||
}
|
||||
|
||||
export async function down(knex: Knex) {
|
||||
await knex.schema.alterTable('directus_collections', (table) => {
|
||||
table.dropColumn('accountability');
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user