39 lines
1.1 KiB
PHP
39 lines
1.1 KiB
PHP
<?php
|
|
|
|
use Illuminate\Database\Migrations\Migration;
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
use Illuminate\Support\Facades\Schema;
|
|
|
|
class CreateParticipation extends Migration
|
|
{
|
|
/**
|
|
* Run the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function up()
|
|
{
|
|
Schema::create('participation', function (Blueprint $table) {
|
|
$table->id();
|
|
$table->foreignId('user_id')->constrained('users');
|
|
$table->foreignId('code_unique_id')->constrained('codes');
|
|
$table->foreignId('code_ean_id')->nullable()->constrained('codes_ean');
|
|
$table->foreignId('instant_win_id')->nullable()->constrained('instant_win');
|
|
$table->string('ip');
|
|
$table->string('sticker')->nullable();
|
|
$table->string('ticket')->nullable();
|
|
$table->string('barcode')->nullable();
|
|
$table->timestamps();
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Reverse the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function down()
|
|
{
|
|
Schema::dropIfExists('participation');
|
|
}
|
|
}
|