/** * Runs the migrations. * * @param Blueprint $table * * @return void */ public function up($table) { $table->increments('id'); $table->integer('match_id')->unsigned(); $table->foreign('match_id')->references('id')->on('matches')->onDelete('cascade'); $table->string('map')->default('de_dust2'); $table->integer('score_a')->default(0); $table->integer('score_b')->default(0); $table->integer('current_round')->default(0); /* * Statuses: * * 0. Not Started * 1. Starting * 2. Pre-Game Warmup * 3. Knife Round * 4. Knife Winners Deciding * 5. First Half Warmup * 6. First Half * 7. Second Half Warmup * 8. Second Half * 9. Overtime Warmup * 10. Overtime * 11. Finished */ $table->integer('status')->default(0); $table->boolean('is_paused')->default(false); $table->string('team_paused')->nullable(); $table->boolean('team_a_unpause')->default(false); $table->boolean('team_b_unpause')->default(false); $table->string('current_side')->default('ct'); $table->boolean('t_ready')->default(false); $table->boolean('ct_ready')->default(false); $table->timestamps(); }
/** * Runs the migrations. * * @param Blueprint $table * * @return void */ public function up($table) { $table->increments('id'); $table->string('name'); $table->string('config_file')->default('esl5on5'); $table->integer('max_rounds')->default(15); $table->boolean('knife_round')->default(true); $table->boolean('overtime_enabled')->default(true); $table->bigInteger('overtime_start_money')->default(10000); $table->integer('overtime_max_round')->default(3); $table->timestamps(); }
/** * Runs the migrations. * * @param Blueprint $table * * @return void */ public function up($table) { $table->increments('id'); $table->integer('event_id')->unsigned(); $table->foreign('event_id')->references('id')->on('events')->onDelete('cascade'); $table->integer('server_id')->unsigned(); $table->foreign('server_id')->references('id')->on('servers')->onDelete('cascade'); $table->integer('team_a')->unsigned(); $table->foreign('team_a')->references('id')->on('teams')->onDelete('cascade'); $table->integer('team_b')->unsigned(); $table->foreign('team_b')->references('id')->on('teams')->onDelete('cascade'); $table->integer('ruleset_id')->unsigned(); $table->foreign('ruleset_id')->references('id')->on('rulesets')->onDelete('cascade'); /* * Statuses: * * -1: Finished * 0: Not Started * 1: Running Map 1 * 2: Running Map 2 * 3: Running Map 3 * 4: Running Map 4 * 5: Running Map 5 */ $table->integer('status')->default(0); $table->boolean('starting')->default(false); $table->string('password')->nullable(); $table->string('auth_key')->nullable(); $table->integer('best_of')->default(1); $table->timestamps(); }
/** * Runs the migrations. * * @param Blueprint $table * * @return void */ public function up($table) { $table->increments('id'); $table->string('name'); $table->string('subtitle')->nullable(); $table->boolean('active')->default(false); $table->string('link')->nullable(); $table->longText('description')->nullable(); $table->timestamps(); }