Skip to content

Commit

Permalink
Handle manually deleting the index in Laravel 11
Browse files Browse the repository at this point in the history
  • Loading branch information
Kurt Friars committed Apr 23, 2024
1 parent 5f0c098 commit c6dfa1e
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
<?php

use Plank\Snapshots\Migrator\SnapshotBlueprint;
use Plank\Snapshots\Migrator\SnapshotMigration;

return new class extends SnapshotMigration
{
public function up()
{
if (version_compare(app()->version(), '11.0.0', '>=')) {
$this->schema->table('documents', function (SnapshotBlueprint $table) {
$table->dropIndex(['released_at']);
});
}

$this->schema->dropColumns('documents', ['released_at']);
}
};

0 comments on commit c6dfa1e

Please sign in to comment.