Git Product home page Git Product logo

aws-flyway-migration-lambda's Introduction

AWS Lambda Database Schema Migration

The database migrator is a java serverless application that can be used to make changes to a database schema. SQL-based migrations are typically used for:

  1. DDL changes (CREATE/ALTER/DROP statements for TABLES,VIEWS,TRIGGERS,SEQUENCES,โ€ฆ)
  2. Simple reference data changes (CRUD in reference data tables)
  3. Simple bulk data changes (CRUD in regular data tables)

It is an implementation of Boxfuse's Flyway migration tool for the serverless framework. As a result a flyway table is created in the database to track the migrations.

Adding a new migration

In order to add a new migration schema a new sql migration need to be provided in the folder src/main/resources/db/migration and follow the flyway naming standard seen below.

The file name consists of the following parts: image

  • Prefix: V for versioned, U for undo and R for repeatable migrations
  • Version: Version with dots or underscores separate as many parts as you like (Not for repeatable migrations)
  • Separator: __ (two underscores)
  • Description: Underscores or spaces separate the words
  • Suffix: .sql

The Flyway documentation link below describes the mechanism behind the 3 types of migration script described in the image above:
Flyway documentation

Deploying the function

Running the migration

aws-flyway-migration-lambda's People

Contributors

ajhelsby avatar dependabot[bot] avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.