Mike Rankin Games, Tech and other oddities

photo by Jon Tyson
My MySQL Naming Conventions

By Mike Rankin on Thursday, October 31, 2019

Welcome to my notebook

Just a few notes here to help me remember what I’ve decided on for naming object in MySQL. It should work for other databases as well, but there might be some additions.

Objects

No Quotes Quoted identifiers are hard to work with. I think I’ll just avoid them. That means no white space either.

Ex: Avoid names like "LastName" or "Large Boxes".

All Lowercase use all lower case letters for all object names. This aids portability if you have …

photo by Victor
.ccsv file format

By Mike Rankin on Tuesday, October 29, 2019

The Problem

When importing and exporting data between databases and spreadsheets and other programs, we often drop into one of the well-known file formats like .csv, .txt, .xml or .json. While these formats are great, they often pose problems like escaping certain characters that are used as delimiters. What we need is a simple format that protects our text from programming collisions and is reliable.

What’s old is new again

If you look at the basic ASCII character set You’ll see a …

photo by Buzz Anderson
CreateView issue in Liquibase

By Mike Rankin on Tuesday, October 8, 2019

Description

When using liquibase with mysql, we generally use the “CreateView” tag to add views in the XML. Normally this works fine and you can put just the query in the body of the tag.

One of the nice things I like to set up with views in liquibase is to create a file for each view with the name of the view. Then I can use the runOnChange=“true” attribute to allow me to edit the file later and have the changes applied to my db. I feels a little cleaner than adding …

photo by Jeremy Thomas
Static Amplify

By Mike Rankin on Sunday, September 15, 2019

AWS Amplify for a static website

Amplify is a recent addition to the line of services available on AWS. Its focus is on building what is known as “serverless” websites. While a bit of a misnomer because there are actually servers of some sort running behind the scenes, the maintenance and configuration of them is completely hidden from developers. You don’t have to designate servers, operating systems, VPCs (Virtual Private Clouds), etc.

Generally, serverless works with …

Store Procedures in MySQL with Liquibase

By Mike Rankin on Friday, August 23, 2019

Managing stored procedures in MySQL with Liquibase has been challenging for me. I could never seem to get it to work the way I wanted because the create or replace option is not supported.

I really wanted to be able to edit a big block of procedure code and use the runOnChange option of liquibase.

I tried using $$ to replace my delimiter but it would always throw an error telling me my syntax was wrong even though it would run in workbench.

Luckily, liquibase code is open source, so I pulled a …