Latest Updates

Documenting code, one commit at a time.

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

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

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

Enhancing Tenant Management and File Handling in Laravel Applications

Introduction

When building multi-tenant applications with Laravel, ensuring proper tenant context and efficient file handling are critical. Recent updates to the Reimpact platform focus on improving these aspects, streamlining tenant schema management and simplifying large file uploads.

Tenant Schema Isolation Improvements

Proper tenant schema isolation is essential for maintaining data

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