Latest Updates

Documenting code, one commit at a time.

PHP

Tenant Schema Resolution in Reimpact Platform

Introduction

The Reimpact platform manages company report subscriptions. A recent update migrated subscription data to tenant-specific schemas. This post addresses an issue where hardcoded table names caused lookup failures and describes the solution: dynamic table resolution.

The Problem

After migrating the company_report_subscriptions table to tenant schemas (renamed to

Read more

Enhancing Filament Resource Testing with Pest and Tenant Awareness

Introduction

The Reimpact/platform project is undergoing improvements to its testing infrastructure, specifically focusing on Filament resources. The goal is to ensure comprehensive test coverage for CRUD operations across various resources, while also addressing tenant-specific data handling.

The Challenge

Previously, testing Filament resources lacked sufficient coverage, especially

Read more
PHP Laravel

Tenant Schema Migration in Reimpact Platform

The Reimpact platform is undergoing significant architectural changes to better support multi-tenancy. This post details recent efforts to fully migrate to a tenant-based schema, enhancing data isolation and scalability.

Completing the Tenant Migration

The focus has been on ensuring that all relevant models and database tables are correctly associated with the tenant schema.

Read more
PHP JUnit

Multi-Tenancy Refactoring in the Reimpact Platform

The Reimpact platform is undergoing a refactoring to better support multi-tenancy across its various modules. This involves isolating tenant-specific data and ensuring proper data access controls are in place. The recent changes focus on standardizing how models handle tenant information and streamlining queries.

Read more

Sequential Processing: Avoiding Async Pitfalls in Platform Development

When building complex platforms like Reimpact's platform, managing asynchronous tasks is crucial for performance. However, it's easy to fall into the trap of dispatching jobs asynchronously when a synchronous approach is actually required for data integrity.

The Problem: Race Conditions During Excel Uploads

Imagine a scenario where you're processing an Excel file containing products,

Read more

Tenant Schema Optimization in Reimpact Platform's Packaging Module

The Reimpact platform is undergoing continuous improvements to enhance its multi-tenancy capabilities. Recent work focuses on optimizing database queries within the Packaging module, ensuring data isolation and preventing errors in tenant-specific schemas.

The Problem

In a multi-tenant environment, each tenant operates within its own schema. The Packaging module, responsible for managing

Read more
PHP

Enhanced Data Visibility in the Reimpact Platform

The Reimpact platform is designed to streamline business processes. Recent improvements focus on enhancing data visibility and upload monitoring within the platform.

Improved Upload Monitoring

The latest updates bring significant enhancements to the massive upload index table, providing users with a clearer view of their data and upload statuses.

Read more

Making Database Migrations Idempotent: Preventing Duplicate Table Errors

This post discusses how to create idempotent database migrations, specifically focusing on preventing duplicate table errors within the Reimpact/platform project.

The Problem

During development and deployment, database migrations are essential for evolving the application's schema. However, if migrations are not carefully designed, they can lead to issues, particularly when the same

Read more

Improving Migration Handling in the Reimpact Platform

Introduction

In the Reimpact platform, we recently addressed an issue related to how database table names were being handled during migration seeding. Specifically, the system wasn't accurately extracting table names from migration files, leading to discrepancies and potential errors.

The Problem

Previously, the migrationTableAlreadyCreated method relied on parsing table names directly

Read more

Simplifying Tenant Management in Reimpact Platform

The Challenge

In multi-tenant applications, managing data isolation is crucial. The Reimpact platform, designed for managing various industrial processes, initially relied on company_id filtering within each database table to achieve this isolation. This approach, while functional, introduced redundancy and complexity across our Eloquent models.

The Solution: PostgreSQL Schema Isolation

Read more