File tree Expand file tree Collapse file tree 4 files changed +10
-180
lines changed
src/Bridge/Laravel/Console/Commands/ORM
tests/src/Bridge/Laravel/Console/Commands/ORM Expand file tree Collapse file tree 4 files changed +10
-180
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 77use Cycle \Migrations \State ;
88use Cycle \Schema \Compiler as CycleSchemaCompiler ;
99use Cycle \Schema \Generator \Migrations \GenerateMigrations ;
10+ use Cycle \Schema \Generator \PrintChanges ;
1011use Cycle \Schema \Registry ;
1112use Symfony \Component \Console \Command \Command ;
1213use WayOfDev \Cycle \Bridge \Laravel \Console \Commands \Migrations \AbstractCommand ;
1314use WayOfDev \Cycle \Bridge \Laravel \Console \Commands \Migrations \MigrateCommand as DatabaseMigrateCommand ;
14- use WayOfDev \Cycle \Bridge \Laravel \Console \Commands \ORM \Generators \ShowChanges ;
1515use WayOfDev \Cycle \Contracts \CacheManager as CacheManagerContract ;
1616use WayOfDev \Cycle \Contracts \GeneratorLoader ;
1717use WayOfDev \Cycle \Schema \Compiler ;
@@ -40,13 +40,13 @@ public function handle(
4040
4141 foreach ($ this ->migrator ->getMigrations () as $ migration ) {
4242 if ($ migration ->getState ()->getStatus () !== State::STATUS_EXECUTED ) {
43- $ this ->warn ('Outstanding migrations found, run `cycle:orm: migrate` first! ' );
43+ $ this ->warn ('Outstanding migrations found, run `cycle:migrate` first! ' );
4444
4545 return self ::FAILURE ;
4646 }
4747 }
4848
49- $ diff = new ShowChanges ($ this ->output );
49+ $ diff = new PrintChanges ($ this ->output );
5050 $ queue = $ generators ->add (GeneratorLoader::GROUP_RENDER , $ diff );
5151
5252 $ schemaCompiler = Compiler::compile ($ registry , $ queue );
Original file line number Diff line number Diff line change 44
55namespace WayOfDev \Cycle \Bridge \Laravel \Console \Commands \ORM ;
66
7+ use Cycle \Schema \Generator \PrintChanges ;
78use Cycle \Schema \Generator \SyncTables ;
89use Cycle \Schema \Registry ;
910use Illuminate \Console \Command ;
10- use WayOfDev \Cycle \Bridge \Laravel \Console \Commands \ORM \Generators \ShowChanges ;
1111use WayOfDev \Cycle \Contracts \CacheManager as CacheManagerContract ;
1212use WayOfDev \Cycle \Contracts \GeneratorLoader ;
1313use WayOfDev \Cycle \Schema \Compiler ;
@@ -28,7 +28,7 @@ public function handle(
2828 Registry $ registry ,
2929 CacheManagerContract $ cache
3030 ): int {
31- $ diff = new ShowChanges ($ this ->output );
31+ $ diff = new PrintChanges ($ this ->output );
3232 $ queue = $ generators
3333 ->add (GeneratorLoader::GROUP_RENDER , $ diff )
3434 ->add (GeneratorLoader::GROUP_POSTPROCESS , new SyncTables ());
Original file line number Diff line number Diff line change @@ -14,11 +14,11 @@ class MigrateCommandTest extends TestCase
1414 public const USER_MIGRATION = [
1515 'default.users ' ,
1616 'create table ' ,
17- 'add column id ' ,
18- 'add column user_id ' ,
19- 'add column name ' ,
17+ 'add column [id] ' ,
18+ 'add column [ user_id] ' ,
19+ 'add column [ name] ' ,
2020 'add index on [user_id] ' ,
21- 'add foreign key on user_id ' ,
21+ 'add foreign key on [ user_id] ' ,
2222 ];
2323
2424 protected function setUp (): void
@@ -84,7 +84,7 @@ class Tag
8484 $ this ->assertConsoleCommandOutputContainsStrings ('cycle:orm:migrate ' , ['-r ' => true ], [
8585 'default.tags ' ,
8686 'create table ' ,
87- 'add column id ' ,
87+ 'add column [id] ' ,
8888 ]);
8989
9090 File::delete ($ entity );
You can’t perform that action at this time.
0 commit comments