1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-10-26 17:31:27 +03:00

API: Started building comments API endpoints

This commit is contained in:
Dan Brown
2025-10-22 14:58:29 +01:00
parent abe9c1e5a3
commit 082dbc9944
6 changed files with 112 additions and 10 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('comments', function (Blueprint $table) {
$table->renameColumn('entity_id', 'commentable_id');
$table->renameColumn('entity_type', 'commentable_type');
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('comments', function (Blueprint $table) {
$table->renameColumn('commentable_id', 'entity_id');
$table->renameColumn('commentable_type', 'entity_type');
});
}
};