Skip to content
This repository was archived by the owner on Nov 19, 2024. It is now read-only.

Commit 0e94bfe

Browse files
authored
MAGECLOUD-2973 db table prefixes (#4511)
* MAGECLOUD-2973 db table prefixes * updates from technical review
1 parent aced8c2 commit 0e94bfe

File tree

5 files changed

+94
-5
lines changed

5 files changed

+94
-5
lines changed

guides/v2.1/cloud/env/variables-deploy.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,47 @@ stage:
103103
_merge: true
104104
```
105105

106+
Also, you can configure a table prefix.
107+
108+
{: .bs-callout .bs-callout-warning}
109+
If you do not use the merge option with the table prefix, you must provide default connection settings or the deploy fails validation.
110+
111+
The following example uses the `ece_` table prefix with default connection settings instead of using the `_merge` option:
112+
113+
```yaml
114+
stage:
115+
deploy:
116+
DATABASE_CONFIGURATION:
117+
connection:
118+
default:
119+
username: user
120+
host: host
121+
dbname: magento
122+
password: password
123+
table_prefix: 'ece_'
124+
```
125+
126+
Sample output:
127+
128+
```terminal
129+
MariaDB [main]> SHOW TABLES;
130+
+-------------------------------------+
131+
| Tables_in_main |
132+
+-------------------------------------+
133+
| ece_admin_passwords |
134+
| ece_admin_system_messages |
135+
| ece_admin_user |
136+
| ece_admin_user_session |
137+
| ece_adminnotification_inbox |
138+
| ece_amazon_customer |
139+
| ece_authorization_rule |
140+
| ece_cache |
141+
| ece_cache_tag |
142+
| ece_captcha_log |
143+
.....
144+
```
145+
{: .no-copy}
146+
106147
### `ENABLE_GOOGLE_ANALYTICS`
107148

108149
- **Default**—`false`

guides/v2.1/cloud/release-notes/cloud-tools.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@ The release notes include:
3434

3535
- {:.new}**Environment variable updates**
3636

37-
- {:.new}<!-- MAGECLOUD-3602-->Added the **FORCE_UPDATE_URLS** deploy variable to update Magento base URLs when deploying to Pro and Starter production and staging environments. See the definition in the [deploy variables]({{ page.baseurl }}/cloud/env/variables-deploy.html#force_update_urls) content.
37+
- {:.new}<!-- MAGECLOUD-3602-->Added the **FORCE_UPDATE_URLS** deploy variable to update Magento base URLs when deploying to Pro and Starter production and staging environments. See the definition in the [deploy variables]({{ page.baseurl }}/cloud/env/variables-deploy.html#force_update_urls) content.
38+
39+
- {:.new}<!-- MAGECLOUD-2901 -->Added support for database table prefixes using the [DATABASE_CONFIGURATION environment variable]({{page.baseurl}}/cloud/env/variables-deploy.html#database_configuration).
3840

3941
## v2002.0.18
4042

guides/v2.2/cloud/env/variables-deploy.md

Lines changed: 45 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,9 @@ By default, the deployment process overwrites all settings in the `env.php` file
9898

9999
#### To see a list of message queue consumers:
100100

101-
./bin/magento queue:consumers:list
102-
101+
```bash
102+
./bin/magento queue:consumers:list
103+
```
103104
### `CRYPT_KEY`
104105

105106
- **Default**—_Not set_
@@ -133,6 +134,48 @@ stage:
133134
_merge: true
134135
```
135136

137+
Also, you can configure a table prefix.
138+
139+
{: .bs-callout .bs-callout-warning}
140+
If you do not use the merge option with the table prefix, you must provide default connection settings or the deploy fails validation.
141+
142+
The following example uses the `ece_` table prefix with default connection settings instead of using the `_merge` option:
143+
144+
```yaml
145+
stage:
146+
deploy:
147+
DATABASE_CONFIGURATION:
148+
connection:
149+
default:
150+
username: user
151+
host: host
152+
dbname: magento
153+
password: password
154+
table_prefix: 'ece_'
155+
```
156+
157+
Sample output:
158+
159+
```terminal
160+
MariaDB [main]> SHOW TABLES;
161+
+-------------------------------------+
162+
| Tables_in_main |
163+
+-------------------------------------+
164+
| ece_admin_passwords |
165+
| ece_admin_system_messages |
166+
| ece_admin_user |
167+
| ece_admin_user_session |
168+
| ece_adminnotification_inbox |
169+
| ece_amazon_customer |
170+
| ece_authorization_rule |
171+
| ece_cache |
172+
| ece_cache_tag |
173+
| ece_captcha_log |
174+
.....
175+
```
176+
{: .no-copy}
177+
178+
136179
### `ELASTICSUITE_CONFIGURATION`
137180

138181
- **Default**—_Not set_

guides/v2.2/cloud/release-notes/cloud-tools.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@ The release notes include:
3434

3535
- {:.new}**Environment variable updates**
3636

37-
- {:.new}<!-- MAGECLOUD-3602-->Added the **FORCE_UPDATE_URLS** deploy variable to update Magento base URLs when deploying to Pro and Starter production and staging environments. See the definition in the [deploy variables]({{ page.baseurl }}/cloud/env/variables-deploy.html#force_update_urls) content.
37+
- {:.new}<!-- MAGECLOUD-3602-->Added the **FORCE_UPDATE_URLS** deploy variable to update Magento base URLs when deploying to Pro and Starter production and staging environments. See the definition in the [deploy variables]({{ page.baseurl }}/cloud/env/variables-deploy.html#force_update_urls) content.
38+
39+
- {:.new}<!-- MAGECLOUD-2901 -->Added support for database table prefixes using the [DATABASE_CONFIGURATION environment variable]({{page.baseurl}}/cloud/env/variables-deploy.html#database_configuration).
3840

3941
## v2002.0.18
4042

guides/v2.3/cloud/release-notes/cloud-tools.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,9 @@ The release notes include:
3434

3535
- {:.new}**Environment variable updates**
3636

37-
- {:.new}<!-- MAGECLOUD-3026-->Added the **FORCE_UPDATE_URLS** deploy variable to update Magento base URLs when deploying to Pro and Starter production and staging environments. See the definition in the [deploy variables]({{ page.baseurl }}/cloud/env/variables-deploy.html#force_update_urls) content.
37+
- {:.new}<!-- MAGECLOUD-3602-->Added the **FORCE_UPDATE_URLS** deploy variable to update Magento base URLs when deploying to Pro and Starter production and staging environments. See the definition in the [deploy variables]({{ page.baseurl }}/cloud/env/variables-deploy.html#force_update_urls) content.
3838

39+
- {:.new}<!-- MAGECLOUD-2901 -->Added support for database table prefixes using the [DATABASE_CONFIGURATION environment variable]({{page.baseurl}}/cloud/env/variables-deploy.html#database_configuration).
3940

4041
## v2002.0.18
4142

0 commit comments

Comments
 (0)