Latest Updates

Documenting code, one commit at a time.

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

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
PHP Laravel

Tenant Migrations and the Perils of Implicit State

The Reimpact/platform project involves managing multi-tenant applications. One subtle issue arose related to running migrations within these tenants. The original approach, while seemingly straightforward, introduced an unexpected dependency on implicit state, leading to incorrect migration behavior.

The Problem

Initially, tenant migrations were executed using Laravel's

Read more

Tenant Migrations: Ensuring Data Consistency in Multi-Tenant Applications

When building multi-tenant applications with Laravel, ensuring each tenant's database schema is correctly migrated can be a challenge. In the Reimpact platform, we encountered issues with tenant schemas either re-running all migrations on each deploy or skipping them entirely. This led to potential data inconsistencies and application instability.

The Problem

Without a dedicated migration

Read more
PHP Laravel

Tenant Schema Migrations in Laravel: Automating Database Management

This post discusses automating tenant database migrations within a Laravel application, focusing on maintaining separate database schemas for each tenant.

The Challenge

In multi-tenant applications, managing database migrations across numerous tenants can be a complex and time-consuming task. Manually executing migrations for each tenant is prone to errors and inefficiencies.

Read more

Ensuring Tenant Context for Filament Uploads in Laravel

Introduction

When building multi-tenant applications with Laravel and Filament, it's crucial to ensure that operations are performed within the correct tenant context. This post addresses a common issue encountered when using Filament's massive upload feature where the tenant context was not active during Livewire form submissions, leading to data integrity violations.

The Problem: Tenant

Read more

Enhancements to Tenant Warehouse Management in Platform

Introduction

The Reimpact platform is undergoing improvements to its multi-tenancy architecture, specifically focusing on tenant warehouse management. This involves refining database queries and updating tenant schemas for better isolation and data integrity.

The Problem

Previously, the GeneratedReportResource was incorrectly querying the company_id on tenant-specific warehouse

Read more

Embracing Filament: Streamlining Testing in Laravel Projects

In modern Laravel projects, choosing the right tools is crucial for efficient development and maintainability. The Reimpact/platform project is undergoing a transition from Nova to Filament, aiming to leverage Filament's capabilities for streamlined administration interfaces. This transition impacts testing strategies, requiring a shift from Nova-specific tests to those aligned with Filament.

Read more