Database Creation
MySQL
In the command prompt, open MySQL:
mysql -u root -pIn MySQL, enter the following command to create a database:
create database COMMERCEDB character set utf8;COMMERCEDBis the default schema name used by Self-Managed Commerce.Enter the following command to create a user that has complete access to
COMMERCEDB:grant all privileges on COMMERCEDB.* to ep@'localhost' identified by 'ep';ep/epis the default username/password combination used by Self-Managed Commerce.
Table Name Case Sensitivity
On Unix systems, table names in SQL (Structured Query Language) queries may be case sensitive.
To turn off case sensitivity, add the line lower_case_table_names under the section [mysqld] in the /etc/mysql/my.cnf file.
Setting Transaction Isolation Level
You must set the transaction isolation level to READ_COMMITTED.
To change the level, add transaction_isolation=READ-COMMITTED line under the section [mysqld] in the /etc/mysql/my.cnf file.
Oracle
In Oracle databases, a database schema is mapped to a user account, so we only need to create a user account for Self-Managed Commerce.
Start the SQL*Plus database client by entering the following command:
sqlplus /nologConnect to the database as the
SYSuser:conn / as sysdbaIn SQL*Plus, create a database user account.
create user COMMERCEDB identified by ep;COMMERCEDB/epis the default username/password combination used by Self-Managed Commerce.Grant the user appropriate permissions.
grant connect, resource, dba to COMMERCEDB;Exit SQL*Plus by running:
exit
Pushing Database Changes
Elastic Path recommends using the Data Population Command Line Interface (CLI) to push schema changes and catalog data updates to the production database. This tool is built in the extensions/data-population/ext-data-population-cli project.
The deployment package created by the extensions/packager/ext-deployment-package project contains the Data Population CLI as well as all the Liquibase change sets and the Import/Export data sets needed for deployment. For each target database, the following configuration files are required:
| Property | Description |
|---|---|
database.properties | Defines database connection properties and the data population environment name itself for this environment. |
data-population.properties | Defines properties required by the Data Population tool for execution in this environment; e.g. Liquibase contexts to activate for this environment. |
filtering.properties | Defines the values used when overriding property placeholders in data files for this environment. |