Skip to content

Commit

Permalink
Merge pull request #64 from cachethq/move-userid-column
Browse files Browse the repository at this point in the history
Moved the user_id column
  • Loading branch information
jbrooksuk committed Dec 1, 2014
2 parents 1b22591 + 49d8321 commit e3310c0
Showing 1 changed file with 35 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class AlterIncidentsTableMoveUserIdColumn extends Migration {

/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('incidents', function(Blueprint $table)
{
DB::statement('ALTER TABLE `incidents` MODIFY COLUMN `user_id` INT(10) UNSIGNED DEFAULT NULL AFTER `component_id`;');
});
}

/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('incidents', function(Blueprint $table)
{

DB::statement('ALTER TABLE `incidents` MODIFY COLUMN `user_id` INT(10) UNSIGNED DEFAULT NULL AFTER `deleted_at`;');
});
}

}

0 comments on commit e3310c0

Please sign in to comment.