Skip to content

Commit

Permalink
Minor refactor
Browse files Browse the repository at this point in the history
Signed-off-by: Sam Poyigi <[email protected]>
  • Loading branch information
sampoyigi committed Jan 14, 2024
1 parent c15b989 commit f4d6a45
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,13 @@
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
return new class extends Migration {
public function up()
{
if (!Schema::hasColumn('igniter_reviews', 'date_added')) {
return;
}

Schema::table('igniter_reviews', function (Blueprint $table) {
$table->timestamp('date_added')->change();
$table->renameColumn('date_added', 'created_at');
Expand Down

0 comments on commit f4d6a45

Please sign in to comment.