Skip to content

Commit

Permalink
removes deprecated migration
Browse files Browse the repository at this point in the history
  • Loading branch information
aocneanu committed Oct 21, 2018
1 parent 2f4d589 commit 5c59a90
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 36 deletions.
1 change: 0 additions & 1 deletion .styleci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ enabled:

disabled:
- short_array_syntax
- not_operator_with_successor_space

finder:
exclude:
Expand Down
8 changes: 4 additions & 4 deletions src/AppServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,19 @@ public function boot()
Sync::class,
]);

$this->load()
->publish();
$this->loadDependencies()
->publishDependencies();
}

private function load()
private function loadDependencies()
{
$this->loadRoutesFrom(__DIR__.'/routes/api.php');
$this->loadMigrationsFrom(__DIR__.'/database/migrations');

return $this;
}

private function publish()
private function publishDependencies()
{
$this->publishes([
__DIR__.'/resources/js' => resource_path('js'),
Expand Down
8 changes: 4 additions & 4 deletions src/app/Tables/Builders/RoleTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ class RoleTable extends Table

public function query()
{
return Role::select(\DB::raw(
'roles.id as "dtRowId", roles.name, roles.display_name, roles.description,
roles.created_at, menus.name as defaultMenu'
))->join('menus', 'roles.menu_id', '=', 'menus.id');
return Role::select(\DB::raw('
roles.id as "dtRowId", roles.name, roles.display_name, roles.description,
roles.created_at, menus.name as defaultMenu
'))->join('menus', 'roles.menu_id', '=', 'menus.id');
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,11 @@ public function up()
$table->integer('role_id')->unsigned()->index();
$table->foreign('role_id')->references('id')->on('roles')
->onUpdate('cascade')->onDelete('cascade');

$table->integer('menu_id')->unsigned()->index();
$table->foreign('menu_id')->references('id')->on('menus')
->onUpdate('cascade')->onDelete('cascade');

$table->primary(['role_id', 'menu_id']);

$table->timestamps();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ public function up()
$table->integer('permission_id')->unsigned()->index();
$table->foreign('permission_id')->references('id')->on('permissions')
->onUpdate('cascade')->onDelete('cascade');

$table->integer('role_id')->unsigned()->index();
$table->foreign('role_id')->references('id')->on('roles')
->onUpdate('cascade')->onDelete('cascade');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ public function up()
$table->integer('role_id')->unsigned()->index();
$table->foreign('role_id')->references('id')->on('roles')
->onUpdate('cascade')->onDelete('cascade');

$table->integer('user_group_id')->unsigned()->index();
$table->foreign('user_group_id')->references('id')->on('user_groups')
->onUpdate('cascade')->onDelete('cascade');
Expand Down

This file was deleted.

0 comments on commit 5c59a90

Please sign in to comment.