MySQL

Mostly database snippets.

Jumbo list of most common datetime / timestamp functions in Redshift and MySQL

Sep 8th, 2018 in MySQL | Redshift

A list of common expressions for working with date, time, datetime, and timestamp columns in MySQL 5.7.x and Redshift.

Using Python enums in SQLAlchemy models

May 16th, 2018 in SQLAlchemy | MySQL | Python

How to use enums in your models to enforce value consistency.

Bash script to relink alembic migrations

Sick of `alembic merge heads` slowing down your builds? Here's a short bash script I wrote to rename your migration files and update its down revision.

Bash script to monitor instances and MySQL

A simple Bash script to check multiple server instances are responding, and rows are being added to a MySQL database.