Latest Updates

Documenting code, one commit at a time.

Evolving Data Structures in Platform Notifications

The platform project is undergoing continuous improvement to enhance its notification system.

The Challenge: Data Structure Evolution

Initially, the notification system stored data in a simple text column. However, as the platform evolved, the need for richer, structured data within notifications became apparent. This required a transition to a more flexible data type.

The Solution:

Read more
PHP Laravel

Ensuring UUID Compatibility in Laravel Notifications

The Problem

In the Reimpact/platform project, we encountered an issue with how user IDs were handled in the notifications system. Specifically, the notifiable_id column in the notifications table was initially defined as a bigint. This caused problems when we started using UUIDs (Universally Unique Identifiers) for user IDs, particularly with PostgreSQL, as bigint columns cannot store

Read more
Laravel PHP

Streamlining Laravel Migrations: Removing Duplicates for Stability

When maintaining a Laravel application like Reimpact/platform, ensuring database migrations are clean and consistent is crucial for smooth deployments and upgrades. Duplicate migrations can lead to frustrating errors, especially in versioned environments.

The Problem: Duplicate Migrations

Imagine deploying a new version of your application only to encounter a "table already exists" error

Read more
PHP Laravel

Enhancing Data Flexibility in Reimpact/platform Notifications

This post discusses a recent enhancement to the Reimpact/platform project, focusing on improving the flexibility and querying capabilities of notification data.

The Challenge

Previously, notification data was stored in a less flexible format, making it difficult to perform complex queries or adapt to evolving data structures. To address this, a decision was made to migrate the notification

Read more
PHP Laravel

Streamlining Filament Database Notifications in Reimpact/platform

Reimpact/platform is undergoing enhancements to improve its notification system. A recent update focuses on integrating Filament database notifications more effectively.

The Enhancement

This update introduces a migration for the notifications table, specifically tailored for Filament database notifications. This ensures that the application is equipped to handle and store notifications

Read more

Tenant Schema Resetting Too Early: A Laravel Livewire Gotcha

The Reimpact/platform project focuses on providing a multi-tenant application structure. Recently, we encountered an issue with tenant database schemas being reset prematurely during Livewire updates. This post dives into the problem and the solution implemented.

The Problem

In a multi-tenant application, each tenant typically has its own database schema. We use middleware to set the correct

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

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