Skip to content

Add ability to provide variables in migrations #1104

@alniks

Description

@alniks

For example ${mysql_db}:

CREATE TABLE users (id UInt64, name String, status UInt8) ENGINE = MySQL('${mysql_address}', '${mysql_db}', 'users', 'root', 'secret');

The variables are then taken from app_config files depending on the environment. So we are able to provide different values for a example for development, test, and jenkins environment.

However, there should be a way to escape those variables for INSERT/UPDATE statement (maybe others as well):

INSERT INTO var_samples (id, sample, text) VALUES (1, '${var}', 'Please, use ${var} in your settings')

The above should go into DB without any replacements, even if there are some vars in the environment.

Metadata

Metadata

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions