We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Migrations doesn't work

Im having trouble with the dev-tools. Both generating and running migrations is causing touble. My latest problem is the following. Am I doing anything wrong, or is it just the dev-tools that are poor? According to https://github.com/phalcon/phalcon-devtools/blob/58e6b6582b8ae351e57078efe1182b85e99f0802/scripts/Phalcon/Migrations.php#L356 the message i get should be showed if im rolling back - which I cannot see why it would think. Are the Phalcon migration-files possible to run without using the dev-tools?

PHP 7.0.9, Ubuntu 14, Phalcon 3.0.0, Phalcon Dev-tools 3.0.0

.phalcon/migration-version

1.0.0
1.0.1
1.0.2
1.0.3
1.0.4
1.0.5

Having made a 1.0.6 version in my app/migrations dir Both phalcon migration run and phalcon migration run --version=1.0.6 results in

Phalcon DevTools (3.0.0)

  Info: Version 1.0.6 was already rolled back  

.phalcon/migration-version must contain only last version. In your case it's 1.0.5



508

I am running 3.0.1 (also Phalcon 3.0.1) and still the same issue.

Phalcon DevTools (3.0.1)

Info: Version 1.0.7 was already rolled back

If I remove 1.0.0 and up and leave only 1.0.5 it tried to re run all the migrations.

I had the same result as Jon. A single lnie in the migration-version isn't a solution.