mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-12-24 14:03:16 +00:00
38 lines
964 B
PHP
38 lines
964 B
PHP
|
<?php
|
||
|
|
||
|
use Illuminate\Support\Facades\Schema;
|
||
|
use Illuminate\Database\Schema\Blueprint;
|
||
|
use Illuminate\Database\Migrations\Migration;
|
||
|
|
||
|
class CreateCollectionsTable extends Migration
|
||
|
{
|
||
|
/**
|
||
|
* Run the migrations.
|
||
|
*
|
||
|
* @return void
|
||
|
*/
|
||
|
public function up()
|
||
|
{
|
||
|
Schema::create('collections', function (Blueprint $table) {
|
||
|
$table->bigIncrements('id');
|
||
|
$table->bigInteger('profile_id')->unsigned()->nullable();
|
||
|
$table->string('title')->nullable();
|
||
|
$table->text('description')->nullable();
|
||
|
$table->boolean('is_nsfw')->default(false);
|
||
|
$table->string('visibility')->default('public')->index();
|
||
|
$table->timestamp('published_at')->nullable();
|
||
|
$table->timestamps();
|
||
|
});
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Reverse the migrations.
|
||
|
*
|
||
|
* @return void
|
||
|
*/
|
||
|
public function down()
|
||
|
{
|
||
|
Schema::dropIfExists('collections');
|
||
|
}
|
||
|
}
|