36 lines
887 B
PHP
36 lines
887 B
PHP
|
<?php
|
||
|
|
||
|
use Illuminate\Database\Migrations\Migration;
|
||
|
use Illuminate\Database\Schema\Blueprint;
|
||
|
use Illuminate\Support\Facades\Schema;
|
||
|
|
||
|
class ReworkDomains extends Migration
|
||
|
{
|
||
|
/**
|
||
|
* Run the migrations.
|
||
|
*
|
||
|
* @return void
|
||
|
*/
|
||
|
public function up()
|
||
|
{
|
||
|
DB::statement('ALTER TABLE ab_service__domain MODIFY COLUMN id INT auto_increment');
|
||
|
DB::statement('ALTER TABLE ab_service__domain RENAME TO service_domains');
|
||
|
|
||
|
Schema::table('service_domains', function (Blueprint $table) {
|
||
|
$table->renameColumn('registrar_type','registrar_account');
|
||
|
$table->unique(['domain_name','domain_tld_id']);
|
||
|
$table->dropColumn(['registrar_password','registrar_pending_transfer']);
|
||
|
});
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Reverse the migrations.
|
||
|
*
|
||
|
* @return void
|
||
|
*/
|
||
|
public function down()
|
||
|
{
|
||
|
abort(500,'cant go back');
|
||
|
}
|
||
|
}
|