documents
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
<?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('person_addresses', function (Blueprint $table): void {
|
||||
$table->string('post_code', 16)->nullable();
|
||||
$table->string('city', 100)->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('person_addresses', function (Blueprint $table): void {
|
||||
if (Schema::hasColumn('person_addresses', 'post_code')) {
|
||||
$table->dropColumn('post_code');
|
||||
}
|
||||
if (Schema::hasColumn('person_addresses', 'city')) {
|
||||
$table->dropColumn('city');
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,26 @@
|
||||
<?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('document_settings', function (Blueprint $table): void {
|
||||
if (! Schema::hasColumn('document_settings', 'custom_defaults')) {
|
||||
$table->json('custom_defaults')->nullable();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('document_settings', function (Blueprint $table): void {
|
||||
if (Schema::hasColumn('document_settings', 'custom_defaults')) {
|
||||
$table->dropColumn('custom_defaults');
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user