Changeset View
Changeset View
Standalone View
Standalone View
src/database/migrations/2020_06_04_115409_create_powerdns_tables.php
<?php | <?php | ||||
use Illuminate\Database\Migrations\Migration; | use Illuminate\Database\Migrations\Migration; | ||||
use Illuminate\Database\Schema\Blueprint; | use Illuminate\Database\Schema\Blueprint; | ||||
use Illuminate\Support\Facades\Schema; | use Illuminate\Support\Facades\Schema; | ||||
// phpcs:ignore | // phpcs:ignore | ||||
class CreatePowerDNSTables extends Migration | class CreatePowerDNSTables extends Migration | ||||
{ | { | ||||
/** | /** | ||||
* Run the migrations. | * Run the migrations. | ||||
* | * | ||||
* @return void | * @return void | ||||
*/ | */ | ||||
public function up() | public function up() | ||||
{ | { | ||||
//Drop the tables from the mysql initialization | |||||
Schema::dropIfExists('powerdns_domains'); | |||||
Schema::dropIfExists('powerdns_records'); | |||||
Schema::dropIfExists('powerdns_masters'); | |||||
Schema::dropIfExists('powerdns_comments'); | |||||
Schema::dropIfExists('powerdns_domain_settings'); | |||||
Schema::dropIfExists('powerdns_cryptokeys'); | |||||
Schema::dropIfExists('powerdns_tsigkeys'); | |||||
Schema::create( | Schema::create( | ||||
'powerdns_domains', | 'powerdns_domains', | ||||
function (Blueprint $table) { | function (Blueprint $table) { | ||||
$table->bigIncrements('id'); | $table->bigIncrements('id'); | ||||
$table->string('name', 255)->unique()->index(); | $table->string('name', 255)->unique()->index(); | ||||
$table->string('master', 128)->nullable(); | $table->string('master', 128)->nullable(); | ||||
$table->datetime('last_check')->nullable(); | $table->datetime('last_check')->nullable(); | ||||
$table->string('type', 6)->default('NATIVE'); | $table->string('type', 6)->default('NATIVE'); | ||||
▲ Show 20 Lines • Show All 123 Lines • Show Last 20 Lines |