SlideShare a Scribd company logo
Presented By: Muskan Gupta
Flyway : A Database
Version Management Tool
Lack of etiquette and manners is a huge turn off.
KnolX Etiquettes
Punctuality
Respect Knolx session timings, you
are requested not to join sessions
after a 5 minutes threshold post
the session start time.
Feedback
Make sure to submit a constructive
feedback for all sessions as it is
very helpful for the presenter.
Silent Mode
Keep your screen on mute if there
is nothing to say.
Our Agenda
01 Naive approach to handle Database
02 What is Database Version Control?
03 Importance of Version Control
04 Flyway: Database Version Control Tool
05 How Flyway Works?
06 Flyway Migrations
07 Flyway Commands
08 Demo
Naive approach to handle Database
XYZ Database
XYZ Project
XYZ Database
XYZ Project
XYZ Database
XYZ Project
XYZ Database
XYZ Project
XYZ Database
XYZ Project
XYZ Database
XYZ Project
XYZ Database
XYZ Project
XYZ Database
XYZ Project
XYZ Database
XYZ Project
XYZ Database
XYZ Project
XYZ Database
XYZ Project
XYZ Database
XYZ Project
Multiple Users
Multiple Environments
XYZ Databse
XYZ Project
Naive approach to handle Database
Problems with Naive approach -
● What state is the database in on this machine?
● Has this script already been applied or not?
● Has the quick fix in production been applied in test afterwards?
● How do you set up a new database instance?
What is Database Version Control?
● Database version control is similar to application version control.
● Keep the track of all the changes done to your database by all the team members.
● We need to store the Data Definition Language (DDL) code for a database in a version control system.
● Also it should maintain a history of all the changes done to the database.
Importance of Version Control
03 04
Better Collaboration
Between Team
Members
Efficient and Scalable
Deployments
01 02
Single Source of Truth Increased Visibility
05 06
Database Rollbacks Database Automation
Flyway : Database Version Control Tool
● Version Control for your Database
● An Open Source tool for migration based database version control.
● It has a community as well as a teams version.
● Community Support is available for free version and Redgate Support is available for paid version.
● It provides multiple ways to use flyway. It has :
○ Command Line Client
○ API
○ Maven
○ Gradle
How Flyway Works?
Empty Database
Flyway
Migrations
How Flyway Works?
1. Try to locate schema history table.
A schema history table is a table that flyway uses to maintain the version. By having a look at the table flyway decides which
migrations need to be applied and which migrations have already been implemented.
2. If schema history table is not found flyway will create the table in primary/default schema.
3. After creation of table, it will try to locate all the migrations at the migration location provided in configuration.
4. According to the version it will apply the migrations one by one in incremental fashion
and update schema history table accordingly.
Flyway Migrations
In terms of Flyway all the changes to the database are temed as Migrations.
Migrations are of 2 types :
● Versioned migration
○ Regular Versioned Migration
○ Undo Migration
● Repeatable migrationf
Migrations can be written both in SQL and in Java.
Flyway automatically discovers migrations on the filesystem and on the Java classpath.
Within a single migration run, versioned migrations are applied first as per their version and repeatable migrations
are always applied last, after all versioned migrations have been executed. Repeatable migrations are applied in
the order of their description.
Versioned Migrations
From Flyway Documentation :
Versioned migrations have a version, a description and a checksum. The version must be unique. The description is purely
informative for you to be able to remember what each migration does. The checksum is there to detect accidental changes.
Versioned migrations are the most common type of migration. They are applied in order exactly once.
Versioned migrations are typically used for:
● Creating/altering/dropping tables/indexes/foreign keys/enums/UDTs/…
● Reference data updates
● User data corrections
Undo Migrations
From Flyway Documentation :
Undo migrations are the opposite of regular versioned migrations. An undo migration is responsible for undoing the effects of
the versioned migration with the same version. Undo migrations are optional and not required to run regular versioned
migrations.
Undo Migration seems nice but can break in practice.
Preferred way is to maintain backward compatibility between the DB and all the other versions of code.
Repeatable Migrations
From Flyway Documentation :
Repeatable migrations have a description and a checksum, but no version. Instead of being run just once, they are
(re-)applied every time their checksum changes.
They are typically used for
● (Re-)creating views/procedures/functions/packages/…
● Bulk reference data reinserts
File Naming Convention
V2__Add_new_table.sql
Prefix Separator Suffix
Version Description
U2__Add_new_table.sql
Prefix Separator Suffix
Version Description
R__Add_new_table.sql
Prefix Separator Suffix
Description
Regular Versioned Migration Undo Migration Repeatable Migration
The file name consists of the following parts:
● Prefix: V for versioned (configurable), U for undo (configurable) and R for repeatable migrations (configurable)
● Version: Version with dots or underscores separate as many parts as you like (Not for repeatable migrations)
● Separator: __ (two underscores) (configurable)
● Description: Underscores or spaces separate the words
● Suffix: .sql (configurable)
Flyway Commands
Migrate
Info
Clean
Validate
Undo
Baseline
Repair
Demo
Thank You !

More Related Content

What's hot

Plugin architecture (Extensible Application Architecture)
Plugin architecture (Extensible Application Architecture)Plugin architecture (Extensible Application Architecture)
Plugin architecture (Extensible Application Architecture)
Chinmoy Mohanty
 
Azure DevOps CI/CD For Beginners
Azure DevOps CI/CD  For BeginnersAzure DevOps CI/CD  For Beginners
Azure DevOps CI/CD For Beginners
Rahul Nath
 
Jenkins CI
Jenkins CIJenkins CI
Jenkins CI
haochenglee
 
GIT INTRODUCTION
GIT INTRODUCTIONGIT INTRODUCTION
GIT INTRODUCTION
MohanRaviRohitth
 
Datadog: From a single product to a growing platform by Alexis Lê-Quôc, CTO
Datadog: From a single product to a growing platform by Alexis Lê-Quôc, CTODatadog: From a single product to a growing platform by Alexis Lê-Quôc, CTO
Datadog: From a single product to a growing platform by Alexis Lê-Quôc, CTO
TheFamily
 
Ansible
AnsibleAnsible
Ansible
Raul Leite
 
Gitlab flow
Gitlab flowGitlab flow
Gitlab flow
viniciusban
 
V sphere 7 update 3 へのアップグレードについて
V sphere 7 update 3 へのアップグレードについてV sphere 7 update 3 へのアップグレードについて
V sphere 7 update 3 へのアップグレードについて
Satoshi Imai
 
Introduction to CICD
Introduction to CICDIntroduction to CICD
Introduction to CICD
Knoldus Inc.
 
Jenkins Overview
Jenkins OverviewJenkins Overview
Jenkins Overview
Ahmed M. Gomaa
 
Speed Up Your Kubernetes Upgrades For Your Kafka Clusters
Speed Up Your Kubernetes Upgrades For Your Kafka ClustersSpeed Up Your Kubernetes Upgrades For Your Kafka Clusters
Speed Up Your Kubernetes Upgrades For Your Kafka Clusters
Vanessa Vuibert
 
IT エンジニアのための 流し読み Windows - Windows のライセンス認証 & サブスクリプションのライセンス認証
IT エンジニアのための 流し読み Windows - Windows のライセンス認証 & サブスクリプションのライセンス認証IT エンジニアのための 流し読み Windows - Windows のライセンス認証 & サブスクリプションのライセンス認証
IT エンジニアのための 流し読み Windows - Windows のライセンス認証 & サブスクリプションのライセンス認証
TAKUYA OHTA
 
소프트웨어 아키텍처
소프트웨어 아키텍처소프트웨어 아키텍처
소프트웨어 아키텍처
영기 김
 
Git Tutorial | Git Basics - Branching, Merging, Rebasing | Learn Git | DevOps...
Git Tutorial | Git Basics - Branching, Merging, Rebasing | Learn Git | DevOps...Git Tutorial | Git Basics - Branching, Merging, Rebasing | Learn Git | DevOps...
Git Tutorial | Git Basics - Branching, Merging, Rebasing | Learn Git | DevOps...
Edureka!
 
Jenkins - From Continuous Integration to Continuous Delivery
Jenkins - From Continuous Integration to Continuous DeliveryJenkins - From Continuous Integration to Continuous Delivery
Jenkins - From Continuous Integration to Continuous Delivery
Virendra Bhalothia
 
Git branching strategies
Git branching strategiesGit branching strategies
Git branching strategies
jstack
 
Git workflows
Git workflowsGit workflows
Git workflows
Xpand IT
 
Liquibase
LiquibaseLiquibase
Liquibase
Roman Uholnikov
 
DevOps Overview in my own words
DevOps Overview in my own wordsDevOps Overview in my own words
DevOps Overview in my own words
SUBHENDU KARMAKAR
 
Getting Started: Intro to Telegraf - July 2021
Getting Started: Intro to Telegraf - July 2021Getting Started: Intro to Telegraf - July 2021
Getting Started: Intro to Telegraf - July 2021
InfluxData
 

What's hot (20)

Plugin architecture (Extensible Application Architecture)
Plugin architecture (Extensible Application Architecture)Plugin architecture (Extensible Application Architecture)
Plugin architecture (Extensible Application Architecture)
 
Azure DevOps CI/CD For Beginners
Azure DevOps CI/CD  For BeginnersAzure DevOps CI/CD  For Beginners
Azure DevOps CI/CD For Beginners
 
Jenkins CI
Jenkins CIJenkins CI
Jenkins CI
 
GIT INTRODUCTION
GIT INTRODUCTIONGIT INTRODUCTION
GIT INTRODUCTION
 
Datadog: From a single product to a growing platform by Alexis Lê-Quôc, CTO
Datadog: From a single product to a growing platform by Alexis Lê-Quôc, CTODatadog: From a single product to a growing platform by Alexis Lê-Quôc, CTO
Datadog: From a single product to a growing platform by Alexis Lê-Quôc, CTO
 
Ansible
AnsibleAnsible
Ansible
 
Gitlab flow
Gitlab flowGitlab flow
Gitlab flow
 
V sphere 7 update 3 へのアップグレードについて
V sphere 7 update 3 へのアップグレードについてV sphere 7 update 3 へのアップグレードについて
V sphere 7 update 3 へのアップグレードについて
 
Introduction to CICD
Introduction to CICDIntroduction to CICD
Introduction to CICD
 
Jenkins Overview
Jenkins OverviewJenkins Overview
Jenkins Overview
 
Speed Up Your Kubernetes Upgrades For Your Kafka Clusters
Speed Up Your Kubernetes Upgrades For Your Kafka ClustersSpeed Up Your Kubernetes Upgrades For Your Kafka Clusters
Speed Up Your Kubernetes Upgrades For Your Kafka Clusters
 
IT エンジニアのための 流し読み Windows - Windows のライセンス認証 & サブスクリプションのライセンス認証
IT エンジニアのための 流し読み Windows - Windows のライセンス認証 & サブスクリプションのライセンス認証IT エンジニアのための 流し読み Windows - Windows のライセンス認証 & サブスクリプションのライセンス認証
IT エンジニアのための 流し読み Windows - Windows のライセンス認証 & サブスクリプションのライセンス認証
 
소프트웨어 아키텍처
소프트웨어 아키텍처소프트웨어 아키텍처
소프트웨어 아키텍처
 
Git Tutorial | Git Basics - Branching, Merging, Rebasing | Learn Git | DevOps...
Git Tutorial | Git Basics - Branching, Merging, Rebasing | Learn Git | DevOps...Git Tutorial | Git Basics - Branching, Merging, Rebasing | Learn Git | DevOps...
Git Tutorial | Git Basics - Branching, Merging, Rebasing | Learn Git | DevOps...
 
Jenkins - From Continuous Integration to Continuous Delivery
Jenkins - From Continuous Integration to Continuous DeliveryJenkins - From Continuous Integration to Continuous Delivery
Jenkins - From Continuous Integration to Continuous Delivery
 
Git branching strategies
Git branching strategiesGit branching strategies
Git branching strategies
 
Git workflows
Git workflowsGit workflows
Git workflows
 
Liquibase
LiquibaseLiquibase
Liquibase
 
DevOps Overview in my own words
DevOps Overview in my own wordsDevOps Overview in my own words
DevOps Overview in my own words
 
Getting Started: Intro to Telegraf - July 2021
Getting Started: Intro to Telegraf - July 2021Getting Started: Intro to Telegraf - July 2021
Getting Started: Intro to Telegraf - July 2021
 

Similar to Flyway _ A Database Version Management Tool

Introduction To Liquibase
Introduction To Liquibase Introduction To Liquibase
Introduction To Liquibase
Knoldus Inc.
 
Scm PPT
Scm PPTScm PPT
Relational Database CI/CD
Relational Database CI/CDRelational Database CI/CD
Relational Database CI/CD
Jasmin Fluri
 
Schema migration (DB migration) with Phinx
Schema migration (DB migration) with PhinxSchema migration (DB migration) with Phinx
Schema migration (DB migration) with Phinx
Hadi Ariawan
 
HA SOA Application with GlusterFS
HA SOA Application with GlusterFSHA SOA Application with GlusterFS
HA SOA Application with GlusterFS
zeridon
 
Third Meetup Slides Mulesoft Mexico City
Third Meetup Slides Mulesoft Mexico CityThird Meetup Slides Mulesoft Mexico City
Third Meetup Slides Mulesoft Mexico City
Alan Muñoz Ochoa
 
SCM PPT
SCM PPTSCM PPT
Version Control System - for Agile Software Project Management.
Version Control System - for Agile Software Project Management.Version Control System - for Agile Software Project Management.
Version Control System - for Agile Software Project Management.
Bhavya Chawla
 
DevOps Practices in a Nutshell
DevOps Practices in a NutshellDevOps Practices in a Nutshell
DevOps Practices in a Nutshell
Fibonalabs
 
Second Caracas MuleSoft Meetup Slides
Second Caracas MuleSoft Meetup SlidesSecond Caracas MuleSoft Meetup Slides
Second Caracas MuleSoft Meetup Slides
Fernando Silva
 
Volunteering at YouSee on Technology Support
Volunteering at YouSee on Technology SupportVolunteering at YouSee on Technology Support
Volunteering at YouSee on Technology Support
YouSee
 
version control system (2).pptx
version control system (2).pptxversion control system (2).pptx
version control system (2).pptx
DipanshuRaj19
 
Multi platform application deployment with urban code deploy
Multi platform application deployment with urban code deployMulti platform application deployment with urban code deploy
Multi platform application deployment with urban code deploy
Saranga Tripathy
 
[DevDay2018] Automate database migration using flyway framework - By Karthick...
[DevDay2018] Automate database migration using flyway framework - By Karthick...[DevDay2018] Automate database migration using flyway framework - By Karthick...
[DevDay2018] Automate database migration using flyway framework - By Karthick...
DevDay.org
 
The influence of "Distributed platforms" on #devops
The influence of "Distributed platforms" on #devopsThe influence of "Distributed platforms" on #devops
The influence of "Distributed platforms" on #devops
Kris Buytaert
 
Selena Deckelmann - Sane Schema Management with Alembic and SQLAlchemy @ Pos...
Selena Deckelmann - Sane Schema Management with  Alembic and SQLAlchemy @ Pos...Selena Deckelmann - Sane Schema Management with  Alembic and SQLAlchemy @ Pos...
Selena Deckelmann - Sane Schema Management with Alembic and SQLAlchemy @ Pos...
PostgresOpen
 
Easy database migrations with C# and FluentMigrator
Easy database migrations with C# and FluentMigratorEasy database migrations with C# and FluentMigrator
Easy database migrations with C# and FluentMigrator
Safal Mahat
 
Simplify your SAP CPI development with Figaf
Simplify your SAP CPI development with FigafSimplify your SAP CPI development with Figaf
Simplify your SAP CPI development with Figaf
Daniel Graversen
 
Slide set 7 (Source Code Management History Overview) - Copy.pptx
Slide set 7 (Source Code Management History  Overview) - Copy.pptxSlide set 7 (Source Code Management History  Overview) - Copy.pptx
Slide set 7 (Source Code Management History Overview) - Copy.pptx
UTKARSHBHARDWAJ71
 
Session on evaluation of DevSecOps
Session on evaluation of DevSecOpsSession on evaluation of DevSecOps
Session on evaluation of DevSecOps
Abdullah al Mamun
 

Similar to Flyway _ A Database Version Management Tool (20)

Introduction To Liquibase
Introduction To Liquibase Introduction To Liquibase
Introduction To Liquibase
 
Scm PPT
Scm PPTScm PPT
Scm PPT
 
Relational Database CI/CD
Relational Database CI/CDRelational Database CI/CD
Relational Database CI/CD
 
Schema migration (DB migration) with Phinx
Schema migration (DB migration) with PhinxSchema migration (DB migration) with Phinx
Schema migration (DB migration) with Phinx
 
HA SOA Application with GlusterFS
HA SOA Application with GlusterFSHA SOA Application with GlusterFS
HA SOA Application with GlusterFS
 
Third Meetup Slides Mulesoft Mexico City
Third Meetup Slides Mulesoft Mexico CityThird Meetup Slides Mulesoft Mexico City
Third Meetup Slides Mulesoft Mexico City
 
SCM PPT
SCM PPTSCM PPT
SCM PPT
 
Version Control System - for Agile Software Project Management.
Version Control System - for Agile Software Project Management.Version Control System - for Agile Software Project Management.
Version Control System - for Agile Software Project Management.
 
DevOps Practices in a Nutshell
DevOps Practices in a NutshellDevOps Practices in a Nutshell
DevOps Practices in a Nutshell
 
Second Caracas MuleSoft Meetup Slides
Second Caracas MuleSoft Meetup SlidesSecond Caracas MuleSoft Meetup Slides
Second Caracas MuleSoft Meetup Slides
 
Volunteering at YouSee on Technology Support
Volunteering at YouSee on Technology SupportVolunteering at YouSee on Technology Support
Volunteering at YouSee on Technology Support
 
version control system (2).pptx
version control system (2).pptxversion control system (2).pptx
version control system (2).pptx
 
Multi platform application deployment with urban code deploy
Multi platform application deployment with urban code deployMulti platform application deployment with urban code deploy
Multi platform application deployment with urban code deploy
 
[DevDay2018] Automate database migration using flyway framework - By Karthick...
[DevDay2018] Automate database migration using flyway framework - By Karthick...[DevDay2018] Automate database migration using flyway framework - By Karthick...
[DevDay2018] Automate database migration using flyway framework - By Karthick...
 
The influence of "Distributed platforms" on #devops
The influence of "Distributed platforms" on #devopsThe influence of "Distributed platforms" on #devops
The influence of "Distributed platforms" on #devops
 
Selena Deckelmann - Sane Schema Management with Alembic and SQLAlchemy @ Pos...
Selena Deckelmann - Sane Schema Management with  Alembic and SQLAlchemy @ Pos...Selena Deckelmann - Sane Schema Management with  Alembic and SQLAlchemy @ Pos...
Selena Deckelmann - Sane Schema Management with Alembic and SQLAlchemy @ Pos...
 
Easy database migrations with C# and FluentMigrator
Easy database migrations with C# and FluentMigratorEasy database migrations with C# and FluentMigrator
Easy database migrations with C# and FluentMigrator
 
Simplify your SAP CPI development with Figaf
Simplify your SAP CPI development with FigafSimplify your SAP CPI development with Figaf
Simplify your SAP CPI development with Figaf
 
Slide set 7 (Source Code Management History Overview) - Copy.pptx
Slide set 7 (Source Code Management History  Overview) - Copy.pptxSlide set 7 (Source Code Management History  Overview) - Copy.pptx
Slide set 7 (Source Code Management History Overview) - Copy.pptx
 
Session on evaluation of DevSecOps
Session on evaluation of DevSecOpsSession on evaluation of DevSecOps
Session on evaluation of DevSecOps
 

More from Knoldus Inc.

Terratest - Automation testing of infrastructure
Terratest - Automation testing of infrastructureTerratest - Automation testing of infrastructure
Terratest - Automation testing of infrastructure
Knoldus Inc.
 
Getting Started with Apache Spark (Scala)
Getting Started with Apache Spark (Scala)Getting Started with Apache Spark (Scala)
Getting Started with Apache Spark (Scala)
Knoldus Inc.
 
Secure practices with dot net services.pptx
Secure practices with dot net services.pptxSecure practices with dot net services.pptx
Secure practices with dot net services.pptx
Knoldus Inc.
 
Distributed Cache with dot microservices
Distributed Cache with dot microservicesDistributed Cache with dot microservices
Distributed Cache with dot microservices
Knoldus Inc.
 
Introduction to gRPC Presentation (Java)
Introduction to gRPC Presentation (Java)Introduction to gRPC Presentation (Java)
Introduction to gRPC Presentation (Java)
Knoldus Inc.
 
Using InfluxDB for real-time monitoring in Jmeter
Using InfluxDB for real-time monitoring in JmeterUsing InfluxDB for real-time monitoring in Jmeter
Using InfluxDB for real-time monitoring in Jmeter
Knoldus Inc.
 
Intoduction to KubeVela Presentation (DevOps)
Intoduction to KubeVela Presentation (DevOps)Intoduction to KubeVela Presentation (DevOps)
Intoduction to KubeVela Presentation (DevOps)
Knoldus Inc.
 
Stakeholder Management (Project Management) Presentation
Stakeholder Management (Project Management) PresentationStakeholder Management (Project Management) Presentation
Stakeholder Management (Project Management) Presentation
Knoldus Inc.
 
Introduction To Kaniko (DevOps) Presentation
Introduction To Kaniko (DevOps) PresentationIntroduction To Kaniko (DevOps) Presentation
Introduction To Kaniko (DevOps) Presentation
Knoldus Inc.
 
Efficient Test Environments with Infrastructure as Code (IaC)
Efficient Test Environments with Infrastructure as Code (IaC)Efficient Test Environments with Infrastructure as Code (IaC)
Efficient Test Environments with Infrastructure as Code (IaC)
Knoldus Inc.
 
Exploring Terramate DevOps (Presentation)
Exploring Terramate DevOps (Presentation)Exploring Terramate DevOps (Presentation)
Exploring Terramate DevOps (Presentation)
Knoldus Inc.
 
Clean Code in Test Automation Differentiating Between the Good and the Bad
Clean Code in Test Automation  Differentiating Between the Good and the BadClean Code in Test Automation  Differentiating Between the Good and the Bad
Clean Code in Test Automation Differentiating Between the Good and the Bad
Knoldus Inc.
 
Integrating AI Capabilities in Test Automation
Integrating AI Capabilities in Test AutomationIntegrating AI Capabilities in Test Automation
Integrating AI Capabilities in Test Automation
Knoldus Inc.
 
State Management with NGXS in Angular.pptx
State Management with NGXS in Angular.pptxState Management with NGXS in Angular.pptx
State Management with NGXS in Angular.pptx
Knoldus Inc.
 
Authentication in Svelte using cookies.pptx
Authentication in Svelte using cookies.pptxAuthentication in Svelte using cookies.pptx
Authentication in Svelte using cookies.pptx
Knoldus Inc.
 
OAuth2 Implementation Presentation (Java)
OAuth2 Implementation Presentation (Java)OAuth2 Implementation Presentation (Java)
OAuth2 Implementation Presentation (Java)
Knoldus Inc.
 
Supply chain security with Kubeclarity.pptx
Supply chain security with Kubeclarity.pptxSupply chain security with Kubeclarity.pptx
Supply chain security with Kubeclarity.pptx
Knoldus Inc.
 
Mastering Web Scraping with JSoup Unlocking the Secrets of HTML Parsing
Mastering Web Scraping with JSoup Unlocking the Secrets of HTML ParsingMastering Web Scraping with JSoup Unlocking the Secrets of HTML Parsing
Mastering Web Scraping with JSoup Unlocking the Secrets of HTML Parsing
Knoldus Inc.
 
Akka gRPC Essentials A Hands-On Introduction
Akka gRPC Essentials A Hands-On IntroductionAkka gRPC Essentials A Hands-On Introduction
Akka gRPC Essentials A Hands-On Introduction
Knoldus Inc.
 
Entity Core with Core Microservices.pptx
Entity Core with Core Microservices.pptxEntity Core with Core Microservices.pptx
Entity Core with Core Microservices.pptx
Knoldus Inc.
 

More from Knoldus Inc. (20)

Terratest - Automation testing of infrastructure
Terratest - Automation testing of infrastructureTerratest - Automation testing of infrastructure
Terratest - Automation testing of infrastructure
 
Getting Started with Apache Spark (Scala)
Getting Started with Apache Spark (Scala)Getting Started with Apache Spark (Scala)
Getting Started with Apache Spark (Scala)
 
Secure practices with dot net services.pptx
Secure practices with dot net services.pptxSecure practices with dot net services.pptx
Secure practices with dot net services.pptx
 
Distributed Cache with dot microservices
Distributed Cache with dot microservicesDistributed Cache with dot microservices
Distributed Cache with dot microservices
 
Introduction to gRPC Presentation (Java)
Introduction to gRPC Presentation (Java)Introduction to gRPC Presentation (Java)
Introduction to gRPC Presentation (Java)
 
Using InfluxDB for real-time monitoring in Jmeter
Using InfluxDB for real-time monitoring in JmeterUsing InfluxDB for real-time monitoring in Jmeter
Using InfluxDB for real-time monitoring in Jmeter
 
Intoduction to KubeVela Presentation (DevOps)
Intoduction to KubeVela Presentation (DevOps)Intoduction to KubeVela Presentation (DevOps)
Intoduction to KubeVela Presentation (DevOps)
 
Stakeholder Management (Project Management) Presentation
Stakeholder Management (Project Management) PresentationStakeholder Management (Project Management) Presentation
Stakeholder Management (Project Management) Presentation
 
Introduction To Kaniko (DevOps) Presentation
Introduction To Kaniko (DevOps) PresentationIntroduction To Kaniko (DevOps) Presentation
Introduction To Kaniko (DevOps) Presentation
 
Efficient Test Environments with Infrastructure as Code (IaC)
Efficient Test Environments with Infrastructure as Code (IaC)Efficient Test Environments with Infrastructure as Code (IaC)
Efficient Test Environments with Infrastructure as Code (IaC)
 
Exploring Terramate DevOps (Presentation)
Exploring Terramate DevOps (Presentation)Exploring Terramate DevOps (Presentation)
Exploring Terramate DevOps (Presentation)
 
Clean Code in Test Automation Differentiating Between the Good and the Bad
Clean Code in Test Automation  Differentiating Between the Good and the BadClean Code in Test Automation  Differentiating Between the Good and the Bad
Clean Code in Test Automation Differentiating Between the Good and the Bad
 
Integrating AI Capabilities in Test Automation
Integrating AI Capabilities in Test AutomationIntegrating AI Capabilities in Test Automation
Integrating AI Capabilities in Test Automation
 
State Management with NGXS in Angular.pptx
State Management with NGXS in Angular.pptxState Management with NGXS in Angular.pptx
State Management with NGXS in Angular.pptx
 
Authentication in Svelte using cookies.pptx
Authentication in Svelte using cookies.pptxAuthentication in Svelte using cookies.pptx
Authentication in Svelte using cookies.pptx
 
OAuth2 Implementation Presentation (Java)
OAuth2 Implementation Presentation (Java)OAuth2 Implementation Presentation (Java)
OAuth2 Implementation Presentation (Java)
 
Supply chain security with Kubeclarity.pptx
Supply chain security with Kubeclarity.pptxSupply chain security with Kubeclarity.pptx
Supply chain security with Kubeclarity.pptx
 
Mastering Web Scraping with JSoup Unlocking the Secrets of HTML Parsing
Mastering Web Scraping with JSoup Unlocking the Secrets of HTML ParsingMastering Web Scraping with JSoup Unlocking the Secrets of HTML Parsing
Mastering Web Scraping with JSoup Unlocking the Secrets of HTML Parsing
 
Akka gRPC Essentials A Hands-On Introduction
Akka gRPC Essentials A Hands-On IntroductionAkka gRPC Essentials A Hands-On Introduction
Akka gRPC Essentials A Hands-On Introduction
 
Entity Core with Core Microservices.pptx
Entity Core with Core Microservices.pptxEntity Core with Core Microservices.pptx
Entity Core with Core Microservices.pptx
 

Recently uploaded

Infrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI modelsInfrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI models
Zilliz
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
Zilliz
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
ssuserfac0301
 
UI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentationUI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentation
Wouter Lemaire
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
Quotidiano Piemontese
 
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
Edge AI and Vision Alliance
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
Uni Systems S.M.S.A.
 
AI-Powered Food Delivery Transforming App Development in Saudi Arabia.pdf
AI-Powered Food Delivery Transforming App Development in Saudi Arabia.pdfAI-Powered Food Delivery Transforming App Development in Saudi Arabia.pdf
AI-Powered Food Delivery Transforming App Development in Saudi Arabia.pdf
Techgropse Pvt.Ltd.
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
DianaGray10
 
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development ProvidersYour One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
akankshawande
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
Matthew Sinclair
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
Zilliz
 
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptxOcean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
SitimaJohn
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
innovationoecd
 
“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”
Claudio Di Ciccio
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
shyamraj55
 
OpenID AuthZEN Interop Read Out - Authorization
OpenID AuthZEN Interop Read Out - AuthorizationOpenID AuthZEN Interop Read Out - Authorization
OpenID AuthZEN Interop Read Out - Authorization
David Brossard
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
panagenda
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
Octavian Nadolu
 

Recently uploaded (20)

Infrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI modelsInfrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI models
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
 
UI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentationUI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentation
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
 
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
 
AI-Powered Food Delivery Transforming App Development in Saudi Arabia.pdf
AI-Powered Food Delivery Transforming App Development in Saudi Arabia.pdfAI-Powered Food Delivery Transforming App Development in Saudi Arabia.pdf
AI-Powered Food Delivery Transforming App Development in Saudi Arabia.pdf
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
 
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development ProvidersYour One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
 
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptxOcean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
 
“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
 
OpenID AuthZEN Interop Read Out - Authorization
OpenID AuthZEN Interop Read Out - AuthorizationOpenID AuthZEN Interop Read Out - Authorization
OpenID AuthZEN Interop Read Out - Authorization
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
 

Flyway _ A Database Version Management Tool

  • 1. Presented By: Muskan Gupta Flyway : A Database Version Management Tool
  • 2. Lack of etiquette and manners is a huge turn off. KnolX Etiquettes Punctuality Respect Knolx session timings, you are requested not to join sessions after a 5 minutes threshold post the session start time. Feedback Make sure to submit a constructive feedback for all sessions as it is very helpful for the presenter. Silent Mode Keep your screen on mute if there is nothing to say.
  • 3. Our Agenda 01 Naive approach to handle Database 02 What is Database Version Control? 03 Importance of Version Control 04 Flyway: Database Version Control Tool 05 How Flyway Works? 06 Flyway Migrations 07 Flyway Commands 08 Demo
  • 4. Naive approach to handle Database XYZ Database XYZ Project XYZ Database XYZ Project XYZ Database XYZ Project XYZ Database XYZ Project XYZ Database XYZ Project XYZ Database XYZ Project XYZ Database XYZ Project XYZ Database XYZ Project XYZ Database XYZ Project XYZ Database XYZ Project XYZ Database XYZ Project XYZ Database XYZ Project Multiple Users Multiple Environments XYZ Databse XYZ Project
  • 5. Naive approach to handle Database Problems with Naive approach - ● What state is the database in on this machine? ● Has this script already been applied or not? ● Has the quick fix in production been applied in test afterwards? ● How do you set up a new database instance?
  • 6. What is Database Version Control? ● Database version control is similar to application version control. ● Keep the track of all the changes done to your database by all the team members. ● We need to store the Data Definition Language (DDL) code for a database in a version control system. ● Also it should maintain a history of all the changes done to the database.
  • 7. Importance of Version Control 03 04 Better Collaboration Between Team Members Efficient and Scalable Deployments 01 02 Single Source of Truth Increased Visibility 05 06 Database Rollbacks Database Automation
  • 8. Flyway : Database Version Control Tool ● Version Control for your Database ● An Open Source tool for migration based database version control. ● It has a community as well as a teams version. ● Community Support is available for free version and Redgate Support is available for paid version. ● It provides multiple ways to use flyway. It has : ○ Command Line Client ○ API ○ Maven ○ Gradle
  • 9. How Flyway Works? Empty Database Flyway Migrations
  • 10. How Flyway Works? 1. Try to locate schema history table. A schema history table is a table that flyway uses to maintain the version. By having a look at the table flyway decides which migrations need to be applied and which migrations have already been implemented. 2. If schema history table is not found flyway will create the table in primary/default schema. 3. After creation of table, it will try to locate all the migrations at the migration location provided in configuration. 4. According to the version it will apply the migrations one by one in incremental fashion and update schema history table accordingly.
  • 11. Flyway Migrations In terms of Flyway all the changes to the database are temed as Migrations. Migrations are of 2 types : ● Versioned migration ○ Regular Versioned Migration ○ Undo Migration ● Repeatable migrationf Migrations can be written both in SQL and in Java. Flyway automatically discovers migrations on the filesystem and on the Java classpath. Within a single migration run, versioned migrations are applied first as per their version and repeatable migrations are always applied last, after all versioned migrations have been executed. Repeatable migrations are applied in the order of their description.
  • 12. Versioned Migrations From Flyway Documentation : Versioned migrations have a version, a description and a checksum. The version must be unique. The description is purely informative for you to be able to remember what each migration does. The checksum is there to detect accidental changes. Versioned migrations are the most common type of migration. They are applied in order exactly once. Versioned migrations are typically used for: ● Creating/altering/dropping tables/indexes/foreign keys/enums/UDTs/… ● Reference data updates ● User data corrections
  • 13. Undo Migrations From Flyway Documentation : Undo migrations are the opposite of regular versioned migrations. An undo migration is responsible for undoing the effects of the versioned migration with the same version. Undo migrations are optional and not required to run regular versioned migrations. Undo Migration seems nice but can break in practice. Preferred way is to maintain backward compatibility between the DB and all the other versions of code.
  • 14. Repeatable Migrations From Flyway Documentation : Repeatable migrations have a description and a checksum, but no version. Instead of being run just once, they are (re-)applied every time their checksum changes. They are typically used for ● (Re-)creating views/procedures/functions/packages/… ● Bulk reference data reinserts
  • 15. File Naming Convention V2__Add_new_table.sql Prefix Separator Suffix Version Description U2__Add_new_table.sql Prefix Separator Suffix Version Description R__Add_new_table.sql Prefix Separator Suffix Description Regular Versioned Migration Undo Migration Repeatable Migration The file name consists of the following parts: ● Prefix: V for versioned (configurable), U for undo (configurable) and R for repeatable migrations (configurable) ● Version: Version with dots or underscores separate as many parts as you like (Not for repeatable migrations) ● Separator: __ (two underscores) (configurable) ● Description: Underscores or spaces separate the words ● Suffix: .sql (configurable)
  • 17. Demo