mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-05-14 20:17:35 +08:00
48 lines
1.5 KiB
PHP
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');
|
|
}
|
|
}
|