-
Prefixed ULID keys
I have written previously about using custom primary keys for your Rails app when using SQLite. In this post, I want to show how you can use the same
Continue reading …sqlite-ulid
extension to create prefixed ULIDs. Shout-out to Andy Stewart who suggested this. -
Introducing
litestream-ruby
I have already detailed why Litestream is essential for SQLite on Rails applications. But, as that original post makes clear, getting this utility setup and working in production requires some systems administration. Rails applications deserve better. Thus,
Continue reading …litestream-ruby
. -
Improving concurrency
Two months ago I released the
Continue reading …activerecord-enhancedsqlite3-adapter
gem, which adds a number of enhancements to theSQLite3Adapter
for ActiveRecord. Today I am releasing version 0.4.0 of the gem, which allows your Rails application to work in Puma’s clustered mode with multiple workers without getting those dreaded database deadlock errors. -
Improving the enhanced SQLite3 adapter
Two months ago I released the
Continue reading …activerecord-enhancedsqlite3-adapter
gem, which adds a number of enhancements to theSQLite3Adapter
for ActiveRecord. Today I am releasing version 0.3.0 of the gem, which adds an improved implemenation to handletimeout
s. -
Linear writes don't scale
One of the biggest myths around running SQLite in production for web applications is that it simply won’t scale beyond “toy/hobby” numbers, primarily because SQLite requires linear writes (that is, it doesn’t support concurrent writes). This isn’t true. Let’s dig into why.
Continue reading … -
Table Schema and Metadata
How can we get all of the information about a particular table in a SQLite database? The information is spread across several different sources, in various structures, and not so easy to collect into a single report. This post will show you how to get all of the information you need.
Continue reading … -
Don't use autoincrement primary keys
The SQLite documentation recommends not using
Continue reading …AUTOINCREMENT
for primary keys. Is this good advice for web applications? Turns out, the usually solid SQLite docs are wrong on this one. Let’s dig into why. -
Concurrent writes can corrupt the database file
There are a number of myths that have made their way into the “common knowledge” of developers that need busting. Today, I want to explore the myth that attempting concurrent writes from concurrent threads/processes to a single SQLite database file can corrupt that file. This isn’t true. Let’s dig into why.
Continue reading … -
Rails 7.1 and enhanced SQLite3 adapter
Rails version 7.1 was released recently and it includes a number of enhancements to the SQLite ActiveRecord adapter. There are a few enhancements that didn’t quite make it into the 7.1 release though, so today I am releasing the
Continue reading …activerecord-enhancedsqlite3-adapter
gem. -
September State of the Union
I wrote my first blog post about SQLite and Rails on September 6th. Today is September 27th; that is 3 weeks. A lot has happened in the last 3 weeks. Let’s recap.
Continue reading …