Rename ab_account to accounts
This commit is contained in:
@@ -37,23 +37,13 @@ class AccountFactory extends Factory
|
||||
'country_id' => $co->id,
|
||||
// 'rtm_id',
|
||||
'currency_id' => $cyo->id,
|
||||
// 'username',
|
||||
// 'password',
|
||||
'active' => TRUE,
|
||||
// 'first_name',
|
||||
// 'last_name',
|
||||
// 'title',
|
||||
// 'email',
|
||||
// 'company',
|
||||
// 'address1',
|
||||
// 'address2',
|
||||
// 'city',
|
||||
// 'state',
|
||||
// 'zip',
|
||||
// 'email_type',
|
||||
// 'invoice_delivery',
|
||||
// 'mail_type',
|
||||
// 'remember_token',
|
||||
// 'user_id',
|
||||
];
|
||||
}
|
||||
|
33
database/migrations/2021_07_07_164413_rework_account.php
Normal file
33
database/migrations/2021_07_07_164413_rework_account.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class ReworkAccount extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('ab_account', function (Blueprint $table) {
|
||||
$table->dropUnique('uq_username');
|
||||
$table->dropColumn(['username','password','first_name','last_name','title','email','email_type','invoice_delivery','mail_type','remember_token']);
|
||||
});
|
||||
|
||||
DB::statement('ALTER TABLE ab_account RENAME TO accounts');
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
//abort(500,'cant go back');
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user