Rename ab_account to accounts

This commit is contained in:
Deon George
2021-07-07 17:45:16 +10:00
parent f6751e7a63
commit 24ff62094a
5 changed files with 41 additions and 106 deletions

View 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');
}
}