@@ -6,45 +6,45 @@ |
||
6 | 6 | |
7 | 7 | class CreateTournamentTable extends Migration { |
8 | 8 | |
9 | - public function up() |
|
10 | - { |
|
11 | - Schema::create('tournament', function(Blueprint $table) { |
|
12 | - $table->increments('id'); |
|
9 | + public function up() |
|
10 | + { |
|
11 | + Schema::create('tournament', function(Blueprint $table) { |
|
12 | + $table->increments('id'); |
|
13 | 13 | $table->Integer('user_id')->unsigned()->index(); |
14 | - $table->foreign('user_id') |
|
15 | - ->references('id') |
|
16 | - ->on('users') |
|
17 | - ->onUpdate('cascade') |
|
18 | - ->onDelete('cascade'); |
|
19 | - |
|
20 | - $table->string('name'); |
|
21 | - $table->date('dateIni'); |
|
22 | - $table->date('dateFin'); |
|
14 | + $table->foreign('user_id') |
|
15 | + ->references('id') |
|
16 | + ->on('users') |
|
17 | + ->onUpdate('cascade') |
|
18 | + ->onDelete('cascade'); |
|
19 | + |
|
20 | + $table->string('name'); |
|
21 | + $table->date('dateIni'); |
|
22 | + $table->date('dateFin'); |
|
23 | 23 | $table->date('registerDateLimit'); |
24 | 24 | $table->integer('sport')->unsigned()->default(1); // Default is Kendo for now |
25 | - $table->string('promoter')->nullable(); |
|
26 | - $table->string('host_organization')->nullable(); |
|
27 | - $table->string('technical_assistance')->nullable(); |
|
28 | - $table->integer('rule_id')->default(1); |
|
25 | + $table->string('promoter')->nullable(); |
|
26 | + $table->string('host_organization')->nullable(); |
|
27 | + $table->string('technical_assistance')->nullable(); |
|
28 | + $table->integer('rule_id')->default(1); |
|
29 | 29 | $table->tinyInteger('type')->default(1); // 1= local, 2= state, 3= national, 4=continent, 5=world |
30 | 30 | $table->integer("venue_id")->nullable()->unsigned(); |
31 | - $table->integer("level_id")->unsigned()->default(1); |
|
31 | + $table->integer("level_id")->unsigned()->default(1); |
|
32 | 32 | |
33 | 33 | $table->foreign('venue_id') |
34 | 34 | ->references('id') |
35 | 35 | ->on('venue'); |
36 | 36 | |
37 | - $table->timestamps(); |
|
38 | - $table->softDeletes(); |
|
39 | - $table->engine = 'InnoDB'; |
|
37 | + $table->timestamps(); |
|
38 | + $table->softDeletes(); |
|
39 | + $table->engine = 'InnoDB'; |
|
40 | 40 | |
41 | - }); |
|
42 | - } |
|
41 | + }); |
|
42 | + } |
|
43 | 43 | |
44 | - public function down() |
|
45 | - { |
|
46 | - DB::statement('SET FOREIGN_KEY_CHECKS = 0'); |
|
47 | - Schema::dropIfExists('tournament'); |
|
48 | - DB::statement('SET FOREIGN_KEY_CHECKS = 1'); |
|
49 | - } |
|
44 | + public function down() |
|
45 | + { |
|
46 | + DB::statement('SET FOREIGN_KEY_CHECKS = 0'); |
|
47 | + Schema::dropIfExists('tournament'); |
|
48 | + DB::statement('SET FOREIGN_KEY_CHECKS = 1'); |
|
49 | + } |
|
50 | 50 | } |
51 | 51 | \ No newline at end of file |