phalcon / migrations

Generate or migrate database changes via migrations.
https://docs.phalcon.io/latest/en/db-migrations
BSD 3-Clause "New" or "Revised" License
28 stars 23 forks source link

[BUG] Cannot see existing migrations #110

Closed rusAnthrax closed 2 years ago

rusAnthrax commented 3 years ago

phalcon-migratgions v 2.1.6

bash-5.1# pwd
/var/www/html/app

bash-5.1# ../vendor/bin/phalcon-migrations list
Phalcon Migrations
  Info: Migrations were not found at /var/www/html/app/migrations  

bash-5.1# ls -lah ./migrations/
total 8K     
drwxrwxr-x    2 1001     1001        4.0K Apr 21 12:20 .
drwxr-xr-x   11 1001     1001        4.0K Apr 19 15:02 ..
-rw-rw-r--    1 1001     1001           0 Apr 19 15:02 .gitkeep

bash-5.1# ../vendor/bin/phalcon-migrations generate --table=test
Phalcon Migrations
  Success: Version 1.0.0 was successfully generated  

bash-5.1# ls -lah ./migrations/
total 12K    
drwxrwxr-x    3 1001     1001        4.0K Apr 21 14:10 .
drwxr-xr-x   11 1001     1001        4.0K Apr 19 15:02 ..
-rw-rw-r--    1 1001     1001           0 Apr 19 15:02 .gitkeep
drwxrwxr-x    2 root     root        4.0K Apr 21 14:10 1.0.0

bash-5.1# ls -lah ./migrations/1.0.0/
total 12K    
drwxrwxr-x    2 root     root        4.0K Apr 21 14:10 .
drwxrwxr-x    3 1001     1001        4.0K Apr 21 14:10 ..
-rw-rw-r--    1 root     root         676 Apr 21 14:10 test.php

bash-5.1# ../vendor/bin/phalcon-migrations list
Phalcon Migrations
  Info: Migrations were not found at /var/www/html/app/migrations  
Jeckerson commented 3 years ago

Hello. Try to use with configuration file - https://github.com/phalcon/migrations#create-configuration-file

vendor/bin/phalcon-migrations list --config=migrations.php

Jeckerson commented 2 years ago

Closing, feel free to reopen.

createthis commented 6 months ago

I wonder if this was related to https://github.com/phalcon/migrations/issues/144 because I had the same thing happen when I had migrationsTsBased => true set.