rverse2/database/2018_03_03_033445_add_title_posts.php
2018-11-29 13:17:19 -07:00

36 lines
692 B
PHP

<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Miiverse\DB;
class AddTitlePosts extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
$schema = DB::getSchemaBuilder();
$schema->table('posts', function (Blueprint $table) {
$table->string('title', 24);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
$schema = DB::getSchemaBuilder();
$schema->table('posts', function (Blueprint $table) {
$table->dropColumn('title');
});
}
}