Hi, this feature before was working well, now I made a trigger deployed to Dev tested and when all was working fine I tried to deploy this to Master but I have this error
Anyone knows whats going on? Thanks!!
Hi, this feature before was working well, now I made a trigger deployed to Dev tested and when all was working fine I tried to deploy this to Master but I have this error
Anyone knows whats going on? Thanks!!
Hello Gabriel!
You should try to use 8base environment set
command. This command selects and sets the current working environment.
Set the necessary environment and try again to generate migration.
Then run 8base migration commit -e Master
.
Lada Kokotova | Technical Support Engineer
Hi Lada! yes i tried that, and the same result, also when generating migration with dev as my target environment , thanks!!
I’ve investigated your problem. Seems like you’ve created environment variables in Master environment, after you tried to commit to this environment and the server find the changes in the environment and asked to perform the generate command. We will look at this and figure out if it’s correct. Seems like a bug.
What you should do to avoid:
8base migration generate -e Master
8base migration commit -e Master
Please let me know about the results.
Lada Kokotova | Technical Support Engineer
Sorry for the inconvenience. we will fix it in the future.
Performing 8base migration generate
command on dev branch created migration that creates environment variable. As far you’ve created the same environment variables on the Master and Dev environment the committing failed.
Migrations are just a set of files in your project folder with the name “migrations”. Also, the server registers migrations into the CiCdMigrations table to know what exactly migrations were committed. In turn, 8base migration generate
updates set of migrations for the environment and returns the full set of migrations to the client. So, feel free to modify or delete files from the local directory to commit exactly what you need. If you understand that you don’t need some migration at all just delete it from CiCdMigration table.
To avoid this error, just delete the migration data-create-EnvironmentVariables from the local folder and try one more time. But if you perform generate command this migration will appear in the folder again, to delete the migration permanently you need to delete it from the CiCdMigration table.
Ping me if something is unclear.
Lada Kokotova | Technical Support Engineer
the most easy way to resolve this was to delete my duplicate env in production the migrate and set again the env variable
Yep, this classic way works just perfectly as usual!
Anyway, I guess it’s cool to have a concept of logic underlying migrations, so feel free to manipulate with these files and CiCdMigrations table!
Lada Kokotova | Technical Support Engineer