Rainy Sundays

Rich Gwilliam's digital shed

Database Migrations

Migrations are a relatively new concept, at least to the development market as I experience it. They've been in wide use in my experience for the last half decade or so.

The issue is that version management is an absolutely essential part of a modern system. But while it manages your .php and .css files just fine, modern web apps and CMSs use databases to store content and it's much more complicated to store changes to that.

You can't just chuck your .myd files or whatever into the repository because it'd just resubmit a massive file every time and not in meaningful changes.

Instead, changes to the database are stored in migration files; typically PHP files with a function to *add* the changes (an "up" function) and a function to *remove them* and restore the database to its previous state (a "down" function). These files, because they're readable PHP, are perfectly suitable for version management.

That means your database can be shifted from the state it needs to be in on the latest, bleeding edge version, back to last year's legacy mode, and back again in minutes and you can genuinely switch between branches on version management quickly, safely and efficiently.

I've used a couple of solutions for this; Phinx is a good stand-alone product for it, but Laravel has an extremely usable built-in option using its Eloquent ORM.

I've been using Database Migrations since Jul 2022 (3 years).

Engagements using Database Migrations

Full-stack Developer / Devops Engineer

Hidden

Jul 2022 - Jul 2023

At Hidden, I filled the role of an API Developer as well as a Devops Engineer. I updated and expanded existing legacy code to run on AWS Lambda functions for increased efficiency, and created Jenkins build servers for the Unity development team.

  • HTML
  • Vue
  • CSS
  • Javascript
  • Typescript
  • LAMP Stack Admin
  • Linux
  • Agile
  • Ops Development
  • Git
  • PHP
  • Amazon EC2
  • Amazon S3 Buckets
  • Amazon Lambda Functions
  • AWS Suite
  • Amazon API Gateway
  • Amazon Cloudflare
  • Postman
  • API development
  • High capacity systems
  • Stable Diffusion
  • Figma
  • FTP
  • Git
  • Phinx
  • Database Migrations
  • Jira
  • Project planning
  • CICD
  • Jenkins
  • Technical writing
  • Generative AI

Contract Senior Full-stack Developer

Polygon

Jul 2024 - Nov 2024

Maintenance and upgrade of a legacy native PHP 5.6 API with massive data sets to provide new functionality for clients both inside and outside the company.

  • PHP
  • HTML
  • CSS
  • Javascript
  • API development
  • Postman
  • Vue
  • Apache
  • Database Migrations
  • Agile
  • Git
  • SQL
  • NPM
  • Jira
  • CICD

Contract Senior Full-stack Developer

STS Commercial

Feb 2025 - Aug 2025

Development of high-precision bespoke analytics and diagnostic modules on a Laravel base to surface opportunities and weaknesses in extremely high-volume, fast moving Fintech data and fine-tune performance for emerging markets. Innovative and intuitive modelling of data, completely revolutionizing how stakeholders analyse performance.

  • Laravel
  • Javascript
  • CSS
  • HTML
  • PHP
  • API development
  • Vue
  • Database Migrations
  • Linux
  • Git
  • Docker
  • SQL
  • Figma
  • LAMP Stack Admin
  • BASH
  • NPM
  • NodeJS
  • Postman
  • High capacity systems
  • Ops Development
  • Jira
  • MAMP stack admin
  • Technical writing