mirror of
https://github.com/directus/directus.git
synced 2026-04-25 03:00:53 -04:00
Add dashboard creation flow
This commit is contained in:
@@ -3,8 +3,8 @@ 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.string('name').notNullable();
|
||||
table.string('icon', 30).notNullable().defaultTo('dashboard');
|
||||
table.text('note');
|
||||
table.timestamp('date_created').defaultTo(knex.fn.now());
|
||||
table.uuid('user_created').references('id').inTable('directus_users').onDelete('SET NULL');
|
||||
@@ -14,14 +14,15 @@ export async function up(knex: Knex): Promise<void> {
|
||||
table.uuid('id').primary();
|
||||
table.uuid('dashboard').notNullable().references('id').inTable('directus_dashboards').onDelete('CASCADE');
|
||||
table.string('name');
|
||||
table.string('icon', 30);
|
||||
table.string('icon', 30).defaultTo('insert_chart');
|
||||
table.string('color', 10);
|
||||
table.boolean('show_header').notNullable().defaultTo(true);
|
||||
table.text('note');
|
||||
table.string('type');
|
||||
table.integer('position_x');
|
||||
table.integer('position_y');
|
||||
table.integer('width');
|
||||
table.integer('height');
|
||||
table.string('type').notNullable();
|
||||
table.integer('position_x').notNullable();
|
||||
table.integer('position_y').notNullable();
|
||||
table.integer('width').notNullable();
|
||||
table.integer('height').notNullable();
|
||||
table.json('options');
|
||||
table.timestamp('date_created').defaultTo(knex.fn.now());
|
||||
table.uuid('user_created').references('id').inTable('directus_users').onDelete('SET NULL');
|
||||
|
||||
Reference in New Issue
Block a user