aboutsummaryrefslogtreecommitdiffhomepage
path: root/database
diff options
context:
space:
mode:
authorMarvin Borner2018-07-06 23:49:59 +0200
committerMarvin Borner2018-07-06 23:49:59 +0200
commitefe4b98e6f3d5d63bc2da8110f474d6b7ec122df (patch)
treea9cc2d39f6e30ac68a798eb4e39616a8626ded99 /database
parentd6df567e05261a1c71f127aa0c6ac6d07c3c9cef (diff)
Added public key database migration
Diffstat (limited to 'database')
-rw-r--r--database/migrations/2018_07_06_213554_create_public_key_table.php35
1 files changed, 35 insertions, 0 deletions
diff --git a/database/migrations/2018_07_06_213554_create_public_key_table.php b/database/migrations/2018_07_06_213554_create_public_key_table.php
new file mode 100644
index 0000000..5a1dda4
--- /dev/null
+++ b/database/migrations/2018_07_06_213554_create_public_key_table.php
@@ -0,0 +1,35 @@
+<?php
+
+use Illuminate\Support\Facades\Schema;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Database\Migrations\Migration;
+
+class CreatePublicKeyTable extends Migration
+{
+ /**
+ * Run the migrations.
+ *
+ * @return void
+ */
+ public function up()
+ {
+ Schema::create('public_keys', function (Blueprint $table) {
+ $table->increments('id');
+ $table->integer('user_id')->unsigned()->unique();
+ $table->string('key', 4096);
+ $table->timestamps();
+
+ $table->foreign('user_id')->references('id')->on('users');
+ });
+ }
+
+ /**
+ * Reverse the migrations.
+ *
+ * @return void
+ */
+ public function down()
+ {
+ Schema::dropIfExists('public_key');
+ }
+}