Skip to content

Commit

Permalink
Merge pull request #183 from Zizaco/revert-181-patch-1
Browse files Browse the repository at this point in the history
Revert "Changed the migration template."
  • Loading branch information
Zizaco committed Aug 5, 2014
2 parents b56c48c + 39c6119 commit 1194627
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/views/generators/migration.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ public function up()
$table->timestamps();
});

// Creates the user_roles (Many-to-Many relation) table
Schema::create('user_roles', function ($table) {
// Creates the assigned_roles (Many-to-Many relation) table
Schema::create('assigned_roles', function ($table) {
$table->increments('id')->unsigned();
$table->integer('user_id')->unsigned();
$table->integer('role_id')->unsigned();
Expand Down Expand Up @@ -54,17 +54,17 @@ public function up()
*/
public function down()
{
Schema::table('user_roles', function (Blueprint $table) {
$table->dropForeign('user_roles_user_id_foreign');
$table->dropForeign('user_roles_role_id_foreign');
Schema::table('assigned_roles', function (Blueprint $table) {
$table->dropForeign('assigned_roles_user_id_foreign');
$table->dropForeign('assigned_roles_role_id_foreign');
});

Schema::table('permission_role', function (Blueprint $table) {
$table->dropForeign('permission_role_permission_id_foreign');
$table->dropForeign('permission_role_role_id_foreign');
});

Schema::drop('user_roles');
Schema::drop('assigned_roles');
Schema::drop('permission_role');
Schema::drop('roles');
Schema::drop('permissions');
Expand Down

0 comments on commit 1194627

Please sign in to comment.