Selectively apply Changes to Database Environments using Liquibase

In our previous post, we learned how to use Liquibase to export and compare databases. That brings us to another important question: how do we deploy separate changes on separate database environments like dev, qa, prod etc. Often times, developers would want to push certain changes in the dev environment more frequently and often and not all of them necessarily make it into the production. For example, dev database may have a special ERRORLOG table which stores the debugging information, but there is no requirement of that in the QA or production environment. Similarly, QA team would like to insert some data and modify certain values Continue reading “Selectively apply Changes to Database Environments using Liquibase”

Install Vagrant on Ubuntu OS 18.04 and create first vagrant virtual environment

Vagrant is an open source command line tool for building and managing virtual machine environments. By default Vagrant can provision machines on top of VirtualBox, Hyper-V and Docker but many other providers such as Libvirt (KVM), VMware and AWS can be installed via the Vagrant plugin system.

Vagrant is mostly used by developers to easily set up a development environment, that matches the production environment. In this blog post, we’ll discuss how to install Vagrant on Ubuntu 18.04 Operating System. We’ll be using the VirtualBox provider, which is the default provider for Vagrant.
Continue reading “Install Vagrant on Ubuntu OS 18.04 and create first vagrant virtual environment”

Implement Pipeline Support by making proper use of ValueFromPipeline and ValueFromPipelineByPropertyName in PowerShell functions

In our previous post, we learned how to make use of Begin, Process and End blocks to implement proper pipeline support. Building on to that, in this blog post, we’ll learn further about when to make use of ValueFromPipeline property and when to make use of ValueFromPipelineByPropertyName and what happens behind the scenes.

Multiple parameters that accept Pipeline Input

What if there are multiple parameters that can accept pipeline input and we need to run the Process block for them. Let’s consider below code: Continue reading “Implement Pipeline Support by making proper use of ValueFromPipeline and ValueFromPipelineByPropertyName in PowerShell functions”

Implement Pipeline Support by making proper use of begin, process and end blocks in PowerShell functions

Of many things that make PowerShell stand apart in the world of scripting languages, perhaps two are most fundamental to it: first, its treats everything as Objects and second, the ability to pipe objects from one cmdlet to another. Using this capability, we can effortlessly link multiple cmdlets together. Doing this will also throttle the amount of memory that is being allocated (in most cases) that the current session is using for the commands. So, its very natural that you would want to implement pipeline support for your own function, that you just wrote.
Continue reading “Implement Pipeline Support by making proper use of begin, process and end blocks in PowerShell functions”

Export and compare existing databases using Liquibase

In previous post, we discussed how we can use Liquibase to deploy changeLogs to databases. Often times, when you start implementing Liquibase, you would already have a database which is being used by the application. Though Liquibase does not depend upon the existing schema, it is still a good idea to export all of the existing schema and possibly data (to some extent) and also put that information in the version control. Also, sometimes you would like to compare databases (both schema and data, again to some extent) Continue reading “Export and compare existing databases using Liquibase”