33namespace Tests \Concerns ;
44
55use DragonCode \MigrateDB \Constants \Drivers ;
6+ use Illuminate \Database \Schema \Builder as SchemaBuilder ;
67use Illuminate \Support \Facades \Config ;
78use Tests \Configurations \BaseConfiguration ;
89use Tests \Configurations \Manager ;
@@ -16,27 +17,27 @@ trait Database
1617 use HasUuidAndUlid;
1718 use Seeders;
1819
19- protected $ connectors = [
20+ protected array $ connectors = [
2021 Drivers::MYSQL => MySqlConnection::class,
2122 Drivers::POSTGRES => PostgresConnection::class,
2223 Drivers::SQL_SERVER => SqlServerConnection::class,
2324 ];
2425
25- protected $ table_foo = 'foo ' ;
26+ protected string $ table_foo = 'foo ' ;
2627
27- protected $ table_bar = 'bar ' ;
28+ protected string $ table_bar = 'bar ' ;
2829
29- protected $ table_baz = 'baz ' ;
30+ protected string $ table_baz = 'baz ' ;
3031
31- protected $ table_ulid = 'ulid_table ' ;
32+ protected string $ table_ulid = 'ulid_table ' ;
3233
33- protected $ table_uuid = 'uuid_table ' ;
34+ protected string $ table_uuid = 'uuid_table ' ;
3435
35- protected $ choice_target = 'target ' ;
36+ protected string $ choice_target = 'target ' ;
3637
37- protected $ choice_source = 'source ' ;
38+ protected string $ choice_source = 'source ' ;
3839
39- protected $ choices = [
40+ protected array $ choices = [
4041 'target ' ,
4142 'source ' ,
4243 'none ' ,
@@ -97,4 +98,11 @@ protected function runMigrations(): void
9798 {
9899 $ this ->artisan ('migrate ' , ['--database ' => $ this ->source_connection ])->run ();
99100 }
101+
102+ protected function getTables (SchemaBuilder $ builder ): array
103+ {
104+ return method_exists ($ builder , 'getAllTables ' )
105+ ? $ builder ->getAllTables ()
106+ : $ builder ->getTables ();
107+ }
100108}
0 commit comments