What are the steps to reproduce this issue?
- Create a new ColdBox app with migrations support:
coldbox create app myApp --migrations
- Configure your database connection in the generated
.env file (set DB_HOST, DB_PORT, DB_DATABASE, DB_USER, DB_PASSWORD)
- Run
migrate install from the CommandBox shell
What happens?
The command reports the migration table as already installed without actually creating it:
> migrate install
Created seeds directory
Migration table already installed.
Running migrate uninstall confirms the table was never created:
> migrate uninstall
Uninstalling cfmigrations will also run all your migrations down. Are you sure you want to continue? [y/n] : y
ERROR (6.3.2+00858)
Table 'coldbox.cfmigrations' doesn't exist
What were you expecting to happen?
migrate install should create the cfmigrations table in the database and report:
Migration table installed!
Any logs, error output, etc?
ERROR (6.3.2+00858)
Table 'coldbox.cfmigrations' doesn't exist
Note: If you also encounter Invalid Syntax Closing [}] not found during migrate install, the ${DB_PORT} value in the generated .cfmigrations.json needs to be quoted as "${DB_PORT}" so the JSON is valid. This is a related open issue: commandbox-modules/commandbox-migrations#48
Any other comments?
The fix is to add DB_SCHEMA=<schema_name> to the .env.example template.
After manually adding DB_SCHEMA=coldbox to .env, the install command works correctly:
> migrate install
Migration table installed!
What versions are you using?
Operating System: Windows 11 Pro 25H2
Package Version: 8.12.0+30
What are the steps to reproduce this issue?
coldbox create app myApp --migrations.envfile (setDB_HOST,DB_PORT,DB_DATABASE,DB_USER,DB_PASSWORD)migrate installfrom the CommandBox shellWhat happens?
The command reports the migration table as already installed without actually creating it:
> migrate install Created seeds directory Migration table already installed.Running
migrate uninstallconfirms the table was never created:What were you expecting to happen?
migrate installshould create thecfmigrationstable in the database and report:Any logs, error output, etc?
Note: If you also encounter
Invalid Syntax Closing [}] not foundduringmigrate install, the${DB_PORT}value in the generated.cfmigrations.jsonneeds to be quoted as"${DB_PORT}"so the JSON is valid. This is a related open issue: commandbox-modules/commandbox-migrations#48Any other comments?
The fix is to add
DB_SCHEMA=<schema_name>to the .env.example template.After manually adding
DB_SCHEMA=coldboxto.env, the install command works correctly:What versions are you using?
Operating System: Windows 11 Pro 25H2
Package Version: 8.12.0+30