ldc-gen-game-web/database/migrations/2020_10_28_091935_create_participation.php
2020-11-04 11:49:43 +01:00

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');
}
}