Rename nh_network_config_id to network_id in nh_validating_agents
This commit is contained in:
parent
0dd7038b7f
commit
d053ae86da
|
@ -13,7 +13,7 @@ use Illuminate\Database\Eloquent\Model;
|
|||
* Class NhValidatingDoctor
|
||||
*
|
||||
* @property int $id
|
||||
* @property int $nh_network_config_id
|
||||
* @property int $network_id
|
||||
* @property string|null $firstname
|
||||
* @property string $lastname
|
||||
* @property string $email
|
||||
|
@ -32,7 +32,7 @@ class NhValidatingAgent extends Model
|
|||
protected $table = 'nh_validating_agents';
|
||||
|
||||
protected $casts = [
|
||||
'nh_network_config_id' => 'int'
|
||||
'network_id' => 'int'
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
|
@ -41,7 +41,7 @@ class NhValidatingAgent extends Model
|
|||
];
|
||||
|
||||
protected $fillable = [
|
||||
'nh_network_config_id',
|
||||
'network_id',
|
||||
'firstname',
|
||||
'lastname',
|
||||
'email',
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,34 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class RenameNhNetworkConfigIdInNhValidatingAgentsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('nh_validating_agents', function (Blueprint $table) {
|
||||
$table->renameColumn('nh_network_config_id', 'network_id');
|
||||
DB::statement("alter table nh_validating_agents modify role enum ('DOCTOR', 'AGENT', 'CONTROLLER','OPENING_ACCOUNT_AGENT') default 'DOCTOR' not null;");
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('nh_validating_agents', function (Blueprint $table) {
|
||||
$table->renameColumn('network_id', 'nh_network_config_id');
|
||||
});
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue