Skip to content
This repository was archived by the owner on Oct 8, 2024. It is now read-only.

Commit 3495f72

Browse files
committed
🐛 fixed schema inconsistencies
1 parent e42147e commit 3495f72

3 files changed

Lines changed: 15 additions & 16 deletions

File tree

app/database/factories/UserFactory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class UserFactory extends Factory
1212

1313
// You define your factory blueprint here
1414
// It should return an associative array
15-
public function definition()
15+
public function definition(): array
1616
{
1717
return [
1818
'id' => $this->faker->unique()->numberBetween(0, 200),

app/database/migrations/2019_11_18_133625_create_users.php

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,21 @@ class CreateUsers extends Database {
1111
* @return void
1212
*/
1313
public function up() {
14-
if (!static::$capsule::schema()->hasTable("users")):
15-
static::$capsule::schema()->create("users", function (Blueprint $table) {
16-
$table->increments('id');
17-
$table->string('username');
18-
$table->string('fullname');
19-
$table->string('email')->unique();
20-
$table->timestamp('email_verified_at')->nullable();
21-
$table->string('password');
22-
$table->rememberToken();
23-
$table->timestamps();
24-
});
25-
endif;
14+
// if (!static::$capsule::schema()->hasTable("users")):
15+
// static::$capsule::schema()->create("users", function (Blueprint $table) {
16+
// $table->increments('id');
17+
// $table->string('username');
18+
// $table->string('fullname');
19+
// $table->string('email')->unique();
20+
// $table->timestamp('email_verified_at')->nullable();
21+
// $table->string('password');
22+
// $table->rememberToken();
23+
// $table->timestamps();
24+
// });
25+
// endif;
2626

2727
// you can now build your migrations with schemas [EXPERIMENTAL]
28-
// Schema::build(static::$capsule, dirname(__DIR__) . "/Schema/users.json");
28+
Schema::build(static::$capsule, dirname(__DIR__) . "/Schema/users.json");
2929
}
3030

3131
/**

app/database/schema/users.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22
"id": 1,
33
"username?": "mychi.darko",
44
"fullname": "Mychi Darko",
5-
"email?": "mickdd22@gmail.com",
6-
"phone": "233504766732",
5+
"email": "mickdd22@gmail.com",
76
"email_verified_at?": "2021-07-23T16:18:35.947712157Z",
87
"password": "poekojdenwjwiojweojojweoijoewoj",
98
"remember_token?": "deiwoj",

0 commit comments

Comments
 (0)