1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
declare(strict_types=1); |
4
|
|
|
|
5
|
|
|
use Illuminate\Support\Facades\Schema; |
6
|
|
|
use Illuminate\Database\Schema\Blueprint; |
7
|
|
|
use Illuminate\Database\Migrations\Migration; |
8
|
|
|
|
9
|
|
|
class CreateMembersTable extends Migration |
|
|
|
|
10
|
|
|
{ |
11
|
|
|
/** |
12
|
|
|
* Run the migrations. |
13
|
|
|
* |
14
|
|
|
* @return void |
15
|
|
|
*/ |
16
|
|
|
public function up(): void |
17
|
|
|
{ |
18
|
|
|
Schema::create(config('cortex.auth.tables.members'), function (Blueprint $table) { |
19
|
|
|
// Columns |
20
|
|
|
$table->increments('id'); |
21
|
|
|
$table->string('given_name'); |
22
|
|
|
$table->string('family_name')->nullable(); |
23
|
|
|
$table->string('email'); |
24
|
|
|
$table->string('username'); |
25
|
|
|
$table->string('password'); |
26
|
|
|
$table->rememberToken(); |
27
|
|
|
$table->boolean('email_verified')->default(false); |
28
|
|
|
$table->timestamp('email_verified_at')->nullable(); |
29
|
|
|
$table->string('phone')->nullable(); |
30
|
|
|
$table->boolean('phone_verified')->default(false); |
31
|
|
|
$table->timestamp('phone_verified_at')->nullable(); |
32
|
|
|
$table->string('title')->nullable(); |
33
|
|
|
$table->string('organization')->nullable(); |
34
|
|
|
$table->string('country_code', 2)->nullable(); |
35
|
|
|
$table->string('language_code', 2)->nullable(); |
36
|
|
|
$table->text('two_factor')->nullable(); |
37
|
|
|
$table->date('birthday')->nullable(); |
38
|
|
|
$table->string('gender')->nullable(); |
39
|
|
|
$table->schemalessAttributes('social'); |
40
|
|
|
$table->boolean('is_active')->default(true); |
41
|
|
|
$table->timestamp('last_activity')->nullable(); |
42
|
|
|
$table->auditableAndTimestamps(); |
|
|
|
|
43
|
|
|
$table->softDeletes(); |
44
|
|
|
}); |
45
|
|
|
} |
46
|
|
|
|
47
|
|
|
/** |
48
|
|
|
* Reverse the migrations. |
49
|
|
|
* |
50
|
|
|
* @return void |
51
|
|
|
*/ |
52
|
|
|
public function down(): void |
53
|
|
|
{ |
54
|
|
|
Schema::dropIfExists(config('cortex.auth.tables.members')); |
55
|
|
|
} |
56
|
|
|
} |
57
|
|
|
|
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.