The 90s are calling: they want their tables back. Unfortunately, you need them all for laying out your HTML emails...
When you need to store structured data (like Ruby hashes) in a single database column with ActiveRecord, a simple way...
Create a user without password (recommended) Replace newuser with your desired username: mysql -uroot -p CREATE USER 'newuser'@'localhost' IDENTIFIED...
When you have a large PG database, you may want to find out which tables are consuming the most disk...
The attached article explains options you have to store the order of items in a database table. The simplest solution...
Don't sum up columns with + in a sql-query if NULL-Values can be present. MySQL and PostgreSQL cannot...
geordi delete_dumps [directory] Recursively search for files ending in *.dump and offer to delete those. When no...
You might have some trouble running a Rails LTS 2 app with MySQL 5.7. If you don't want to...
MySQL and MariaDB have an SQL mode setting which changes how MySQL behaves. The SQL mode value is comprised of...
On your local system that only hosts non-critical development data and only you have access to, you can store...
Your default postgres user is named like your linux user. That default user has limited access privileges, which can cause...
Bundler::GemRequireError: There was an error while trying to load the gem 'mysql2'. Gem Load Error is: Incorrect MySQL client...
mysql> SELECT @@global.version; +------------------+ | @@global.version | +------------------+ | 5.6.30 | +------------------+ 1 row in set (0,00 sec) MySQL 5.6 Reference Manual says "BLOB and TEXT...
Understanding your type of cronjob Some cronjobs must only run on a single server. E.g. when you run nightly batch...
This is an extension to PostgreSQL vs MySQL: How to UPDATE using a JOIN. UPDATE employees SET department_name = departments.name...
TL;DR Use user.update!(remove_avatar: true) to delete attachments outside of forms. This will have the same behavior as...
This is a small example on how you can check if your Postgres index can be used by a specific...
This is painful. Consider using Microsoft Office or switching careers. If you need to write < 20 letters consider doing it...
This error is raised because your old database does not have a configured environment yet, which Rails 5 enforces.
You should avoid using application models in your migrations. But how else could you create records in a migration?
When writing XLSX files, there are gems like rubyXL or axlsx. While they do offer features like formatting or graphs...
PostgreSQL's Common Table Expressions (CTEs) can be used to extract sub-queries from bulky SQL statements into a temporary...
PostgreSQL supports the SQL OVERLAPS operator. You can use it to test if two date ranges overlap: => SELECT ('2001-02...
Git has two kind of tags: annotated lightweight Annotated tags are stored as full objects in the Git database. They...