Add new system tables

This commit is contained in:
rijkvanzanten
2021-05-25 15:40:59 -04:00
parent 3797edb67d
commit 8fad805607
3 changed files with 62 additions and 0 deletions

View File

@@ -0,0 +1,32 @@
import { Knex } from 'knex';
export async function up(knex: Knex): Promise<void> {
await knex.schema.createTable('directus_dashboards', (table) => {
table.uuid('id').primary();
table.string('name');
table.string('icon', 30);
table.timestamp('date_created');
table.timestamp('user_created');
});
await knex.schema.createTable('directus_panels', (table) => {
table.uuid('id').primary();
table.string('name');
table.string('icon', 30);
table.string('color', 10);
table.text('note');
table.string('type');
table.integer('position_x');
table.integer('position_y');
table.integer('width');
table.integer('height');
table.json('options');
table.timestamp('date_created');
table.timestamp('user_created');
});
}
export async function down(knex: Knex): Promise<void> {
await knex.schema.dropTable('directus_dashboards');
await knex.schema.dropTable('directus_panels');
}

View File

@@ -0,0 +1,11 @@
table: directus_dashboards
fields:
- field: id
special: uuid
- field: name
- field: icon
- field: date_created
special: date-created
- field: user_created
special: user-created

View File

@@ -0,0 +1,19 @@
table: directus_panels
fields:
- field: id
special: uuid
- field: name
- field: icon
- field: color
- field: note
- field: type
- field: position_x
- field: position_y
- field: width
- field: height
- field: options
- field: date_created
special: date-created
- field: user_created
special: user-created