Вход Регистрация
Файл: database/migrations/2018_02_03_170034_create_cards_table.php
Строк: 46
<?php

use IlluminateSupportFacadesSchema;
use 
IlluminateDatabaseSchemaBlueprint;
use 
IlluminateDatabaseMigrationsMigration;

class 
CreateCardsTable extends Migration
{
    
/**
     * Run the migrations.
     *
     * @return void
     */
    
public function up()
    {
        
Schema::create('cards', function (Blueprint $table) {
            
$table->increments('id');
            
$table->string('name');
            
$table->integer('level');
            
$table->enum('type', ['common''premium''tutorial-common''tutorial-premium'])->default('common');
            
$table->integer('min_attack');
            
$table->integer('max_attack');
            
$table->integer('health');
            
$table->integer('armor');
            
$table->integer('attack_count')->default(1);
            
$table->integer('cooldown');
            
$table->integer('learn_time');
            
$table->integer('open_cost');
            
$table->integer('buyout_cost');
            
$table->string('image');
            
$table->timestamps();
        });
    }

    
/**
     * Reverse the migrations.
     *
     * @return void
     */
    
public function down()
    {
        
Schema::dropIfExists('cards');
    }
}
Онлайн: 2
Реклама