mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-22 06:21:27 +00:00
Add Instance model/migration
This commit is contained in:
parent
45930a31c3
commit
86bbcd73cf
2 changed files with 49 additions and 0 deletions
10
app/Instance.php
Normal file
10
app/Instance.php
Normal file
|
@ -0,0 +1,10 @@
|
|||
<?php
|
||||
|
||||
namespace App;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Instance extends Model
|
||||
{
|
||||
//
|
||||
}
|
|
@ -0,0 +1,39 @@
|
|||
<?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');
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue