-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #64 from cachethq/move-userid-column
Moved the user_id column
- Loading branch information
Showing
1 changed file
with
35 additions
and
0 deletions.
There are no files selected for viewing
35 changes: 35 additions & 0 deletions
35
app/database/migrations/2014_12_01_154644_AlterIncidentsTableMoveUserIdColumn.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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`;'); | ||
}); | ||
} | ||
|
||
} |