Archive — page 3
Posted on 21 March, 2024
I'm using the 11ty Syntax Highlighting Plugin to style code blocks on this blog. For the most part this has worked great, but I've noticed one thing which was irritating me — comments were not appearing on Mobile Safari on iOS devices.
This doesn't occur in desktop Safari, so is "obviously" a quirk with the iOS version. A little
searching turned up that the problem is that Prism adds a class comment which is then ignored
in the mobile version of Safari.
How to fix?
The Prism docs suggest using a plugin that allows for renaming of classes in config, but I don't think there's an (easy) way to get that working inside the 11ty plugin.
... morePosted on 19 March, 2024
As previously posted here and here PlanetScale are pulling their free tier.
I've already written about the process of changing the codebase to work with a different provider, but that still left a question: how to get my existing data out of PlanetScale and into Supabase?
Dumping PlanetScale
The only "easy" way to get data out of PlanetScale that I could find was using their CLI tool pscale
to create a MySQL dump. There are other (generic) ways to get data out of a MySQL database that may
be better, but none that I could get to work with PlanetScale.
This means having their CLI tooling installed on your local machine (or a virtual machine that you have control over) and then running:
... morePosted on 11 March, 2024
As previously posted the database provider for the LSERSA booking system is pulling their free tier.
Having done some searching, I determined that Supabase was the only alternative 'free tier' provider that I was prepared to trust. And a little more research shows that even their paid tier is quite affordable, starting at $25/month. Given that there are some limitations on the free tier (pausing after 1 week inactivity, and not having automated backups) it's likely that LSERSA will actually just switch to the paid account.
The pricing is "$25/month including $10 compute credits" — and that $10 basically buys a micro instance (I assume on AWS). So effectively it's $15/month for an account plus (from) $10/month for each database. There's some account limits (storage, transfer etc) beyond which additional fees apply, but the limits are more than enough for my purposes.
All of which has meant an update to the codebase. Originally I used PlanetScale's own package,
@planetscale/database, for making database calls. We're now moving to a Postgres-based provider,
and whilst there is a bespoke package I think it's better to use a provider-agnostic approach in
the rewrite. So, npm i postgres here we come.
Posted on 07 March, 2024
Unfortunate news from PlanetScale that they are retiring their free tier, effective from 6th April this year.
Not news that I wanted — the LSERSA booking system currently uses PlanetScale — but made worse by:
- tone of the message ("PlanetScale forever") which reads like a missive to their investors, not users
- I think that they've used the opportunity to increase prices (my recollection is that the paid plans started at $29, but pricing now is from $39)
- I'm not at all sure that they've actually informed users of the change; certainly I've seen nothing yet at the LSERSA email address that is registered for that account
Assuming we wanted to keep the same region, changing to a PlanetScale paid plan would actually cost $44/month; a quick peruse of AWS suggests that a single database instance there would probably cost between $15-20/month.
The only 'free tier' option that I'm prepared to think about is Supabase which I'm probably going to implement. Their free tier is more than adequate for out current use, and (at the moment anyway) their paid plans start from $25 so would be more palatable if they follow suit at some point.
... more