Welcome Guest, Not a member yet? Register   Sign In
phpunit : gap in the migration sequence
#1

(This post was last modified: 01-20-2025, 10:20 AM by nico.)

Hello everyone,
I started using migration, I did not use it before. After one migration, my tests with phpunit do not run anyway. This is the message :
Quote:RuntimeException: There is a gap in the migration sequence near version number:  2025-01-14-080346

I just create and run 1 migration but I deleted a file where the up and down functions were empty (I wanted to test the functions and options migrate).

A "migrate refresh" does same error.

Any idea to repair migration process ?

In advance, I thank you.

edit:
I recreate an empty file, ajust table "migrations" via sql (not sure this is the most save method). Tests run OK, but if I run "php spark migrate:refresh", I get :
Quote:There is a gap in the migration sequence near version number: 2020-02-22-222222

(due to an example file tests/_support/Database/Migrations/2020-02-22-2222222_example_migration.php)

Any idea to solve it. I want to have a proper config. In advance, I thank you.
Reply
#2

because there is a row in your migrations table in your database, that has been deleted, u might just delete the migration file in APPPATH, check in your database migrations table
Reply




Theme © iAndrew 2016 - Forum software by © MyBB