2015-10-17 06:51:46 +00:00
|
|
|
<?php namespace Database\Tester\Updates;
|
|
|
|
|
|
|
|
|
|
use Schema;
|
|
|
|
|
use October\Rain\Database\Updates\Migration;
|
|
|
|
|
|
|
|
|
|
class CreatePhonesTable extends Migration
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
public function up()
|
|
|
|
|
{
|
2017-04-24 11:38:19 +00:00
|
|
|
Schema::create('database_tester_phones', function ($table)
|
2015-10-17 06:51:46 +00:00
|
|
|
{
|
|
|
|
|
$table->engine = 'InnoDB';
|
|
|
|
|
$table->increments('id');
|
|
|
|
|
$table->string('number')->nullable();
|
|
|
|
|
$table->integer('author_id')->unsigned()->index()->nullable();
|
|
|
|
|
$table->timestamps();
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function down()
|
|
|
|
|
{
|
|
|
|
|
Schema::dropIfExists('database_tester_phones');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|