Skip to content

Commit 09bfa80

Browse files
committed
add users migration
1 parent a394ea7 commit 09bfa80

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
<?php
2+
3+
use Illuminate\Support\Facades\Schema;
4+
use Illuminate\Database\Schema\Blueprint;
5+
use Illuminate\Database\Migrations\Migration;
6+
7+
class CreateUsersTable extends Migration
8+
{
9+
/**
10+
* Run the migrations.
11+
*
12+
* @return void
13+
*/
14+
public function up()
15+
{
16+
Schema::create('users', function (Blueprint $table) {
17+
18+
$table->increments('id');
19+
$table->string('first_name',128);
20+
$table->string('last_name', 128);
21+
$table->char('mobile', 16);
22+
$table->char('email', 128)->nullable();
23+
24+
$table->string('password', 64);
25+
$table->boolean('disabled')->default(false);
26+
$table->integer('created_at')->unsigned();
27+
$table->integer('updated_at')->unsigned()->nullable();
28+
29+
$table->unique('email');
30+
$table->unique('mobile');
31+
32+
});
33+
}
34+
35+
/**
36+
* Reverse the migrations.
37+
*
38+
* @return void
39+
*/
40+
public function down()
41+
{
42+
Schema::dropIfExists('users');
43+
}
44+
}

0 commit comments

Comments
 (0)