Lots of new code for importer and some preferences.

This commit is contained in:
James Cole
2016-07-24 18:47:55 +02:00
parent 87c0f1d86e
commit 1392275b81
41 changed files with 1562 additions and 369 deletions

View File

@@ -25,6 +25,7 @@ class CreateSupportTables extends Migration
Schema::drop('permissions');
Schema::drop('roles');
Schema::drop('sessions');
Schema::drop('configuration');
}
@@ -79,6 +80,8 @@ class CreateSupportTables extends Migration
*/
$this->createSessionsTable();
$this->createConfigurationTable();
}
/**
@@ -123,6 +126,23 @@ class CreateSupportTables extends Migration
}
}
private function createConfigurationTable()
{
if (!Schema::hasTable('configuration')) {
Schema::create(
'configuration', function (Blueprint $table) {
$table->increments('id');
$table->timestamps();
$table->softDeletes();
$table->string('name', 50);
$table->text('data');
$table->unique(['name']);
}
);
}
}
/**
*
*/
@@ -176,7 +196,7 @@ class CreateSupportTables extends Migration
'permission_role', function (Blueprint $table) {
$table->integer('permission_id')->unsigned();
$table->integer('role_id')->unsigned();
$table->foreign('permission_id')->references('id')->on('permissions')->onUpdate('cascade')->onDelete('cascade');
$table->foreign('role_id')->references('id')->on('roles')->onUpdate('cascade')->onDelete('cascade');