File tree Expand file tree Collapse file tree 1 file changed +44
-0
lines changed Expand file tree Collapse file tree 1 file changed +44
-0
lines changed Original file line number Diff line number Diff line change
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
+ }
You can’t perform that action at this time.
0 commit comments