Rename ab_account to accounts
This commit is contained in:
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