Updating backend/database
This commit is contained in:
parent
92aa3fc18d
commit
7148341b80
|
|
@ -5,11 +5,9 @@ use Illuminate\Database\Migrations\Migration;
|
|||
|
||||
class DbBackendUsers extends Migration
|
||||
{
|
||||
|
||||
public function up()
|
||||
{
|
||||
Schema::create('backend_users', function(Blueprint $table)
|
||||
{
|
||||
Schema::create('backend_users', function (Blueprint $table) {
|
||||
$table->engine = 'InnoDB';
|
||||
$table->increments('id');
|
||||
$table->string('first_name')->nullable();
|
||||
|
|
@ -32,5 +30,4 @@ class DbBackendUsers extends Migration
|
|||
{
|
||||
Schema::dropIfExists('backend_users');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,11 +5,9 @@ use Illuminate\Database\Migrations\Migration;
|
|||
|
||||
class DbBackendUserGroups extends Migration
|
||||
{
|
||||
|
||||
public function up()
|
||||
{
|
||||
Schema::create('backend_user_groups', function($table)
|
||||
{
|
||||
Schema::create('backend_user_groups', function ($table) {
|
||||
$table->engine = 'InnoDB';
|
||||
$table->increments('id');
|
||||
$table->string('name')->unique();
|
||||
|
|
@ -22,5 +20,4 @@ class DbBackendUserGroups extends Migration
|
|||
{
|
||||
Schema::dropIfExists('backend_user_groups');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,11 +5,9 @@ use Illuminate\Database\Migrations\Migration;
|
|||
|
||||
class DbBackendUsersGroups extends Migration
|
||||
{
|
||||
|
||||
public function up()
|
||||
{
|
||||
Schema::create('backend_users_groups', function($table)
|
||||
{
|
||||
Schema::create('backend_users_groups', function ($table) {
|
||||
$table->engine = 'InnoDB';
|
||||
$table->integer('user_id')->unsigned();
|
||||
$table->integer('user_group_id')->unsigned();
|
||||
|
|
@ -21,5 +19,4 @@ class DbBackendUsersGroups extends Migration
|
|||
{
|
||||
Schema::dropIfExists('backend_users_groups');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,11 +5,9 @@ use Illuminate\Database\Migrations\Migration;
|
|||
|
||||
class DbBackendUserThrottle extends Migration
|
||||
{
|
||||
|
||||
public function up()
|
||||
{
|
||||
Schema::create('backend_user_throttle', function($table)
|
||||
{
|
||||
Schema::create('backend_user_throttle', function ($table) {
|
||||
$table->engine = 'InnoDB';
|
||||
$table->increments('id');
|
||||
$table->integer('user_id')->unsigned();
|
||||
|
|
@ -27,5 +25,4 @@ class DbBackendUserThrottle extends Migration
|
|||
{
|
||||
Schema::dropIfExists('backend_user_throttle');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,8 +7,7 @@ class DbBackendUserPreferences extends Migration
|
|||
{
|
||||
public function up()
|
||||
{
|
||||
Schema::create('backend_user_preferences', function($table)
|
||||
{
|
||||
Schema::create('backend_user_preferences', function ($table) {
|
||||
$table->engine = 'InnoDB';
|
||||
$table->increments('id');
|
||||
$table->integer('user_id')->unsigned();
|
||||
|
|
|
|||
|
|
@ -5,11 +5,9 @@ use Illuminate\Database\Migrations\Migration;
|
|||
|
||||
class DbBackendAccessLog extends Migration
|
||||
{
|
||||
|
||||
public function up()
|
||||
{
|
||||
Schema::create('backend_access_log', function(Blueprint $table)
|
||||
{
|
||||
Schema::create('backend_access_log', function (Blueprint $table) {
|
||||
$table->engine = 'InnoDB';
|
||||
$table->increments('id');
|
||||
$table->integer('user_id')->unsigned();
|
||||
|
|
@ -22,5 +20,4 @@ class DbBackendAccessLog extends Migration
|
|||
{
|
||||
Schema::dropIfExists('backend_access_log');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,5 +17,4 @@ class DatabaseSeeder extends Seeder
|
|||
|
||||
$this->call('Backend\Database\Seeds\SeedSetupAdmin');
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,7 +15,9 @@ class SeedSetupAdmin extends Seeder
|
|||
|
||||
public function setDefaults($values)
|
||||
{
|
||||
if (!is_array($values)) return;
|
||||
if (!is_array($values)) {
|
||||
return;
|
||||
}
|
||||
foreach ($values as $attribute => $value) {
|
||||
static::$$attribute = $value;
|
||||
}
|
||||
|
|
@ -40,5 +42,4 @@ class SeedSetupAdmin extends Seeder
|
|||
|
||||
$user->addGroup($group);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue