2021-07-07 07:45:16 +00:00
|
|
|
<?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()
|
|
|
|
{
|
2021-07-13 02:31:56 +00:00
|
|
|
abort(500,'cant go back');
|
2021-07-07 07:45:16 +00:00
|
|
|
}
|
|
|
|
}
|