mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-08-29 17:28:55 +00:00
51 lines
1.2 KiB
PHP
51 lines
1.2 KiB
PHP
<?php
|
|
|
|
use Illuminate\Database\Migrations\Migration;
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
|
|
class CreateBookinfoTable extends Migration {
|
|
|
|
/**
|
|
* Run the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function up()
|
|
{
|
|
Schema::create('bookinfo', function(Blueprint $table)
|
|
{
|
|
$table->engine = 'InnoDB';
|
|
$table->charset = 'utf8';
|
|
$table->collation = 'utf8_unicode_ci';
|
|
$table->increments('id');
|
|
$table->string('title');
|
|
$table->string('author');
|
|
$table->string('asin', 128)->nullable()->unique('ix_bookinfo_asin');
|
|
$table->string('isbn', 128)->nullable();
|
|
$table->string('ean', 128)->nullable();
|
|
$table->string('url', 1000)->nullable();
|
|
$table->integer('salesrank')->unsigned()->nullable();
|
|
$table->string('publisher')->nullable();
|
|
$table->dateTime('publishdate')->nullable();
|
|
$table->string('pages', 128)->nullable();
|
|
$table->string('overview', 3000)->nullable();
|
|
$table->string('genre');
|
|
$table->boolean('cover')->default(0);
|
|
$table->timestamps();
|
|
});
|
|
DB::unprepared('ALTER TABLE bookinfo ADD FULLTEXT ix_bookinfo_author_title_ft (author, title)');
|
|
}
|
|
|
|
|
|
/**
|
|
* Reverse the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function down()
|
|
{
|
|
Schema::drop('bookinfo');
|
|
}
|
|
|
|
}
|