File tree 2 files changed +31
-4
lines changed
2 files changed +31
-4
lines changed Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ declare (strict_types=1 );
4
+
5
+ use Illuminate \Database \Migrations \Migration ;
6
+ use Illuminate \Database \Schema \Blueprint ;
7
+ use Illuminate \Support \Facades \Schema ;
8
+
9
+ return new class () extends Migration {
10
+ public function up (): void
11
+ {
12
+ Schema::create ('users ' , function (Blueprint $ table ): void {
13
+ $ table ->id ();
14
+ $ table ->string ('name ' );
15
+ $ table ->string ('email ' )->unique ();
16
+ $ table ->timestamp ('email_verified_at ' )->nullable ();
17
+ $ table ->string ('password ' );
18
+ $ table ->rememberToken ();
19
+ $ table ->timestamps ();
20
+ });
21
+ }
22
+
23
+ public function down (): void
24
+ {
25
+ Schema::dropIfExists ('users ' );
26
+ }
27
+ };
Original file line number Diff line number Diff line change 6
6
7
7
use Illuminate \Foundation \Testing \LazilyRefreshDatabase ;
8
8
use Laravelcm \Subscriptions \SubscriptionServiceProvider ;
9
- use Orchestra \Testbench \Concerns \WithWorkbench ;
10
9
use Orchestra \Testbench \TestCase as BaseTestCase ;
11
10
use Tests \Models \User ;
12
11
13
12
abstract class TestCase extends BaseTestCase
14
13
{
15
14
use LazilyRefreshDatabase;
16
- use WithWorkbench;
17
15
18
16
protected function getPackageProviders ($ app ): array
19
17
{
@@ -24,8 +22,10 @@ protected function getPackageProviders($app): array
24
22
25
23
protected function defineDatabaseMigrations (): void
26
24
{
27
- $ this ->loadLaravelMigrations ();
28
- $ this ->loadMigrationsFrom (__DIR__ .'/../../database/migrations ' );
25
+ $ this ->loadMigrationsFrom ([
26
+ __DIR__ .'/../database/migrations ' ,
27
+ __DIR__ .'/../../database/migrations ' ,
28
+ ]);
29
29
}
30
30
31
31
protected function getEnvironmentSetUp ($ app ): void
You can’t perform that action at this time.
0 commit comments