<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
    public function up(): void
    {
        Schema::table('esign_field_template_items', function (Blueprint $table) {
            $table->char('text_align', 1)->default('L')->after('font_size');
        });

        Schema::table('esign_sign_fields', function (Blueprint $table) {
            $table->char('text_align', 1)->default('L')->after('font_size');
        });
    }

    public function down(): void
    {
        Schema::table('esign_field_template_items', function (Blueprint $table) {
            $table->dropColumn('text_align');
        });

        Schema::table('esign_sign_fields', function (Blueprint $table) {
            $table->dropColumn('text_align');
        });
    }
};
