the browser-facing portion of osu!
1<?php
2
3// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the GNU Affero General Public License v3.0.
4// See the LICENCE file in the repository root for full licence text.
5use Illuminate\Database\Migrations\Migration;
6use Illuminate\Database\Schema\Blueprint;
7
8class CreateTournamentsTables extends Migration
9{
10 /**
11 * Run the migrations.
12 *
13 * @return void
14 */
15 public function up()
16 {
17 Schema::create('tournaments', function (Blueprint $table) {
18 $table->increments('tournament_id');
19 $table->string('name');
20 $table->tinyInteger('play_mode')->unsigned()->default(0);
21 $table->integer('rank_min')->unsigned()->nullable();
22 $table->integer('rank_max')->unsigned()->nullable();
23 $table->dateTime('signup_open')->default(DB::raw('NOW()'));
24 $table->dateTime('signup_close');
25 $table->dateTime('start_date');
26 $table->dateTime('end_date');
27 $table->timestamps();
28 });
29 }
30
31 /**
32 * Reverse the migrations.
33 *
34 * @return void
35 */
36 public function down()
37 {
38 Schema::drop('tournaments');
39 }
40}