Freescout-Dashboard-Plugin/Database/Migrations/2023_09_24_010101_create_dashboards_table.php
Mat 55808483a0 - dashboard preview
- remove elements
- readme prep and todo
2023-09-25 20:02:28 +10:00

43 lines
1.2 KiB
PHP

<?php
use App\Customer;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateDashboardsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
// We preserve "channel" and "channel_id" fields in "customers" table.
// They allow to figure out that there is a record in customer_channel table.
Schema::create('dashboards', function (Blueprint $table) {
$table->increments('id');
$table->string('name');
$table->jsonb('elements');
$table->boolean('enabled');
$table->boolean('deleted');
$table->dateTime('created_at');
$table->dateTime('updated_at')->nullable();
$table->dateTime('deleted_at')->nullable();
$table->unsignedInteger('created_by');
$table->unsignedInteger('updated_by')->nullable();
$table->unsignedInteger('deleted_by')->nullable();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('dashboards');
}
}