...
There are three different paths to accomplishing this:
...
1. No manual changes - fix issues like
...
all other changes
This is applicable when you have the sufficient time window to root cause the issue, script it, commit into SCM, package and deploy into your pipeline just like normal changes
...
/ This means you will always leverage your automation framework.
2. Use a "hotfix"
...
process to package changes and deploy directly to STAGE and PROD.
This
...
allows you to bypass deploying into your DEV and QA environments
...
and hotfix changesets can be deployed directly to STAGE and PROD. You will be responsible for eventually deploying your hotfix changes back into DEV and QA environments
...
, typically performed after hotfix changes have released to PROD.
3. An emergency fix is
...
necessary
You only have a small time window to fix the PROD database. In this case, you will root cause your issues, test your fix in STAGE and once validated, deploy to PROD.
Start by capturing the manual change made in PROD hotfix in a SQL script. Commit the script into sql_code SCM repository so that it can be packaged, converted into a changeset and deployed (i.e., backfilled) into all other environments. Since PROD environment already contains the change, there is no need to deploy the changeset there. Instead, you will use Datical's "Change Log Sync" feature to mark the hotfix changeset as EXECUTED in PROD environment. This will create an entry in PROD's tracking table (DATABASECHANGELOG) which allows Datical to become and the audit database. This results in Datical becoming aware that the change from this hotfix changeset already exists in PROD.
Step-by-step guide
Performing a Change Log Sync can only be done using Datical GUI. As such, it should be noted that this would be a manual task and could impact release automation platform if not done correctly. Therefore, this path should be taken very rarely and with great caution.
Info |
---|
You will need to make sure that your Datical project is connected to your SCM and that you are working on the latest version of your project. |
...
For the purpose of the document, we will assume that the Datical project has the following pipeline (see table below). The hotfix is captured in the script called "hotfix_aug.sql
". Changes from this script have been manually executed in STAGE and PROD environments. We now need to package this script so that it can be deployed to REF1, DEV and QA environments.
REF1 | DEV | QA | STAGE | PROD | |||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
hotfix_aug.sql |
|
|
|
|
|
- Instruct Datical to abandon the script "
temp_table.sql
". This will require adding the label "abandoned" to all changesets that generate from this script. You can perform this task in automation, however, the user will need to provide the script name as a parameter. In your automation system (Jenkins, Bamboo, UrbanCode Build, etc.), create a new job which will perform following operations:
Related articles
Filter by label (Content by label) | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
...
Page Properties | ||
---|---|---|
| ||
|