ActiveRecord adapter improvements

fractaledmind

Stephen Margheim

Posted on September 22, 2023

ActiveRecord adapter improvements

Ruby on Rails continues to be a lively and thriving framework. Unfortunately, when it comes to the database adapters, a vast majority of the attention and effort has been focused on the MySQL and PosgreSQL adapters. SQLite supports a large percentage of the database features that Rails has added support for in the recent past. So, today I am starting to do my part to make the developer experience of using Rails with SQLite as seamless and powerful as possible. Maybe you'll join me?


Today I opened my first few pull requests to begin improving Rails' SQLite3Adapter:

And this blog post is my personal declaration of intent—I am going to do my part in bringing as many of the newer ActiveRecord features to the SQLite adapter. From composite foreign keys to virtual columns, with auto-populated columns thrown in, SQLite will no longer lag behind PostgreSQL and MySQL.

But, this is no simple task, and I'm certain there are many more features beyond the ones I have bumped into. So, this post is also a call to action. If you are a SQLite and Rails enthusiast, join me! Let's start leveling up the SQLite3Adapter together. Because one step at a time, we can help surge the tide of SQLite in production usage for Rails applications.


That's it for today. But be on the lookout for a post on how supporting Rails' RETURNING feature opens up the possibility for UUIDs or ULIDs as primary keys.

💖 💪 🙅 🚩
fractaledmind
Stephen Margheim

Posted on September 22, 2023

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related

Local snapshots
code Local snapshots

September 22, 2023

ActiveRecord adapter improvements
code ActiveRecord adapter improvements

September 22, 2023

Array columns in SQLite
code Array columns in SQLite

September 12, 2023

Optimizing SQLite compilation
code Optimizing SQLite compilation

September 10, 2023

Setting up Litestream
code Setting up Litestream

September 9, 2023