Source control for your database in five steps Hello! I am Deon - - PowerPoint PPT Presentation

source control for your database in five steps hello
SMART_READER_LITE
LIVE PREVIEW

Source control for your database in five steps Hello! I am Deon - - PowerPoint PPT Presentation

Source control for your database in five steps Hello! I am Deon Taljaard Application Developer Agenda Source control for databases? What is Liquibase? What are the benefits of using Liquibase? Demo Questions? Source


slide-1
SLIDE 1

Source control for your database in five steps

slide-2
SLIDE 2

I am Deon Taljaard

Application Developer

Hello!

slide-3
SLIDE 3

Agenda

◉ Source control for databases? ◉ What is Liquibase? ◉ What are the benefits of using Liquibase? ◉ Demo ◉ Questions?

slide-4
SLIDE 4

Source control for databases? 1

slide-5
SLIDE 5

We have all used source control software for our code Source control for databases? What about our databases?

◉ Manual approach ◉ Version SQL scripts ◉ Homegrown tool

slide-6
SLIDE 6

Consider the following scenarios: Source control for databases?

◉ A client has logged a defect and you need to restore your database to a state that matches a specific version of the code base the defect resides in ◉ What happens to the data in the database if the schema changes

slide-7
SLIDE 7

Problems with manually addressing scenarios: Source control for databases?

◉ Inconsistent application of changes ◉ Ineffective mechanisms for managing changes ◉ Changes may not have been communicated to the team ◉ Out of sync database between environments

slide-8
SLIDE 8

Source control for databases?

slide-9
SLIDE 9

There are tools available to cater for scenarios like these and many more Source control for databases? And more...

slide-10
SLIDE 10

Liquibase is NOT the only tool for doing this Source control for databases?

◉ If anything, I hope that at the end of the presentation all of us may realise the value and importance of employing such a technology in our software projects - and that you consider which tool will work for you and your projects.

slide-11
SLIDE 11

What is Liquibase and what is it used for? 2

slide-12
SLIDE 12

What is Liquibase?

◉ Liquibase is an open source database-independent library for tracking, managing and applying database schema changes ◉ It has an extensive feature set, yet it’s simple enough to get started with

slide-13
SLIDE 13

Core concepts for working with Liquibase: What is Liquibase?

◉ Changeset ◉ Changelog ◉ Databasechangelog ◉ Databasechangeloglock

slide-14
SLIDE 14

What are the benefits of using Liquibase? 3

slide-15
SLIDE 15

From the Liquibase site: What are the benefits of using Liquibase?

◉ Supports code branching and merging ◉ Supports multiple developers ◉ Supports multiple database types ◉ Supports XML, YAML, JSON and SQL formats ◉ Generate Database "diffs"

slide-16
SLIDE 16

Personal additions: What are the benefits of using Liquibase?

◉ It keeps all the changes to the db in one place ◉ It abstracts schema changes into a model, which is easily understandable ◉ All the changes do not have to be kept in one change log file - use sub changelogs and include in master changelog

slide-17
SLIDE 17

Personal additions: What are the benefits of using Liquibase?

◉ Makes applying DB changes quick, easy and safe ◉ We can integrate Liquibase into our build management to deal with database changes. So applying LiquiBase is just a click or two. ◉ The learning curve is steep, however first results are achieved quick

slide-18
SLIDE 18

Demo 4

slide-19
SLIDE 19

Two scenarios Demo

◉ Employing Liquibase from the inception of a project ◉ Adding Liquibase to an existing/legacy project

slide-20
SLIDE 20

Employing Liquibase from the inception of a project Demo

Add Liquibase Add master changelog Add changeset Liquibase update Commit changelog

slide-21
SLIDE 21

Demo

  • 1. Add Liquibase
slide-22
SLIDE 22

Demo

  • 2. Add master changelog
slide-23
SLIDE 23

Demo

  • 3. Add changeset
slide-24
SLIDE 24

Demo

  • 4. Run Liquibase update
  • 5. Commit changelog
slide-25
SLIDE 25

Adding Liquibase to an existing/legacy project Demo

Add Liquibase Generate changelog Commit changelog Add master changelog

slide-26
SLIDE 26

Demo

  • 1. Add Liquibase
slide-27
SLIDE 27

Demo

  • 2. Add master changelog
slide-28
SLIDE 28

Demo

  • 3. Run Liquibase generateChangeLog (with

changelogSync)

  • 4. Commit changelog(s)
slide-29
SLIDE 29

Any questions?

Thanks!

slide-30
SLIDE 30

Credits

Special thanks to all the people who made and released these awesome resources for free: ◉ Presentation template by SlidesCarnival