Files
nexusphp/database/migrations/2021_06_08_113437_create_searchbox_table.php
T
2026-04-14 13:12:56 +07:00

48 lines
1.5 KiB
PHP

<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateSearchboxTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
if (Schema::hasTable('searchbox')) {
return;
}
Schema::create('searchbox', function (Blueprint $table) {
$table->smallIncrements('id');
$table->string('name', 30)->nullable();
$table->smallInteger('showsubcat')->default(0);
$table->smallInteger('showsource')->default(0);
$table->smallInteger('showmedium')->default(0);
$table->smallInteger('showcodec')->default(0);
$table->smallInteger('showstandard')->default(0);
$table->smallInteger('showprocessing')->default(0);
$table->smallInteger('showteam')->default(0);
$table->smallInteger('showaudiocodec')->default(0);
$table->unsignedSmallInteger('catsperrow')->default(7);
$table->unsignedSmallInteger('catpadding')->default(25);
$table->text('custom_fields')->nullable();
$table->string('custom_fields_display_name')->default('');
$table->text('custom_fields_display')->nullable();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('searchbox');
}
}