Delhi MuleSoft Meetup
Flyway Integration with MuleSoft
27th Aug 2022
11:00 AM IST
Organizer
Today’s Meetup Host
https://t.me/muleSoftStation
Shyam Raj Prasad
Senior Principal Engineer
Tricon Infotech Private Limited
About: Shyam Raj Prasad
● Working as Senior Principal Engineer at Tricon Infotech
Private Limited.
● 12+ years of Total Experience.
● 4+ years experience in Mulesoft.
● Certified MuleSoft Developer and Architect.
● Certified Liquibase Fundamentals
● Active on mulesoft help forum
Speaker
● Both the speaker and the host are organizing this meet-up in individual capacity only. We are
not representing our companies here.
● This presentation is strictly for learning purposes only. Organizer/Presenter do not hold any
responsibility that same solution will work for your business requirements.
● This presentation is not meant for any promotional activities.
5
Safe Harbour Statement
A recording of this meetup will be uploaded to events page within 24 hours.
Questions can be submitted/asked at any time in the Chat/Questions & Answers Tab.
Make it more Interactive!!!
Give us feedback! Rate this meetup session by filling feedback form at the end of the day.
We Love Feedbacks as it helps us to improve the sessions.
6
Housekeeping
7
A SHOW OF HANDS:
New Members With Us.!!
CHEERS…!!!
We have prizes to give away!
3 Winners a special prize is ready
Flyway
Database Change Management
9
Agenda
● Why Database Migrations?
● Flyway Introduction
● Flyway Migrations
● Flyway Commands
● Demo
10
● Multiple test and production stages
● Complicated in-house solution
● Goals:
○ Automatic deployment of database changes
○ Avoidance of human error factor
○ Control of the update process
Motivation
11
● Never use a shared database server for development work
● Always have a single, authoritative source for your schema
● Always version your database
Three rules for Database Work
12
● Treat database migrations as integral part of the project(db scripts
checked in source code repository)
● Fail-fast: check/migrate database at app startup
● Continuous Database integration
Best Practices
13
“Continuous Database Integration (CDBI) is the process of rebuilding
your database and test data at any time a change is applied to a
project’s version control repository”
(P. M. Duvall, S. Matyas, A. Glover, Continuous Integration)
Continuous Database Integration
14
● Liquibase
● Flyway
● MyBatis
● And a few dead projects:
○ dbdeploy(2009)
○ Migratedb(2014)
○ migrate4j(2008)
○ dbmaintain(2011)
○ autopatch(2014)
Database Migration Tools
15
● We used to maintain DB scripts(text based) and add them manually
to DB
● But there are more issues
○ easy to lost sync between code and DB state
○ hard to recover from error during development (ex: in case of applying
wrong statement to DB)
○ often require to re-create DB from scratch during development
○ hard to find out state of particular DB environment
● For these issues, Liquibase/flyway is a good solution
Why Database Migration tools ?
Development: Code side
16
Development: Database side (1/2)
17
Development: Database side (2/2)
18
Let’s compare
19
Let’s focus on database for once
20
Ever considered database migration?
21
Flyway
22
● Solves only one problem and solves it well
● Lightweight and easy to set up
● Continuous delivery - migrate database changes on application
startup or as a build pipeline
● Plain SQL update scripts
● Convention over configuration
Flyway
23
● Aurora MySQL
● Aurora PostgresSQL
● Azure Synapse
● Google BigQuery
● Cloud Spanner
● Cockroach DB
● DB2
● Derby
● Firebird
● H2
● HSQLDB
● Informix
● MariaDB
Supported Databases
● MySQL
● Oracle
● Persona XtraDB cluster
● PostgresSQL
● Redshift
● SAP Hana
● Snowflake
● SQLIte
● SQL Server
● Sybase ASE
● Test Containers
● TimeScale DB
● TIDB
● YugaByte DB
How flyway works?
24
How flyway works?
25
How flyway works?
26
Inside flyway_schema_history table
27
Ready to migrate
28
Result after migration
29
30
● Two types of Migrations
○ SQL-based
■ DDL Changes (CREATE/ALTER/DROP statements for tables,
views, triggers, sequences)
■ Simple reference data changes (CRUD in reference data
tables)
■ Simple bulk data changes (CRUD in regular data tables)
○ Java-based
Flyway Migrations
Flyway Migrations
31
Flyway Migrations
32
Flyway Migrations
33
Flyway Migrations Naming
34
In order to be picked up by Flyway, SQL
migrations must comply with the following
naming pattern:
● 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)
Where to store the migrations?
35
Where to store the migrations?
36
Flyway discovers SQL-based migrations from one or more directories referenced
by the locations property.
● Unprefixed locations or locations with the classpath: prefix target the Java
classpath.
● Locations with the filesystem: prefix search the file system.
● Locations with the s3: prefix search AWS S3 buckets. To use AWS S3, the
AWS SDK v2 and dependencies must be included, and configured for your
S3 account.
● Locations with the gcs: prefix search Google Cloud Storage buckets. To use
GCS, the GCS library must be included, and the GCS environment variable
GOOGLE_APPLICATION_CREDENTIALS must be set to the credentials file
for the service account that has access to the bucket.
Run the migrations
37
Let’s migrate using maven
38
Let’s migrate using maven
39
Flyway commands
40
Migrates the database Drops all objects in the configured
schemas
Prints the details and status
information about all the migrations
Validates the applied migrations
against the ones available on the
classpath
Repairs the schema history table
Baselines an existing database
Demo
Q&A
43
●Nominate yourself for the next meetup speaker and suggest a topic as well.
Take a Stand !
Get ready to WIN a Special Gift from MuleSoft Community
Quiz Time
45
● Share:
○ Tweet your pictures using the hashtag #MuleSoftMeetup
○ Invite your network to join: https://meetups.mulesoft.com/delhi/
● Feedback:
○ Fill out the survey feedback and suggest topics for upcoming events
○ Contact MuleSoft at meetups@mulesoft.com for ways to improve the program
○ Reach out to Delhi Meetup Leaders to suggest topics for next Meetup
What’s Next ?
46
● Anurag Sharma : https://www.linkedin.com/in/anurag-sharma-59745b20/
● Ankit Lawaniya: https://www.linkedin.com/in/ankit-lawaniya/
● Pryank Gupta: https://www.linkedin.com/in/gupta-pryank-24a1293b/
● Abhay Aggarwal: https://www.linkedin.com/in/abhay-agarwal-851121112/
● Minni Jajodia : https://www.linkedin.com/in/minni-jajodia/
Organizers :
Contact us for any query related to Today’s Meetup
Delhi_Meetup_flyway_Integration.pptx
Thank you
Don’t forget to provide the Feedback of this meetup

More Related Content

PPTX
Flyway
PDF
Embracing DevOps through database migrations with Flyway
PPTX
Evolutionary database design
PDF
Delivering Changes for Applications and Databases
PDF
Delivering changes for applications and databases
PPTX
Flyway (33rd Degree)
PPT
Evolutionary Database Design
Flyway
Embracing DevOps through database migrations with Flyway
Evolutionary database design
Delivering Changes for Applications and Databases
Delivering changes for applications and databases
Flyway (33rd Degree)
Evolutionary Database Design

Similar to Delhi_Meetup_flyway_Integration.pptx (20)

PPTX
Flyway: The agile database migration framework for Java
PDF
Database migrations with Flyway and Liquibase
PDF
Gaelyk - Web Apps In Practically No Time
PDF
Database Schema Evolution
PDF
[DevDay2018] Automate database migration using flyway framework - By Karthick...
PPTX
Getting started with agile database migrations for java flywaydb
PDF
Flyway _ A Database Version Management Tool
PDF
Javaone 2014
PPTX
Liquibase
PDF
Delivering changes for databases and applications
PPTX
#1 Calicut MuleSoft Meetup - Introduction to Enterprise Integration and MuleSoft
PPTX
Come Fly With Me: Database Migration Patterns with Flyway
PPTX
Retrofitting Continuous Delivery
PDF
Patterns and Tools for Database Versioning, Migration, Data Loading and Test ...
PDF
Workshop: Delivering chnages for applications and databases
PDF
CDC patterns in Apache Kafka®
PPTX
Database Migrations with Gradle and Liquibase
PPTX
Liquibase Integration with MuleSoft
PPTX
Anti-social Databases
PDF
Are we there Yet?? (The long journey of Migrating from close source to opens...
Flyway: The agile database migration framework for Java
Database migrations with Flyway and Liquibase
Gaelyk - Web Apps In Practically No Time
Database Schema Evolution
[DevDay2018] Automate database migration using flyway framework - By Karthick...
Getting started with agile database migrations for java flywaydb
Flyway _ A Database Version Management Tool
Javaone 2014
Liquibase
Delivering changes for databases and applications
#1 Calicut MuleSoft Meetup - Introduction to Enterprise Integration and MuleSoft
Come Fly With Me: Database Migration Patterns with Flyway
Retrofitting Continuous Delivery
Patterns and Tools for Database Versioning, Migration, Data Loading and Test ...
Workshop: Delivering chnages for applications and databases
CDC patterns in Apache Kafka®
Database Migrations with Gradle and Liquibase
Liquibase Integration with MuleSoft
Anti-social Databases
Are we there Yet?? (The long journey of Migrating from close source to opens...
Ad

More from AnuragSharma900 (7)

PPTX
London-MuleSoft-Meetup-April-19-2023
PPTX
AhmedabadMeetup_CustomerExperience_v2.pptx
PPTX
MuleSoft_Meetup_Exchange-Nexus-Publish_Asserts.pptx
PPTX
DelhiMeetup_AnypointMonitoring_v1.pptx
PPTX
Delhi MuleSoft Meetup - 19 march2022
PPTX
Api functional monitoring -9th October 2021
PPT
Meetup slide api_design_custom_poicies_in_mule4
London-MuleSoft-Meetup-April-19-2023
AhmedabadMeetup_CustomerExperience_v2.pptx
MuleSoft_Meetup_Exchange-Nexus-Publish_Asserts.pptx
DelhiMeetup_AnypointMonitoring_v1.pptx
Delhi MuleSoft Meetup - 19 march2022
Api functional monitoring -9th October 2021
Meetup slide api_design_custom_poicies_in_mule4
Ad

Recently uploaded (20)

PDF
Human Computer Interaction Miterm Lesson
PDF
LMS bot: enhanced learning management systems for improved student learning e...
PDF
Data Virtualization in Action: Scaling APIs and Apps with FME
PDF
ment.tech-Siri Delay Opens AI Startup Opportunity in 2025.pdf
PDF
EIS-Webinar-Regulated-Industries-2025-08.pdf
PDF
Ensemble model-based arrhythmia classification with local interpretable model...
PDF
Altius execution marketplace concept.pdf
PDF
Transform-Quality-Engineering-with-AI-A-60-Day-Blueprint-for-Digital-Success.pdf
PDF
5-Ways-AI-is-Revolutionizing-Telecom-Quality-Engineering.pdf
PDF
Decision Optimization - From Theory to Practice
PDF
CXOs-Are-you-still-doing-manual-DevOps-in-the-age-of-AI.pdf
PDF
Aug23rd - Mulesoft Community Workshop - Hyd, India.pdf
PDF
Electrocardiogram sequences data analytics and classification using unsupervi...
PDF
Transform-Your-Streaming-Platform-with-AI-Driven-Quality-Engineering.pdf
PDF
Dell Pro Micro: Speed customer interactions, patient processing, and learning...
PDF
Transform-Your-Supply-Chain-with-AI-Driven-Quality-Engineering.pdf
PDF
The AI Revolution in Customer Service - 2025
PDF
Advancing precision in air quality forecasting through machine learning integ...
PDF
CEH Module 2 Footprinting CEH V13, concepts
PDF
Build Real-Time ML Apps with Python, Feast & NoSQL
Human Computer Interaction Miterm Lesson
LMS bot: enhanced learning management systems for improved student learning e...
Data Virtualization in Action: Scaling APIs and Apps with FME
ment.tech-Siri Delay Opens AI Startup Opportunity in 2025.pdf
EIS-Webinar-Regulated-Industries-2025-08.pdf
Ensemble model-based arrhythmia classification with local interpretable model...
Altius execution marketplace concept.pdf
Transform-Quality-Engineering-with-AI-A-60-Day-Blueprint-for-Digital-Success.pdf
5-Ways-AI-is-Revolutionizing-Telecom-Quality-Engineering.pdf
Decision Optimization - From Theory to Practice
CXOs-Are-you-still-doing-manual-DevOps-in-the-age-of-AI.pdf
Aug23rd - Mulesoft Community Workshop - Hyd, India.pdf
Electrocardiogram sequences data analytics and classification using unsupervi...
Transform-Your-Streaming-Platform-with-AI-Driven-Quality-Engineering.pdf
Dell Pro Micro: Speed customer interactions, patient processing, and learning...
Transform-Your-Supply-Chain-with-AI-Driven-Quality-Engineering.pdf
The AI Revolution in Customer Service - 2025
Advancing precision in air quality forecasting through machine learning integ...
CEH Module 2 Footprinting CEH V13, concepts
Build Real-Time ML Apps with Python, Feast & NoSQL

Delhi_Meetup_flyway_Integration.pptx

  • 1. Delhi MuleSoft Meetup Flyway Integration with MuleSoft 27th Aug 2022 11:00 AM IST
  • 4. Shyam Raj Prasad Senior Principal Engineer Tricon Infotech Private Limited About: Shyam Raj Prasad ● Working as Senior Principal Engineer at Tricon Infotech Private Limited. ● 12+ years of Total Experience. ● 4+ years experience in Mulesoft. ● Certified MuleSoft Developer and Architect. ● Certified Liquibase Fundamentals ● Active on mulesoft help forum Speaker
  • 5. ● Both the speaker and the host are organizing this meet-up in individual capacity only. We are not representing our companies here. ● This presentation is strictly for learning purposes only. Organizer/Presenter do not hold any responsibility that same solution will work for your business requirements. ● This presentation is not meant for any promotional activities. 5 Safe Harbour Statement
  • 6. A recording of this meetup will be uploaded to events page within 24 hours. Questions can be submitted/asked at any time in the Chat/Questions & Answers Tab. Make it more Interactive!!! Give us feedback! Rate this meetup session by filling feedback form at the end of the day. We Love Feedbacks as it helps us to improve the sessions. 6 Housekeeping
  • 7. 7 A SHOW OF HANDS: New Members With Us.!! CHEERS…!!! We have prizes to give away! 3 Winners a special prize is ready
  • 9. 9 Agenda ● Why Database Migrations? ● Flyway Introduction ● Flyway Migrations ● Flyway Commands ● Demo
  • 10. 10 ● Multiple test and production stages ● Complicated in-house solution ● Goals: ○ Automatic deployment of database changes ○ Avoidance of human error factor ○ Control of the update process Motivation
  • 11. 11 ● Never use a shared database server for development work ● Always have a single, authoritative source for your schema ● Always version your database Three rules for Database Work
  • 12. 12 ● Treat database migrations as integral part of the project(db scripts checked in source code repository) ● Fail-fast: check/migrate database at app startup ● Continuous Database integration Best Practices
  • 13. 13 “Continuous Database Integration (CDBI) is the process of rebuilding your database and test data at any time a change is applied to a project’s version control repository” (P. M. Duvall, S. Matyas, A. Glover, Continuous Integration) Continuous Database Integration
  • 14. 14 ● Liquibase ● Flyway ● MyBatis ● And a few dead projects: ○ dbdeploy(2009) ○ Migratedb(2014) ○ migrate4j(2008) ○ dbmaintain(2011) ○ autopatch(2014) Database Migration Tools
  • 15. 15 ● We used to maintain DB scripts(text based) and add them manually to DB ● But there are more issues ○ easy to lost sync between code and DB state ○ hard to recover from error during development (ex: in case of applying wrong statement to DB) ○ often require to re-create DB from scratch during development ○ hard to find out state of particular DB environment ● For these issues, Liquibase/flyway is a good solution Why Database Migration tools ?
  • 20. Let’s focus on database for once 20
  • 21. Ever considered database migration? 21 Flyway
  • 22. 22 ● Solves only one problem and solves it well ● Lightweight and easy to set up ● Continuous delivery - migrate database changes on application startup or as a build pipeline ● Plain SQL update scripts ● Convention over configuration Flyway
  • 23. 23 ● Aurora MySQL ● Aurora PostgresSQL ● Azure Synapse ● Google BigQuery ● Cloud Spanner ● Cockroach DB ● DB2 ● Derby ● Firebird ● H2 ● HSQLDB ● Informix ● MariaDB Supported Databases ● MySQL ● Oracle ● Persona XtraDB cluster ● PostgresSQL ● Redshift ● SAP Hana ● Snowflake ● SQLIte ● SQL Server ● Sybase ASE ● Test Containers ● TimeScale DB ● TIDB ● YugaByte DB
  • 30. 30 ● Two types of Migrations ○ SQL-based ■ DDL Changes (CREATE/ALTER/DROP statements for tables, views, triggers, sequences) ■ Simple reference data changes (CRUD in reference data tables) ■ Simple bulk data changes (CRUD in regular data tables) ○ Java-based Flyway Migrations
  • 34. Flyway Migrations Naming 34 In order to be picked up by Flyway, SQL migrations must comply with the following naming pattern: ● 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)
  • 35. Where to store the migrations? 35
  • 36. Where to store the migrations? 36 Flyway discovers SQL-based migrations from one or more directories referenced by the locations property. ● Unprefixed locations or locations with the classpath: prefix target the Java classpath. ● Locations with the filesystem: prefix search the file system. ● Locations with the s3: prefix search AWS S3 buckets. To use AWS S3, the AWS SDK v2 and dependencies must be included, and configured for your S3 account. ● Locations with the gcs: prefix search Google Cloud Storage buckets. To use GCS, the GCS library must be included, and the GCS environment variable GOOGLE_APPLICATION_CREDENTIALS must be set to the credentials file for the service account that has access to the bucket.
  • 40. Flyway commands 40 Migrates the database Drops all objects in the configured schemas Prints the details and status information about all the migrations Validates the applied migrations against the ones available on the classpath Repairs the schema history table Baselines an existing database
  • 41. Demo
  • 42. Q&A
  • 43. 43 ●Nominate yourself for the next meetup speaker and suggest a topic as well. Take a Stand !
  • 44. Get ready to WIN a Special Gift from MuleSoft Community Quiz Time
  • 45. 45 ● Share: ○ Tweet your pictures using the hashtag #MuleSoftMeetup ○ Invite your network to join: https://meetups.mulesoft.com/delhi/ ● Feedback: ○ Fill out the survey feedback and suggest topics for upcoming events ○ Contact MuleSoft at [email protected] for ways to improve the program ○ Reach out to Delhi Meetup Leaders to suggest topics for next Meetup What’s Next ?
  • 46. 46 ● Anurag Sharma : https://www.linkedin.com/in/anurag-sharma-59745b20/ ● Ankit Lawaniya: https://www.linkedin.com/in/ankit-lawaniya/ ● Pryank Gupta: https://www.linkedin.com/in/gupta-pryank-24a1293b/ ● Abhay Aggarwal: https://www.linkedin.com/in/abhay-agarwal-851121112/ ● Minni Jajodia : https://www.linkedin.com/in/minni-jajodia/ Organizers : Contact us for any query related to Today’s Meetup
  • 48. Thank you Don’t forget to provide the Feedback of this meetup