49 lines
1.3 KiB
PHP
49 lines
1.3 KiB
PHP
<?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()
|
|
{
|
|
Schema::table('users', function (Blueprint $table) {
|
|
$table->string('text_color')->default('#000000');
|
|
$table->string('background_color')->default('#FFFFFF');
|
|
$table->string('font')->default('Arial');
|
|
$table->float('font_size', 3, 1)->default(16);
|
|
$table->float('line_spacing', 2, 3)->default(1.5);
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Reverse the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function down()
|
|
{
|
|
Schema::table('users', function (Blueprint $table) {
|
|
$table->dropColumn('text_color');
|
|
});
|
|
Schema::table('users', function (Blueprint $table) {
|
|
$table->dropColumn('background_color');
|
|
});
|
|
Schema::table('users', function (Blueprint $table) {
|
|
$table->dropColumn('font');
|
|
});
|
|
Schema::table('users', function (Blueprint $table) {
|
|
$table->dropColumn('font_size');
|
|
});
|
|
Schema::table('users', function (Blueprint $table) {
|
|
$table->dropColumn('line_spacing');
|
|
});
|
|
}
|
|
};
|