table member dan table benefit

This commit is contained in:
pajri
2022-12-20 17:48:28 +07:00
parent da14589328
commit 88ad144921
17 changed files with 1365 additions and 499 deletions

View File

@@ -14,7 +14,7 @@ return new class extends Migration
public function up()
{
Schema::table('plans', function (Blueprint $table) {
$table->boolean('active')->after('max_surgery_periode_days');
$table->boolean('active')->after('max_surgery_periode_days')->default(true);
});
}

View File

@@ -0,0 +1,32 @@
<?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('members', function (Blueprint $table) {
$table->unsignedBigInteger('person_id')->after('id')->nullable()->index();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('members', function (Blueprint $table) {
$table->dropColumn('person_id');
});
}
};

View File

@@ -0,0 +1,34 @@
<?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('persons', function (Blueprint $table) {
$table->string('language')->after('birth_place')->nullable();
$table->string('race')->after('language')->nullable();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('persons', function (Blueprint $table) {
$table->dropColumn('language');
$table->dropColumn('race');
});
}
};