pixelfed/database/migrations/2019_12_10_023604_create_newsroom_table.php

46 lines
1.4 KiB
PHP
Raw Normal View History

2019-12-23 06:13:49 +00:00
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateNewsroomTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('newsroom', function (Blueprint $table) {
$table->bigIncrements('id');
$table->bigInteger('user_id')->unsigned()->nullable();
$table->string('header_photo_url')->nullable();
$table->string('title')->nullable();
$table->string('slug')->nullable()->unique()->index();
$table->string('category')->default('update');
$table->text('summary')->nullable();
$table->text('body')->nullable();
$table->text('body_rendered')->nullable();
$table->string('link')->nullable();
$table->boolean('force_modal')->default(false);
$table->boolean('show_timeline')->default(false);
$table->boolean('show_link')->default(false);
$table->boolean('auth_only')->default(true);
$table->timestamp('published_at')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
2024-01-30 05:13:09 +00:00
Schema::dropIfExists('newsroom');
2019-12-23 06:13:49 +00:00
}
}