Changeset View
Changeset View
Standalone View
Standalone View
src/database/migrations/2019_09_23_071701_create_domains_table.php
Show All 13 Lines | class CreateDomainsTable extends Migration | ||||
*/ | */ | ||||
public function up() | public function up() | ||||
{ | { | ||||
Schema::create('domains', function (Blueprint $table) { | Schema::create('domains', function (Blueprint $table) { | ||||
$table->bigInteger('id'); | $table->bigInteger('id'); | ||||
$table->string('namespace')->unique(); | $table->string('namespace')->unique(); | ||||
$table->smallinteger('status'); | $table->smallinteger('status'); | ||||
$table->tinyinteger('type'); | $table->tinyinteger('type'); | ||||
$table->timestamps(); | $table->timestamp('created_at')->useCurrent(); | ||||
$table->timestamp('updated_at')->useCurrent(); | |||||
}); | }); | ||||
} | } | ||||
/** | /** | ||||
* Reverse the migrations. | * Reverse the migrations. | ||||
* | * | ||||
* @return void | * @return void | ||||
*/ | */ | ||||
public function down() | public function down() | ||||
{ | { | ||||
Schema::dropIfExists('domains'); | Schema::dropIfExists('domains'); | ||||
} | } | ||||
} | } |