Add DefaultDomainBlock model + migration

This commit is contained in:
Daniel Supernault 2023-12-21 03:47:23 -07:00
parent 3e28cf661b
commit f3f0175c84
No known key found for this signature in database
GPG key ID: 23740873EE6F76A1
2 changed files with 42 additions and 0 deletions

View file

@ -0,0 +1,13 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class DefaultDomainBlock extends Model
{
use HasFactory;
protected $guarded = [];
}

View file

@ -0,0 +1,29 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('default_domain_blocks', function (Blueprint $table) {
$table->id();
$table->string('domain')->unique()->index();
$table->text('note')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('default_domain_blocks');
}
};