This repository has been archived by the owner on Jun 10, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Was a problem with seeding data since indexes didn't match from develop and production. Also fixed a seed error with roles.
- Loading branch information
1 parent
2f9e2d8
commit 92eb779
Showing
2 changed files
with
43 additions
and
1 deletion.
There are no files selected for viewing
42 changes: 42 additions & 0 deletions
42
database/migrations/2017_05_24_161645_edit_sets_table_index.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<?php | ||
|
||
use Illuminate\Support\Facades\Schema; | ||
use Illuminate\Database\Schema\Blueprint; | ||
use Illuminate\Database\Migrations\Migration; | ||
|
||
class EditSetsTableIndex extends Migration | ||
{ | ||
/** | ||
* Run the migrations. | ||
* | ||
* @return void | ||
*/ | ||
public function up() | ||
{ | ||
Schema::table('sets', function (Blueprint $table) { | ||
$table->dropUnique('sets_external_id_unique'); | ||
}); | ||
|
||
Schema::table('sets', function (Blueprint $table) { | ||
$table->unique(['external_id', 'lang'], 'external_id_lang_unique'); | ||
$table->unique(['slug', 'lang'], 'slug_unique'); | ||
}); | ||
} | ||
|
||
/** | ||
* Reverse the migrations. | ||
* | ||
* @return void | ||
*/ | ||
public function down() | ||
{ | ||
Schema::table('sets', function (Blueprint $table) { | ||
$table->dropUnique('external_id_lang_unique'); | ||
$table->dropUnique('slug_unique'); | ||
}); | ||
|
||
Schema::table('sets', function (Blueprint $table) { | ||
$table->unique('external_id', 'sets_external_id_unique'); | ||
}); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters