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

YUNIQL_DB_NAME should be replaced in scripts #305

Open
gurry opened this issue Aug 4, 2023 · 1 comment
Open

YUNIQL_DB_NAME should be replaced in scripts #305

gurry opened this issue Aug 4, 2023 · 1 comment

Comments

@gurry
Copy link

gurry commented Aug 4, 2023

Currently you cannot use the reserved token YUNIQL_DB_NAME in scripts like this:

Use [${YUNIQL_DB_NAME}]

because Yuniql doesn't replace it in scripts.

The result is that you have to introduce a token of your own for DB name, such as DBNAME, and specify it with -k during yuniql run, e.g.:

yuniql run -a -c ""Server=localhost,1433;User Id=use;Password=pwd;Database=MyDb;" -k "DBNAME=MyDb"

As you can see, not only do you have to introduce an extra token, you have to specify the DB name twice in the command, once in the connection string and once with -k. This is awkward and in fact creates potential for mistakes.

Can you please make Yuniql replace YUNIQL_DB_NAME in scripts as well? It will make the above problem go away.

@gurry
Copy link
Author

gurry commented Aug 4, 2023

@rdagumampan I should add that I'd be happy to implement this if you agree. I'm not sure what it might break.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant