diff options
| author | horus | 2020-02-24 02:47:52 +0100 |
|---|---|---|
| committer | horus | 2020-02-24 02:47:52 +0100 |
| commit | 420e44e0fe4623a439e26dfd0526ee5ef606a170 (patch) | |
| tree | 1669604f8db3382da7f9e2fb0e492013a04eb839 /database/migrations/2020_02_24_005015_add_fk_stats.php | |
| parent | b6e4ea17a3a6dce208c30418a7a3a898b83d6938 (diff) | |
| download | senpai-420e44e0fe4623a439e26dfd0526ee5ef606a170.tar.gz | |
Crude workaround.
Diffstat (limited to 'database/migrations/2020_02_24_005015_add_fk_stats.php')
| -rw-r--r-- | database/migrations/2020_02_24_005015_add_fk_stats.php | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/database/migrations/2020_02_24_005015_add_fk_stats.php b/database/migrations/2020_02_24_005015_add_fk_stats.php new file mode 100644 index 0000000..3a6a66a --- /dev/null +++ b/database/migrations/2020_02_24_005015_add_fk_stats.php @@ -0,0 +1,32 @@ +<?php + +use Illuminate\Database\Migrations\Migration; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Support\Facades\Schema; + +class AddFkStats extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::table('stats', function (Blueprint $table) { + $table->foreign('mal_id')->references('mal_id')->on('anime'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('stats', function (Blueprint $table) { + // + }); + } +} |
