We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c496329 commit 5c9f77dCopy full SHA for 5c9f77d
database/migrations/2020_03_04_214540_add_user_id_to_urls.php
@@ -0,0 +1,21 @@
1
+<?php
2
+
3
+use Illuminate\Database\Migrations\Migration;
4
+use Illuminate\Database\Schema\Blueprint;
5
+use Illuminate\Support\Facades\Schema;
6
7
+class AddUserIdToUrls extends Migration
8
+{
9
+ /**
10
+ * Run the migrations.
11
+ *
12
+ * @return void
13
+ */
14
+ public function up()
15
+ {
16
+ Schema::table('shorturl_urls', function (Blueprint $table) {
17
+ $table->integer('user_id')->nullable()->unsigned()->after('expires_at');
18
+ $table->foreign('user_id')->references('id')->on('users');
19
+ });
20
+ }
21
+}
0 commit comments