-
-
Notifications
You must be signed in to change notification settings - Fork 394
/
2020_01_30_000000_create_users_table.php
59 lines (53 loc) · 1.83 KB
/
2020_01_30_000000_create_users_table.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<?php
declare(strict_types=1);
namespace Database\Migrations;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateUsersTable extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('users', static function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('name');
$table->string('email')->unique();
$table->timestamp('email_verified_at')->nullable();
$table->string('password');
$table->string('stringButInt');
$table->float('floatButRoundedDecimalString');
$table->json('allowed_ips');
$table->json('meta');
$table->json('options');
$table->json('properties');
$table->json('favorites');
$table->string('secret');
$table->boolean('blocked');
$table->unknownColumnType('unknown_column');
$table->rememberToken();
// Testing property casts
$table->integer('int');
$table->integer('integer');
$table->float('real');
$table->float('float');
$table->double('double');
$table->decimal('decimal');
$table->string('string');
$table->boolean('bool');
$table->boolean('boolean');
$table->json('object');
$table->json('array');
$table->json('json');
$table->json('collection');
$table->date('date');
$table->dateTime('datetime');
$table->date('immutable_date');
$table->dateTime('immutable_datetime');
$table->timestamp('timestamp');
$table->timestamps();
$table->softDeletes();
});
}
}