Last change
on this file since d25ba66 was 0924b6c, checked in by Özkan İliyaz <iliyaz_96@…>, 4 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
1.3 KB
|
Line | |
---|
1 | <?php
|
---|
2 |
|
---|
3 | use Illuminate\Support\Facades\Schema;
|
---|
4 | use Illuminate\Database\Schema\Blueprint;
|
---|
5 | use Illuminate\Database\Migrations\Migration;
|
---|
6 |
|
---|
7 | class CreateUserProfiles extends Migration
|
---|
8 | {
|
---|
9 | /**
|
---|
10 | * Run the migrations.
|
---|
11 | *
|
---|
12 | * @return void
|
---|
13 | */
|
---|
14 | public function up()
|
---|
15 | {
|
---|
16 | Schema::create('user_profiles', function (Blueprint $table) {
|
---|
17 | $table->increments('id');
|
---|
18 | $table->integer('user_id')->unsigned();
|
---|
19 | $table->string('profile_link')->unique();
|
---|
20 | $table->string('short_bio')->nullable();
|
---|
21 | $table->string('profile_photo_link')->nullable();
|
---|
22 | $table->string('cover_photo_link')->nullable();
|
---|
23 | $table->string('technoblog_email')->unique();
|
---|
24 | $table->string('facebook_link')->nullable();
|
---|
25 | $table->string('instagram_link')->nullable();
|
---|
26 | $table->string('twitter_link')->nullable();
|
---|
27 | $table->string('youtube_link')->nullable();
|
---|
28 | $table->string('skype_link')->nullable();
|
---|
29 | $table->timestamps();
|
---|
30 |
|
---|
31 | $table->foreign('user_id')->references("id")->on("users")->onDelete("cascade")->onUpdate("cascade");
|
---|
32 | });
|
---|
33 | }
|
---|
34 |
|
---|
35 | /**
|
---|
36 | * Reverse the migrations.
|
---|
37 | *
|
---|
38 | * @return void
|
---|
39 | */
|
---|
40 | public function down()
|
---|
41 | {
|
---|
42 | Schema::dropIfExists('user_profiles');
|
---|
43 | }
|
---|
44 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.