[Using CodeIgniter 4.3.4]
If you run spark migrate -g tests, it doesn't seem to work with the database group. I used a debugger to go through the process and the MigrationRunner is being constructed without a database instance, so it's loading the default db connection. Then when the latest() is called, it runs ensureTable without the group, so it's also using the default database connection.