Free and open source schema versioning and database migration made natively with .NET/6. NEW THIS MAY 2022! v1.3.15 released!
Error thrown when using installation from choco and downloaded exe file. This is because Microsoft.Data.SqlClient.SNI.dll is excluded when publishing self-contained application.
ERR 2022-05-24 20:55:24Z Failed to execute run function. The type initializer for 'Microsoft.Data.SqlClient.TdsParser' threw an exception. Diagnostics stack trace captured a System.TypeInitializationException: ---> System.TypeInitializationException: The type initializer for 'Microsoft.Data.SqlClient.SNILoadHandle' threw an exception. ---> System.DllNotFoundException: Dll was not found. at Microsoft.Data.SqlClient.SNINativeMethodWrapper.SNIInitialize(Boolean useSystemDefaultSecureProtocols, IntPtr pmo) at Microsoft.Data.SqlClient.SNINativeMethodWrapper.SNIInitialize()
v1.3.15- See full release note here https://github.com/rdagumampan/yuniql/releases/tag/v1.3.15 v1.3.10- See full release note here https://github.com/rdagumampan/yuniql/releases/tag/v1.3.10
Full Changelog: https://github.com/rdagumampan/yuniql/commits/latest
This is release comes heavy on changes, the .NET 6 LTS
upgrade and migration to Microsoft.Data.SqlClient
driver for SqlServer. These changes promises better security and performance. And they are both contribution from our community! Enjoy this release. HTH.
TrustServerCertificate=True
in the connection string or ultimately set Encrypt=False
as it is before.ERR 2022-05-08 12:28:35Z Failed to execute run function. A connection was successfully established with the server, but then an error occurred during the login process. (provider: SSL Provider, error: 0 - The certificate chain was issued by an authority that is not trusted.) https://weblog.west-wind.com/posts/2021/Dec/07/Connection-Failures-with-MicrosoftDataSqlClient-4-and-later
_sequence.ini
If you have hundreds of scripts in a directory and prefixed the files with a sequence number to control the sequence of execution, it will be very tedious to reorganize the scripts if you need to insert another script file in the middle. In this release, you can place _sequence.ini
file in the version directories like v0.00
, in the non-version directories like _erase
or in the child directories of those directories like v0.00\setup-tables\
. This enhancement works in any directories and including all subdirectories. See snipped below and details here #254:
...
INF 2022-03-06 19:41:08Z Found 5 script files on <redacted>\yuniql_testdb_c7ff7be2\v0.00
+ test_v0_00_01.sql
+ test_v0_00_02.sql
+ test_v0_00_03.sql
+ test_v0_00_04.sql
+ test_v0_00_05.sql
INF 2022-03-06 19:41:08Z A custom execution sequence manifest is detected. \
Scripts will run as listed in the content of _sequence.ini file. Any scripts not listed in the manifest will be skipped \
and will not be committed in the version where it is placed. Skipped scripts can only be executed \
by moving them to the next version. Expected sequence:
+ test_v0_00_03.sql
+ test_v0_00_01.sql
+ test_v0_00_05.sql
+ test_v0_00_02.sql
+ test_v0_00_04.sql
docker run yuniql/cli
In this release, we also published new docker image yuniql/cli
. This is a stand alone runner and you can run all known actions such as check
, run
, list
, erase
and all others. Using volume attachment, you don't need to build an image before you can run migration.
https://hub.docker.com/repository/docker/yuniql/cli https://hub.docker.com/repository/docker/yuniql/yuniql
docker run --rm -v c:/play/yuniql/samples/basic-postgresql-sample:/data \
yuniql/cli:linux-x64-1.3.10 \
run --platform postgresql -d \
-c "<your-connection-string>"
docker run --rm yuniql/cli:linux-x64-1.3.10 list --platform postgresql -d -c "<your-connection-string>"
docker run --rm -v c:/play/yuniql/samples/basic-postgresql-sample:/data \
yuniql/cli:linux-x64-1.3.10 \
erase --platform postgresql -d \
-c "<your-connection-string>" --force
Microsoft.Data.SqlClient
#224docker run -v <work:space> yuniql/cli:latest
#234--trace-to-file
to support negation #260Special thanks to @pmelander for the migration to Microsoft.Data.SqlClient
, @Jean-Paul76 for upgrading to .NET 6 LTS.
These are significant contrubutions and certainly one hard to get through easily. Also for everyone who filed issue tickets and asked questions, thanks for all your feedback! HTH
v0.00.1
, v0.01.1
, v0.02.1
, v0.03.1
, It was working up to v0.02.1
but when I deployed v0.03.1
it was showing below error. If you are using {major}.{minor}
version semantics, v1.2.25 should be fine for you.Every release is special and this is not an exception. This pandemic period presents a rare opportunity to review more PRs, follow-up on reported issues, build prioritized features and fix major bugs. In fact, perhaps this is the release with the most bug-fixes! A testament of our growing usage and feedback from our community. We can only thank you all for your issue tickets and contributions. And here are the highlights:
The idea behind this popular request is to perform schema versioning on shared database where objects are segmented by schema. This would also enable developers and teams to get dedicated schema version and evolve independently while using single installation. This is more important when teams are not permitted to create and destroy databases during dev/test.
yuniql run -a --meta-schema dev01 --platform sqlserver
yuniql run -a --meta-schema dev02 --platform sqlserver
yuniql run -a --meta-schema dev03 --platform sqlserver
yuniql run -a --meta-schema sales --platform sqlserver
yuniql run -a --meta-schema inventory --platform sqlserver
yuniql run -a --meta-schema manufacturing --platform sqlserver
This release comes with previous support for Oracle. The platform tests has been executed using Oracle Enterprise 12C on docker container and Oracle Autonomous Database. You can explore this feature and get started here https://yuniql.io/docs/get-started-oracle/
docker run --rm -dit --name oracle -p 1521:1521 store/oracle/database-enterprise:12.2.0.1-slim
SETX YUNIQL_PLATFORM "oracle"
SETX YUNIQL_CONNECTION_STRING "Data Source=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=ORCLCDB.localdomain)));User Id=sys;Password=Oradoc_db1;DBA Privilege=SYSDBA;"
SETX YUNIQL_WORKSPACE "C:\temp\yuniql\samples\basic-oracle-sample"
yuniql run --debug
yuniql list --debug
yuniql erase --force --debug
yuniql check
Can I resolve or ping the database server? Can I establish an Sql/Odbc connection to the master or catalog database? Will my connection string work if I run the migrations on this database server? Is my service account have permissions to establish a session? I hope this simple feature helps in diagnosing migration issues quickly.
$ yuniql check -c "Server=DESKTOP-ULR8GDO;Database=helloyuniql;Trusted_Connection=True;" -d --platform sqlserver
INF 2022-02-21 23:23:11Z Verifying ping connectivity to server/cluster DESKTOP-ULR8GDO...
INF 2022-02-21 23:23:11Z Ping connectivity to server/cluster DESKTOP-ULR8GDO - Successful
INF 2022-02-21 23:23:11Z Verifying sql/odbc connectivity to master/catalog on DESKTOP-ULR8GDO...
INF 2022-02-21 23:23:11Z Sql/odbc connectivity to master/catalog on DESKTOP-ULR8GDO - Successful
INF 2022-02-21 23:23:11Z Verifying sql/odbc connectivity to database helloyuniql on DESKTOP-ULR8GDO...
INF 2022-02-21 23:23:11Z Sql/odbc connectivity to database helloyuniql on DESKTOP-ULR8GDO - Successful
yuniql destroy
Warning: Needless to say, don't use this in production. Just don't. This feature enables testers to rapidly deploy test databases and destroy when the test execution completes. If yuniql erase
is not sufficient, yuniql destroy
might suffice. It's quite simple, you prepare the destroy scripts yourself and do the necessary handling and sequence to drop the database.
docker run --rm -dit -e "ACCEPT_EULA=Y" -e "MSSQL_SA_PASSWORD=P@ssw0rd!" -p 1400:1433 -d mcr.microsoft.com/mssql/server:2017-latest
SETX YUNIQL_CONNECTION_STRING "Server=localhost,1400;Database=helloyuniql;User Id=SA;Password=P@ssw0rd!"
SETX YUNIQL_WORKSPACE "C:\temp\yuniql\samples\basic-sqlserver-sample"
SETX YUNIQL_PLATFORM "sqlserver"
yuniql run -a --debug
yuniql list --debug
yuniql destroy --force --debug
yuniql check
: Basic connectivity check to the target database.yuniql destroy
: Drops database using custom prepared scripts.yuniql apply
: A synonym for yuniql run
to avoid conflict in docker run
trace-silent
: Console window only log and no log files produced.trace-sensitive-data
: Print secrets and connection strings into console window and log files.trace-directory
: Set the directory where log files are created.Special thanks to @bobi591, @wahmedswl, @zwdOr20, @black-eagle17, @automada, @gfnavarro for your significatn contrubutions in this release. Also for everyone filing issue tickets and asking questions, thanks for all your feedback.
This release is very special as its packed with a back story of going through challenges of COVID-19 and support for two major cloud datawarehouse platforms Redshift and Snowflake. In this release, we're also able to support diverse transaction modes so we can run either in transaction for run session, for every version, or for every sql statement. The capability enables us to better track migration failures on databases that do not support full transactional DDL such as MySql and Snowflake.
Thank you and looking forward for continuous feedback and issue tickets. This tool only gets better with community of users sharing their issues and feature requests. Inside the box are…
__yuniql_schema_version
. Automatic backup and upgrade of __yuniqldbversion
existing tables on your next run.session
, per version
and per statement
--require-cleared-draft
option on yuniql runSpecial thanks to @bymse, @TaurahSP, @wcontayon and @DavidHopkinsFbr for your significatn contrubutions in this release. Also for everyone filing issue tickets and asking questions, thanks for all your feedback.
Amazon Redshift rapid database deployment and schema versioning with yuniql - preview https://www.youtube.com/watch?v=TUJijZsXP7k
Latest nightly build for v1.1 from master
Key development:
--require-cleared-draft
option on yuniql run
yuniql platforms
See yuniql 2021 roadmap here https://github.com/rdagumampan/yuniql/projects/3 HTH, Rodel
This is a PRODUCTION RELEASE. After 8 months of active development and continuous engament with our early adapters, yuniql is finally graduating into version 1.0. The release captured general use cases for schema versioning and migration for SQL Server, PostgreSql, MySql and MariaDB. Azure DevOps tasks are also made available in this release for both Windows and Linux hosted agents.
I am very excited with this release and looking forward for continuous user feedback and issues reported. This tool only gets better with community of users sharing their issues and feature requests.
yuniql info
into yuniql list
#116--force
flag when executing yuniql erase
@1
. For example, user UseYUNIQLCLI@1
instead ofUseYUNIQLCLI@0
.--debug
is off--no-transaction
flag to disable transactional ddlSpecial thanks to @Jabestrada and @mguoth for significant contributions in this release. Their active contributions over several months drives many significant development in yuniql and other exciting features in vnext releases.
Also, this best build so far thanks for giving feedback and creating issue tickets:
Cheers, Rodel
This is a BETA RELEASE. This is stable build and has so far captured and fixes many defects from early adopters of yuniql. Platform tests and unit tests coverage has been significantly increased in this build.
Special thanks to @mguoth for significant improvement in yuniql's MySql support. Also, this best build so far thanks for giving feedback and creating issue tickets:
Cheers, Rodel
This PREVIEW release fixes some of reported bugs in the metadata table.
#64 Add ToolVersion in metadata table #63 Support "Verify YUNIQL" Az DevOps Task #62 Support "Erase YUNIQL" Az DevOps Task
#65 Missing data in pgsql tracking table bug #60 "Incorrect syntax near '-'" when database name contains