Latest Updates

Documenting code, one commit at a time.

Improving Data Synchronization in Platform: Addressing Foreign Key Constraints and Memory Usage

Introduction

The Reimpact/platform project encountered challenges during data synchronization, specifically with foreign key constraints and memory exhaustion issues. This post outlines the problem, the solution implemented, and key takeaways for managing large-scale data transfers.

The Challenge

During the synchronization of a large dataset (1.45M rows) from a production MySQL database

Read more

Improving Database Compatibility and Code Maintainability in Laravel Projects

Introduction

Maintaining compatibility across different database systems and ensuring code consistency can be challenging in large Laravel projects. This post outlines how the Reimpact/platform project addressed these issues, specifically focusing on PostgreSQL compatibility and tenant table management.

The Challenge

When developing applications that need to support multiple database

Read more

Refactoring Database Schemas for Module-Specific Tables

We've been working on the Reimpact/platform project, and recently tackled a significant refactoring of our database schema. Our initial design had a mix of shared and module-specific tables within each tenant schema, which led to some challenges as the platform grew.

The primary goal of this refactoring was to improve modularity and maintainability by clearly separating module-specific data.

Read more

Scaling with Schemas: Multi-Tenancy Migration in Laravel

The Reimpact platform is undergoing a significant architectural shift, moving from a MySQL row-level multi-tenancy model to a more robust PostgreSQL schema-per-tenant setup. This post dives into the key considerations and steps involved in this migration, leveraging Laravel and Filament.

The Motivation for Schema-Based Tenancy

Row-level multi-tenancy in MySQL, while initially simpler to

Read more

Navigating the Data Migration Maze: MySQL to PostgreSQL

Migrating data between different database systems can be a complex undertaking. Recently, the team working on the platform navigated a significant data migration from MySQL to PostgreSQL. This post outlines some key considerations and challenges encountered during the process. These insights can help you avoid common pitfalls when undertaking similar migrations.

The Challenge

Read more
PHP MySQL AWS

Streamlining Local Development with Dynamic MySQL Configuration

Setting up a local development environment can often be a hurdle, especially when dealing with database credentials. Manually managing these credentials and ensuring they match the production environment can be time-consuming and error-prone. This is especially true for the Reimpact platform, where consistency between development and production environments is crucial.

The Problem: Hardcoded

Read more

Enhancing Tenant Schema Population in Laravel

Introduction

When building multi-tenant applications with Laravel, managing database schemas for each tenant can become complex. We recently improved our tenant schema population process in the platform project to handle various edge cases and ensure data integrity across companies.

The Problem

Our initial schema population process had several limitations:

  1. PostgreSQL's
Read more
PHP MySQL

Refactoring Generated Reports: Removing Redundant Data Calculations

When working on the Reimpact platform, a key aspect is ensuring data accuracy and efficiency. Recently, we addressed an issue within the generated reports functionality. The goal was to streamline data processing and eliminate redundant calculations, resulting in a more efficient system.

Identifying the Issue

The initial analysis revealed that certain data points within the generated reports

Read more
PHP MySQL

Seeding Initial Data in Reimpact Platform

Introduction

When bootstrapping a new environment for the Reimpact platform, it's often necessary to populate the database with initial data. This post details how we approached seeding rate data from a production MySQL dump into a new PostgreSQL instance, focusing on an idempotent migration strategy.

The Challenge

We needed to migrate 448 rows of rate data from an existing MySQL

Read more