Skip to content

Commit

Permalink
Fix Migrations Again
Browse files Browse the repository at this point in the history
  • Loading branch information
BossOfGames committed Apr 21, 2024
1 parent 3a2d937 commit 5f7ae0d
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ class CreateChTripTemplatesTable extends Migration
public function up()
{
// Add Trip Templates
if (!Schema::hasTable('ch_trip_templates')) {
Schema::create('ch_trip_templates', function (Blueprint $table) {
$table->increments('id');
$table->string('name');
Expand All @@ -30,9 +31,12 @@ public function up()
$table->timestamps();
$table->softDeletes();
});
}
if (Schema::hasTable('ch_trip_templates') && !Schema::hasColumn('ch_trip_templates', 'can_duplicate')) {
Schema::table('ch_trip_reports', function (Blueprint $table) {
$table->boolean('can_duplicate'); // Allows trip to be duplicated by another user so they can fly a similar trip.
});
}
}

/**
Expand Down

0 comments on commit 5f7ae0d

Please sign in to comment.