updated attachments

This commit is contained in:
2023-07-19 14:56:56 +10:00
parent bfacb86f35
commit 1598efac35
11 changed files with 212 additions and 196 deletions

View File

@@ -0,0 +1,30 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::table('attachments', function (Blueprint $table) {
$table->renameColumn('attachable_type', 'addendum_type');
$table->renameColumn('attachable_id', 'addendum_id');
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('attachments', function (Blueprint $table) {
$table->renameColumn('addendum_type', 'attachable_type');
$table->renameColumn('addendum_id', 'attachable_id');
});
}
};