mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-07-28 17:02:04 +03:00
Input WYSIWYG: Added description_html field, added store logic
Rolled out HTML editor field and store logic across all target entity types. Cleaned up WYSIWYG input logic and design. Cleaned up some injected classes while there.
This commit is contained in:
@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
$addColumn = fn(Blueprint $table) => $table->text('description_html');
|
||||
|
||||
Schema::table('books', $addColumn);
|
||||
Schema::table('chapters', $addColumn);
|
||||
Schema::table('bookshelves', $addColumn);
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
$removeColumn = fn(Blueprint $table) => $table->removeColumn('description_html');
|
||||
|
||||
Schema::table('books', $removeColumn);
|
||||
Schema::table('chapters', $removeColumn);
|
||||
Schema::table('bookshelves', $removeColumn);
|
||||
}
|
||||
};
|
Reference in New Issue
Block a user