Files
monica/database/migrations/2017_02_05_041740_change_gifts_table.php
T
2017-02-16 19:21:44 -05:00

35 lines
769 B
PHP

<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class ChangeGiftsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('gifts', function (Blueprint $table) {
$table->renameColumn('title', 'name');
$table->renameColumn('description', 'comment');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('gifts', function (Blueprint $table) {
$table->renameColumn('name', 'title');
$table->renameColumn('comment', 'description');
});
}
}