osb/database/migrations/2021_07_07_164413_rework_account.php

34 lines
762 B
PHP

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