photo/database/migrations/2018_01_10_000000_photos_rename_fields.php

35 lines
552 B
PHP
Raw Normal View History

2018-01-11 12:59:53 +00:00
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class PhotosRenameFields extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('photo', function(Blueprint $table)
{
$table->renameColumn('date_taken', 'date_created');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('photo', function(Blueprint $table)
{
$table->renameColumn('date_created', 'date_taken');
});
}
}