mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-08-29 01:08:56 +00:00
41 lines
1.1 KiB
PHP
41 lines
1.1 KiB
PHP
<?php
|
|
|
|
use Illuminate\Database\Migrations\Migration;
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
|
|
class CreatePartsTable extends Migration
|
|
{
|
|
|
|
/**
|
|
* Run the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function up()
|
|
{
|
|
Schema::create('parts', function (Blueprint $table) {
|
|
$table->engine = 'InnoDB';
|
|
$table->charset = 'utf8';
|
|
$table->collation = 'utf8_unicode_ci';
|
|
$table->bigInteger('binaries_id')->unsigned()->default(0);
|
|
$table->string('messageid')->default('');
|
|
$table->bigInteger('number')->unsigned()->default(0);
|
|
$table->integer('partnumber')->unsigned()->default(0);
|
|
$table->integer('size')->unsigned()->default(0);
|
|
$table->primary(['binaries_id','number']);
|
|
$table->foreign('binaries_id', 'FK_binaries')->references('id')->on('binaries')->onUpdate('CASCADE')->onDelete('CASCADE');
|
|
});
|
|
}
|
|
|
|
|
|
/**
|
|
* Reverse the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function down()
|
|
{
|
|
Schema::drop('parts');
|
|
}
|
|
}
|