Up your coding game and discover issues early. SonarLint is a free plugin that helps you find & fix bugs and security issues from the moment you start writing code. Install from your favorite IDE marketplace today. Learn more →
Top 23 Ruby Database Tool Projects
A performance dashboard for PostgresProject mention: Is there something like sentry.io, for checking how long rails queries and functions take to execute? | reddit.com/r/rails | 2022-04-03
https://github.com/ankane/pghero (open source equivalent to pganalyze)
Business intelligence made simpleProject mention: Italian watchdog bans use of Google Analytics | news.ycombinator.com | 2022-06-23
I use Ahoy too, but I don't have very good visibility into the data. I should spend more time building queries and creating charts. I should probably set up blazer as well: https://github.com/ankane/blazer
Truly a developer’s best friend. Scout APM is great for developers who want to find and fix performance issues in their applications. With Scout, we'll take care of the bugs so you can focus on building great things 🚀.
Versioned database views for RailsProject mention: Utilizando views SQL no Ruby on Rails | dev.to | 2022-03-28
Strategies for cleaning databases in Ruby. Can be used to ensure a clean state for testing.
Online MySQL schema migrationsProject mention: GitHub downtime root cause analysis | reddit.com/r/programming | 2021-12-03
No you didn't. They're doing what is often referred as "online schema change" using https://github.com/github/gh-ost (but the concept is the same than percona's pt-online-schema-change, or https://github.com/soundcloud/lhm.
lol_dba is a small package of rake tasks that scan your application models and displays a list of columns that probably should be indexed. Also, it can generate .sql migration scripts.
Build time-series-based applications quickly and at scale.. InfluxDB is the Time Series Data Platform where developers build real-time applications for analytics, IoT and cloud-native services in less time with less code.
Rails 4/5 task to dump your data to db/seeds.rbProject mention: Rails - A Hidden Gem: Seed Dump | dev.to | 2022-10-19
During the testing of this functionality, you're adding data to your database. Rather than resetting your database, what if you utilized the information you entered? What if this is how you could build your seed file, rather than creating it from scratch? Or what if you do some testing and just want to add a couple of live examples to your seed file? Enter Seed Dump.
Squasher - squash your old migrations in a single command
Adds foreign key helpers to migrations and correctly dumps foreign keys to schema.rb
Identify database issues before they hit production.Project mention: Troubleshooting a RoR Application in Production | reddit.com/r/rails | 2022-05-24
Start with finding mixing indexes: https://github.com/gregnavis/active_record_doctor
Advanced seed data handling for Rails, combining the best practices of several methods together.
Seedbank gives your seed data a little structure. Create seeds for each environment, share seeds between environments and specify dependencies to load your seeds in order. All nicely integrated with simple rake tasks.
:zap: Powerful tool for avoiding N+1 DB or HTTP queriesProject mention: N+1 problem will never be an issue with N1Loader gem | reddit.com/r/rails | 2022-01-22
Interesting, I've just been researching Dataloader implementations for Ruby and have between trying to decide between GraphQL::Dataloader, graphql-batch and BatchLoader. I'll give this a look as well. Can you also make API calls inside the loaders?
Polo travels through your database and creates sample snapshots so you can work with real world data in development.
Upsert on MySQL, PostgreSQL, and SQLite3. Transparently creates functions (UDF) for MySQL and PostgreSQL; on SQLite3, uses INSERT OR IGNORE.
The tool to avoid various issues due to inconsistencies and inefficiencies between a database schema and application models.Project mention: Enhanced ActiveRecord preloading | reddit.com/r/rails | 2022-05-19
Described issues may be found with DatabaseConsistency.
Database validations for ActiveRecordProject mention: Ecto's uniqueness constraint vs. Rails' uniqueness validation | news.ycombinator.com | 2022-05-21
Love this post, great exploration of the nuances of uniqueness validations.
I came here to mention that there is also the https://github.com/toptal/database_validations gem which allows you to handle uniqueness validations in Rails in a similar manner to Ecto.
Catch unsafe PostgreSQL migrations in development and run them easier in production (code helpers for table/column renaming, changing column type, adding columns with default, background migrations, etc).Project mention: Zero-downtime schema migrations for Ruby on Rails | reddit.com/r/ruby | 2022-05-25
For other people looking into zero-downtime migrations: you may also consider easier to use ruby-based tool for this https://github.com/fatkodima/online_migrations
Catch bad SQL queries before they cause problems in production
Find time-consuming database queries for ActiveRecord-based Rails Apps
Blazing fast pagination for ActiveRecord with deferred joins ⚡️Project mention: We switched to cursor-based pagination | news.ycombinator.com | 2022-08-21
There are ways to mitigate the (although not eliminate) the slowing down of offset/limit pagination in later pages. The technique is called a "deferred join" and it is most effective in MySQL. The basic idea is to paginate as little data as necessary, and then do a self-join to get the rest of the data for a single page.
You can read more about it here: https://aaronfrancis.com/2022/efficient-pagination-using-def... or here https://planetscale.com/blog/fastpage-faster-offset-paginati....
Cursor based pagination is wonderful, but sometimes you're stuck with offset/limit for whatever reason. Might as well make it fast.
Seamless second database integration for Rails.
Clean code begins in your IDE with SonarLint. Up your coding game and discover issues early. SonarLint is a free plugin that helps you find & fix bugs and security issues from the moment you start writing code. Install from your favorite IDE marketplace today.
Ruby Database Tools related posts
Rails - A Hidden Gem: Seed Dump
2 projects | dev.to | 19 Oct 2022
[AskJS] Is there any alternative to the strong migrations gem?
Adding first and last name to existing app running on Heroku
1 project | reddit.com/r/rails | 12 Sep 2022
Italian watchdog bans use of Google Analytics
4 projects | news.ycombinator.com | 23 Jun 2022
4 projects | reddit.com/r/rubyonrails | 6 Jun 2022
Using Scientist to Refactor Critical Ruby on Rails Code
3 projects | dev.to | 25 May 2022
Zero-downtime schema migrations for Ruby on Rails
1 project | reddit.com/r/ruby | 25 May 2022
A note from our sponsor - SonarLint
www.sonarlint.org | 2 Dec 2022
What are some of the best open-source Database Tool projects in Ruby? This list will help you:
|6||Large Hadron Migrator||1,773|