mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-08-31 18:28:54 +00:00
42 lines
991 B
PHP
42 lines
991 B
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');
|
|
}
|
|
|
|
}
|