35 lines
552 B
PHP
35 lines
552 B
PHP
|
<?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');
|
||
|
});
|
||
|
}
|
||
|
}
|