Skip to content

Commit 1d02687

Browse files
2 parents 8a34413 + 1b337d1 commit 1d02687

File tree

3 files changed

+16
-8
lines changed

3 files changed

+16
-8
lines changed

src/Utils/GedcomParser.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212
use FamilyTree365\LaravelGedcom\Utils\Importer\Sour;
1313
use FamilyTree365\LaravelGedcom\Utils\Importer\Subm;
1414
use FamilyTree365\LaravelGedcom\Utils\Importer\Subn;
15+
use Gedcom\Parser;
1516
use Illuminate\Console\OutputStyle;
1617
use Illuminate\Support\Facades\Log;
17-
use Gedcom\Parser;
1818
use Symfony\Component\Console\Input\StringInput;
1919
use Symfony\Component\Console\Output\StreamOutput;
2020

src/Utils/GedcomWriter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
use FamilyTree365\LaravelGedcom\Models\Source;
1212
use FamilyTree365\LaravelGedcom\Models\Subm;
1313
use FamilyTree365\LaravelGedcom\Models\Subn;
14-
use Illuminate\Console\OutputStyle;
1514
use Gedcom\Parser;
15+
use Illuminate\Console\OutputStyle;
1616
use Symfony\Component\Console\Input\StringInput;
1717
use Symfony\Component\Console\Output\StreamOutput;
1818

src/migrations/2021_05_28_121021_add_index_key_people_table.php

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,13 @@ class AddIndexKeyPeopleTable extends Migration
1313
*/
1414
public function up()
1515
{
16-
Schema::table('people', function (Blueprint $table) {
17-
$table->index(['id', 'uid']);
18-
});
16+
if (Schema::hasTable('people')) {
17+
Schema::table('people', function (Blueprint $table) {
18+
if (Schema::hasColumn('people', 'uid')) {
19+
$table->index(['id', 'uid']);
20+
}
21+
});
22+
}
1923
}
2024

2125
/**
@@ -25,8 +29,12 @@ public function up()
2529
*/
2630
public function down()
2731
{
28-
Schema::table('people', function (Blueprint $table) {
29-
$table->dropIndex(['id', 'uid']);
30-
});
32+
if (Schema::hasTable('people')) {
33+
Schema::table('people', function (Blueprint $table) {
34+
if (Schema::hasColumn('people', 'uid')) {
35+
$table->dropIndex(['id', 'uid']);
36+
}
37+
});
38+
}
3139
}
3240
}

0 commit comments

Comments
 (0)