@@ -5,30 +5,30 @@ |
||
| 5 | 5 | |
| 6 | 6 | class AddReason extends Migration { |
| 7 | 7 | |
| 8 | - /** |
|
| 9 | - * Run the migrations. |
|
| 10 | - * |
|
| 11 | - * @return void |
|
| 12 | - */ |
|
| 13 | - public function up() |
|
| 14 | - { |
|
| 15 | - Schema::table('versions', function(Blueprint $table) |
|
| 16 | - { |
|
| 8 | + /** |
|
| 9 | + * Run the migrations. |
|
| 10 | + * |
|
| 11 | + * @return void |
|
| 12 | + */ |
|
| 13 | + public function up() |
|
| 14 | + { |
|
| 15 | + Schema::table('versions', function(Blueprint $table) |
|
| 16 | + { |
|
| 17 | 17 | $table->string('reason', 100)->nullable()->after('model_data'); |
| 18 | - }); |
|
| 19 | - } |
|
| 18 | + }); |
|
| 19 | + } |
|
| 20 | 20 | |
| 21 | - /** |
|
| 22 | - * Reverse the migrations. |
|
| 23 | - * |
|
| 24 | - * @return void |
|
| 25 | - */ |
|
| 26 | - public function down() |
|
| 27 | - { |
|
| 28 | - Schema::table('versions', function(Blueprint $table) |
|
| 29 | - { |
|
| 21 | + /** |
|
| 22 | + * Reverse the migrations. |
|
| 23 | + * |
|
| 24 | + * @return void |
|
| 25 | + */ |
|
| 26 | + public function down() |
|
| 27 | + { |
|
| 28 | + Schema::table('versions', function(Blueprint $table) |
|
| 29 | + { |
|
| 30 | 30 | $table->dropColumn('reason'); |
| 31 | - }); |
|
| 32 | - } |
|
| 31 | + }); |
|
| 32 | + } |
|
| 33 | 33 | |
| 34 | 34 | } |
@@ -5,32 +5,32 @@ |
||
| 5 | 5 | |
| 6 | 6 | class CreateVersionsTable extends Migration { |
| 7 | 7 | |
| 8 | - /** |
|
| 9 | - * Run the migrations. |
|
| 10 | - * |
|
| 11 | - * @return void |
|
| 12 | - */ |
|
| 13 | - public function up() |
|
| 14 | - { |
|
| 15 | - Schema::create('versions', function(Blueprint $table) |
|
| 16 | - { |
|
| 17 | - $table->increments('version_id'); |
|
| 18 | - $table->integer('versionable_id'); |
|
| 8 | + /** |
|
| 9 | + * Run the migrations. |
|
| 10 | + * |
|
| 11 | + * @return void |
|
| 12 | + */ |
|
| 13 | + public function up() |
|
| 14 | + { |
|
| 15 | + Schema::create('versions', function(Blueprint $table) |
|
| 16 | + { |
|
| 17 | + $table->increments('version_id'); |
|
| 18 | + $table->integer('versionable_id'); |
|
| 19 | 19 | $table->text('versionable_type'); |
| 20 | - $table->integer('user_id')->nullable(); |
|
| 21 | - $table->binary('model_data'); |
|
| 22 | - $table->timestamps(); |
|
| 23 | - }); |
|
| 24 | - } |
|
| 20 | + $table->integer('user_id')->nullable(); |
|
| 21 | + $table->binary('model_data'); |
|
| 22 | + $table->timestamps(); |
|
| 23 | + }); |
|
| 24 | + } |
|
| 25 | 25 | |
| 26 | - /** |
|
| 27 | - * Reverse the migrations. |
|
| 28 | - * |
|
| 29 | - * @return void |
|
| 30 | - */ |
|
| 31 | - public function down() |
|
| 32 | - { |
|
| 33 | - Schema::drop('versions'); |
|
| 34 | - } |
|
| 26 | + /** |
|
| 27 | + * Reverse the migrations. |
|
| 28 | + * |
|
| 29 | + * @return void |
|
| 30 | + */ |
|
| 31 | + public function down() |
|
| 32 | + { |
|
| 33 | + Schema::drop('versions'); |
|
| 34 | + } |
|
| 35 | 35 | |
| 36 | 36 | } |