diff options
author | Fbenas <philbeansburton@gmail.com> | 2020-06-19 02:16:51 +0100 |
---|---|---|
committer | Fbenas <philbeansburton@gmail.com> | 2020-06-19 02:16:51 +0100 |
commit | d1fe4536cc039450b540104e382db0d01d5cf886 (patch) | |
tree | fd40ab48f79370541f377b59bb381811126485ad /database/migrations | |
parent | c83e876693bdb71c66418c13f5e09dfdaef24478 (diff) |
Initial commit
Diffstat (limited to 'database/migrations')
6 files changed, 212 insertions, 0 deletions
diff --git a/database/migrations/2020_06_18_155337_create_match_team_table.php b/database/migrations/2020_06_18_155337_create_match_team_table.php new file mode 100644 index 0000000..a1e7d0e --- /dev/null +++ b/database/migrations/2020_06_18_155337_create_match_team_table.php @@ -0,0 +1,36 @@ +<?php + +use Illuminate\Database\Migrations\Migration; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Support\Facades\Schema; + +class CreateMatchTeamTable extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::create( + 'match_team', function (Blueprint $table) { + $table->id(); + $table->unsignedInteger('match_id'); + $table->unsignedInteger('team_id'); + $table->boolean('is_home'); + $table->timestamps(); + } + ); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('match_team'); + } +} diff --git a/database/migrations/2020_06_18_155337_create_match_tournament_table.php b/database/migrations/2020_06_18_155337_create_match_tournament_table.php new file mode 100644 index 0000000..02f0e91 --- /dev/null +++ b/database/migrations/2020_06_18_155337_create_match_tournament_table.php @@ -0,0 +1,35 @@ +<?php + +use Illuminate\Database\Migrations\Migration; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Support\Facades\Schema; + +class CreateMatchTournamentTable extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::create( + 'match_tournament', function (Blueprint $table) { + $table->id(); + $table->unsignedInteger('match_id'); + $table->unsignedInteger('tournament_id'); + $table->timestamps(); + } + ); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('match_tournament'); + } +} diff --git a/database/migrations/2020_06_18_155337_create_matches_table.php b/database/migrations/2020_06_18_155337_create_matches_table.php new file mode 100644 index 0000000..a443371 --- /dev/null +++ b/database/migrations/2020_06_18_155337_create_matches_table.php @@ -0,0 +1,38 @@ +<?php + +use Illuminate\Database\Migrations\Migration; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Support\Facades\Schema; + +class CreateMatchesTable extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::create( + 'matches', function (Blueprint $table) { + $table->id(); + $table->unsignedInteger('venue_id')->nullable(); + $table->string('referee')->nullable(); + $table->string('score')->nullable(); + $table->string('half_score')->nullable(); + $table->dateTime('date')->nullable(); + $table->timestamps(); + } + ); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('matches'); + } +} diff --git a/database/migrations/2020_06_18_155355_create_teams_table.php b/database/migrations/2020_06_18_155355_create_teams_table.php new file mode 100644 index 0000000..3e0d58f --- /dev/null +++ b/database/migrations/2020_06_18_155355_create_teams_table.php @@ -0,0 +1,34 @@ +<?php + +use Illuminate\Database\Migrations\Migration; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Support\Facades\Schema; + +class CreateTeamsTable extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::create( + 'teams', function (Blueprint $table) { + $table->id(); + $table->string('name'); + $table->timestamps(); + } + ); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('teams'); + } +} diff --git a/database/migrations/2020_06_18_155355_create_tournaments_table.php b/database/migrations/2020_06_18_155355_create_tournaments_table.php new file mode 100644 index 0000000..8dc267a --- /dev/null +++ b/database/migrations/2020_06_18_155355_create_tournaments_table.php @@ -0,0 +1,34 @@ +<?php + +use Illuminate\Database\Migrations\Migration; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Support\Facades\Schema; + +class CreateTournamentsTable extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::create( + 'tournaments', function (Blueprint $table) { + $table->id(); + $table->string('name'); + $table->timestamps(); + } + ); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('tournaments'); + } +} diff --git a/database/migrations/2020_06_18_155412_create_venues_table.php b/database/migrations/2020_06_18_155412_create_venues_table.php new file mode 100644 index 0000000..e2c84b2 --- /dev/null +++ b/database/migrations/2020_06_18_155412_create_venues_table.php @@ -0,0 +1,35 @@ +<?php + +use Illuminate\Database\Migrations\Migration; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Support\Facades\Schema; + +class CreateVenuesTable extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::create( + 'venues', function (Blueprint $table) { + $table->id(); + $table->string('name'); + $table->string('city')->nullable(); + $table->timestamps(); + } + ); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('venues'); + } +} |