Файл: database/migrations/2018_04_20_180051_create_voteanswer_table.php
Строк: 29
<?php
declare(strict_types=1);
use IlluminateDatabaseMigrationsMigration;
use IlluminateDatabaseSchemaBlueprint;
use IlluminateSupportFacadesSchema;
final class CreateVoteanswerTable extends Migration
{
/**
* Migrate Up.
*/
public function up(): void
{
if (! Schema::hasTable('voteanswer')) {
Schema::create('voteanswer', function (Blueprint $table) {
$table->increments('id');
$table->integer('vote_id');
$table->string('answer', 50);
$table->integer('result')->default(0);
});
}
}
/**
* Migrate Down.
*/
public function down(): void
{
Schema::dropIfExists('voteanswer');
}
}