aboutsummaryrefslogtreecommitdiff
path: root/database/migrations/2023_06_04_020953_create_adresses_table.php
diff options
context:
space:
mode:
Diffstat (limited to 'database/migrations/2023_06_04_020953_create_adresses_table.php')
-rw-r--r--database/migrations/2023_06_04_020953_create_adresses_table.php36
1 files changed, 36 insertions, 0 deletions
diff --git a/database/migrations/2023_06_04_020953_create_adresses_table.php b/database/migrations/2023_06_04_020953_create_adresses_table.php
new file mode 100644
index 0000000..d7ad29b
--- /dev/null
+++ b/database/migrations/2023_06_04_020953_create_adresses_table.php
@@ -0,0 +1,36 @@
+<?php
+
+use Illuminate\Database\Migrations\Migration;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Support\Facades\Schema;
+
+class CreateAdressesTable extends Migration
+{
+ /**
+ * Run the migrations.
+ *
+ * @return void
+ */
+ public function up()
+ {
+ Schema::create('adresses', function (Blueprint $table) {
+ $table->id();
+ $table->column('type', 'addresstype');
+ $table->string('local', 64);
+ $table->string('domain', 255);
+ $table->timestamps();
+
+ $table->foreign('domain')->references('name')->on('domains');
+ });
+ }
+
+ /**
+ * Reverse the migrations.
+ *
+ * @return void
+ */
+ public function down()
+ {
+ Schema::dropIfExists('adresses');
+ }
+}