new widget structure

This commit is contained in:
denisdulici
2019-12-31 02:20:10 +03:00
parent 8c6ca5e5fb
commit 71c5caf264
44 changed files with 333 additions and 502 deletions

View File

@ -25,12 +25,11 @@ class CreateDashboardsTable extends Migration
$table->index(['company_id']);
});
Schema::create('dashboard_widgets', function (Blueprint $table) {
Schema::create('widgets', function (Blueprint $table) {
$table->increments('id');
$table->integer('company_id');
$table->integer('user_id');
$table->integer('dashboard_id');
$table->integer('widget_id');
$table->string('class');
$table->string('name');
$table->text('settings')->nullable();
$table->integer('sort')->default(0);
@ -39,19 +38,6 @@ class CreateDashboardsTable extends Migration
$table->index(['company_id']);
});
Schema::create('widgets', function (Blueprint $table) {
$table->increments('id');
$table->integer('company_id');
$table->string('name');
$table->string('alias');
$table->text('settings')->nullable();
$table->boolean('enabled')->default(1);
$table->timestamps();
$table->softDeletes();
$table->index(['company_id', 'alias']);
});
}
/**
@ -62,7 +48,6 @@ class CreateDashboardsTable extends Migration
public function down()
{
Schema::drop('dashboards');
Schema::drop('dashboard_widgets');
Schema::drop('widgets');
}
}