diff options
Diffstat (limited to 'database')
-rw-r--r-- | database/migrations/2018_07_06_213554_create_public_key_table.php | 35 |
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'); + } +} |