Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support custom schema and table name for version tracking #78

Closed
rdagumampan opened this issue May 1, 2020 · 1 comment
Closed

Support custom schema and table name for version tracking #78

rdagumampan opened this issue May 1, 2020 · 1 comment
Assignees
Labels
enhancement New feature or request implementing

Comments

@rdagumampan
Copy link
Owner

Support custom schema and table name for version tracking. This is specially helpful for databases maintaining multiple schemas and requires some compliance to naming patterns and segmentation of tables. For example, instead of keeping the tracking table into [dbo].[__YuniqlDbVersions] it should be possible to keep this in [utils].[SchemaHistory]

@rdagumampan rdagumampan added this to the v1.0 milestone May 1, 2020
@rdagumampan rdagumampan self-assigned this May 1, 2020
@rdagumampan rdagumampan added enhancement New feature or request implementing labels May 1, 2020
@rdagumampan
Copy link
Owner Author

rdagumampan commented May 2, 2020

Done. Feature is set to be part of release v1.0.

Usage

Prepare test database

docker run -e "ACCEPT_EULA=Y" -e "MSSQL_SA_PASSWORD=P@ssw0rd!" -p 1400:1433 -d mcr.microsoft.com/mssql/server:2017-latest

Prepare samples sql server database

git clone https://github.com/rdagumampan/yuniql.git c:\temp\yuniql-cli
cd c:\temp\yuniql-cli\samples\basic-sqlserver-sample

Run with custom schema

SETX YUNIQL_CONNECTION_STRING "Server=localhost,1400;Database=yuniqldb1;User Id=SA;Password=P@ssw0rd!"
yuniql run -a  --schema "my_schema"

yuniql info --schema "my_schema"

image

Run with custom version history table

SETX YUNIQL_CONNECTION_STRING "Server=localhost,1400;Database=yuniqldb2;User Id=SA;Password=P@ssw0rd!"
yuniql run -a --table "my_version_history"

yuniql info --table "my_version_history"

image

Run with custom schema and version history table

SETX YUNIQL_CONNECTION_STRING "Server=localhost,1400;Database=yuniqldb3;User Id=SA;Password=P@ssw0rd!"
yuniql run -a --schema "my_schema" --table "my_version_history"

yuniql info --schema "my_schema"  --table "my_version_history"

image

HTH

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request implementing
Projects
None yet
Development

No branches or pull requests

1 participant