Skip to content
This repository was archived by the owner on Mar 13, 2023. It is now read-only.

Commit 95b63f7

Browse files
committed
Create migration to add columns to users table
1 parent 6a9a4a1 commit 95b63f7

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
<?php
2+
3+
use Illuminate\Support\Facades\Schema;
4+
use Illuminate\Database\Schema\Blueprint;
5+
use Illuminate\Database\Migrations\Migration;
6+
7+
class AddColumnsToUsers extends Migration
8+
{
9+
/**
10+
* Run the migrations.
11+
*
12+
* @return void
13+
*/
14+
public function up()
15+
{
16+
Schema::table('users', function (Blueprint $table) {
17+
$table->string('phone_number')->nullable();
18+
$table->string('twitter_profile')->nullable();
19+
$table->string('github_profile')->nullable();
20+
$table->string('facebook_id')->nullable();
21+
$table->string('github_id')->nullable();
22+
$table->string('google_id')->nullable();
23+
});
24+
}
25+
26+
/**
27+
* Reverse the migrations.
28+
*
29+
* @return void
30+
*/
31+
public function down()
32+
{
33+
Schema::table('users', function (Blueprint $table) {
34+
$table->dropColumn(['phone_number', 'twitter_profile', 'github_profile', 'facebook_id', 'github_id', 'google_id']);
35+
});
36+
}
37+
}

0 commit comments

Comments
 (0)