From 402dd8b1211b83374ffa3be3d97d3d495154aa59 Mon Sep 17 00:00:00 2001 From: Heather Guthrie Date: Mon, 13 May 2019 16:36:54 -0500 Subject: [PATCH 1/2] MAGECLOUD-2973 db table prefixes --- guides/v2.1/cloud/env/variables-deploy.md | 10 ++++++++++ guides/v2.1/cloud/release-notes/cloud-tools.md | 1 + guides/v2.2/cloud/env/variables-deploy.md | 10 ++++++++++ guides/v2.2/cloud/release-notes/cloud-tools.md | 2 +- guides/v2.3/cloud/release-notes/cloud-tools.md | 1 + 5 files changed, 23 insertions(+), 1 deletion(-) diff --git a/guides/v2.1/cloud/env/variables-deploy.md b/guides/v2.1/cloud/env/variables-deploy.md index a6dae8625d8..559fee45635 100644 --- a/guides/v2.1/cloud/env/variables-deploy.md +++ b/guides/v2.1/cloud/env/variables-deploy.md @@ -91,6 +91,16 @@ stage: some_config: 'some_value' ``` +You can configure table prefixes; the following example uses the prefix `ece_`: + +```yaml +stage: + deploy: + DATABASE_CONFIGURATION: + some_config: 'some_value' + table_prefix: 'ece_' +``` + {% include cloud/merge-configuration.md %} The following example merges new values to an existing configuration: diff --git a/guides/v2.1/cloud/release-notes/cloud-tools.md b/guides/v2.1/cloud/release-notes/cloud-tools.md index 947f15608f0..7ce5fcba642 100644 --- a/guides/v2.1/cloud/release-notes/cloud-tools.md +++ b/guides/v2.1/cloud/release-notes/cloud-tools.md @@ -32,6 +32,7 @@ The release notes include: ## v2002.0.19 +- {:.new}Added support for database table prefixes using the [DATABASE_CONFIGURATION environment variable]({{page.baseurl}}/cloud/env/variables-deploy.html#database_configuration). ## v2002.0.18 diff --git a/guides/v2.2/cloud/env/variables-deploy.md b/guides/v2.2/cloud/env/variables-deploy.md index e67c680214c..a19b6b6d23a 100644 --- a/guides/v2.2/cloud/env/variables-deploy.md +++ b/guides/v2.2/cloud/env/variables-deploy.md @@ -121,6 +121,16 @@ stage: some_config: 'some_value' ``` +You can configure table prefixes; the following example uses the prefix `ece_`: + +```yaml +stage: + deploy: + DATABASE_CONFIGURATION: + some_config: 'some_value' + table_prefix: 'ece_' +``` + {% include cloud/merge-configuration.md %} The following example merges new values to an existing configuration: diff --git a/guides/v2.2/cloud/release-notes/cloud-tools.md b/guides/v2.2/cloud/release-notes/cloud-tools.md index 5553abfc88c..789fbc4fead 100644 --- a/guides/v2.2/cloud/release-notes/cloud-tools.md +++ b/guides/v2.2/cloud/release-notes/cloud-tools.md @@ -32,7 +32,7 @@ The release notes include: ## v2002.0.19 - +- {:.new}Added support for database table prefixes using the [DATABASE_CONFIGURATION environment variable]({{page.baseurl}}/cloud/env/variables-deploy.html#database_configuration). ## v2002.0.18 diff --git a/guides/v2.3/cloud/release-notes/cloud-tools.md b/guides/v2.3/cloud/release-notes/cloud-tools.md index de7af58fb06..750866279ee 100644 --- a/guides/v2.3/cloud/release-notes/cloud-tools.md +++ b/guides/v2.3/cloud/release-notes/cloud-tools.md @@ -32,6 +32,7 @@ The release notes include: ## v2002.0.19 +- {:.new}Added support for database table prefixes using the [DATABASE_CONFIGURATION environment variable]({{page.baseurl}}/cloud/env/variables-deploy.html#database_configuration). ## v2002.0.18 From fe0632961071dd916985964fe949071b5bd3c84e Mon Sep 17 00:00:00 2001 From: Heather Guthrie Date: Tue, 14 May 2019 14:25:18 -0500 Subject: [PATCH 2/2] updates from technical review --- guides/v2.1/cloud/env/variables-deploy.md | 45 ++++++++++++++++---- guides/v2.2/cloud/env/variables-deploy.md | 51 +++++++++++++++++++---- 2 files changed, 80 insertions(+), 16 deletions(-) diff --git a/guides/v2.1/cloud/env/variables-deploy.md b/guides/v2.1/cloud/env/variables-deploy.md index 559fee45635..32b640d649d 100644 --- a/guides/v2.1/cloud/env/variables-deploy.md +++ b/guides/v2.1/cloud/env/variables-deploy.md @@ -91,27 +91,58 @@ stage: some_config: 'some_value' ``` -You can configure table prefixes; the following example uses the prefix `ece_`: +{% include cloud/merge-configuration.md %} + +The following example merges new values to an existing configuration: ```yaml stage: deploy: DATABASE_CONFIGURATION: - some_config: 'some_value' - table_prefix: 'ece_' + some_config: 'some_new_value' + _merge: true ``` -{% include cloud/merge-configuration.md %} +Also, you can configure a table prefix. -The following example merges new values to an existing configuration: +{: .bs-callout .bs-callout-warning} +If you do not use the merge option with the table prefix, you must provide default connection settings or the deploy fails validation. + +The following example uses the `ece_` table prefix with default connection settings instead of using the `_merge` option: ```yaml stage: deploy: DATABASE_CONFIGURATION: - some_config: 'some_new_value' - _merge: true + connection: + default: + username: user + host: host + dbname: magento + password: password + table_prefix: 'ece_' +``` + +Sample output: + +```terminal +MariaDB [main]> SHOW TABLES; ++-------------------------------------+ +| Tables_in_main | ++-------------------------------------+ +| ece_admin_passwords | +| ece_admin_system_messages | +| ece_admin_user | +| ece_admin_user_session | +| ece_adminnotification_inbox | +| ece_amazon_customer | +| ece_authorization_rule | +| ece_cache | +| ece_cache_tag | +| ece_captcha_log | +..... ``` +{: .no-copy} ### `ENABLE_GOOGLE_ANALYTICS` diff --git a/guides/v2.2/cloud/env/variables-deploy.md b/guides/v2.2/cloud/env/variables-deploy.md index a19b6b6d23a..b1f692e5cca 100644 --- a/guides/v2.2/cloud/env/variables-deploy.md +++ b/guides/v2.2/cloud/env/variables-deploy.md @@ -98,8 +98,9 @@ By default, the deployment process overwrites all settings in the `env.php` file #### To see a list of message queue consumers: - ./bin/magento queue:consumers:list - +```bash +./bin/magento queue:consumers:list +``` ### `CRYPT_KEY` - **Default**—_Not set_ @@ -121,28 +122,60 @@ stage: some_config: 'some_value' ``` -You can configure table prefixes; the following example uses the prefix `ece_`: +{% include cloud/merge-configuration.md %} + +The following example merges new values to an existing configuration: ```yaml stage: deploy: DATABASE_CONFIGURATION: - some_config: 'some_value' - table_prefix: 'ece_' + some_config: 'some_new_value' + _merge: true ``` -{% include cloud/merge-configuration.md %} +Also, you can configure a table prefix. -The following example merges new values to an existing configuration: +{: .bs-callout .bs-callout-warning} +If you do not use the merge option with the table prefix, you must provide default connection settings or the deploy fails validation. + +The following example uses the `ece_` table prefix with default connection settings instead of using the `_merge` option: ```yaml stage: deploy: DATABASE_CONFIGURATION: - some_config: 'some_new_value' - _merge: true + connection: + default: + username: user + host: host + dbname: magento + password: password + table_prefix: 'ece_' ``` +Sample output: + +```terminal +MariaDB [main]> SHOW TABLES; ++-------------------------------------+ +| Tables_in_main | ++-------------------------------------+ +| ece_admin_passwords | +| ece_admin_system_messages | +| ece_admin_user | +| ece_admin_user_session | +| ece_adminnotification_inbox | +| ece_amazon_customer | +| ece_authorization_rule | +| ece_cache | +| ece_cache_tag | +| ece_captcha_log | +..... +``` +{: .no-copy} + + ### `ELASTICSUITE_CONFIGURATION` - **Default**—_Not set_