Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SkullMasher/ffff9e85577a080536af0848fc3350ed to your computer and use it in GitHub Desktop.
Save SkullMasher/ffff9e85577a080536af0848fc3350ed to your computer and use it in GitHub Desktop.
Add the deleted_at (aka softDeletes) column to the akaunting media tables to help solve 500 errors
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class AddSoftDeletesToMediaTables extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('media', function (Blueprint $table) {
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('media', function (Blueprint $table) {
$table->dropSoftDeletes();
});
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment