pixelfed/database/migrations/2018_09_02_043609_create_instances_table.php

40 lines
1 KiB
PHP
Raw Permalink Normal View History

2018-09-02 04:43:11 +00:00
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateInstancesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('instances', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('domain')->unique()->index();
$table->string('url')->nullable();
$table->string('name')->nullable();
$table->string('admin_url')->nullable();
$table->string('limit_reason')->nullable();
$table->boolean('unlisted')->default(false);
$table->boolean('auto_cw')->default(false);
$table->boolean('banned')->default(false);
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('instances');
}
}