Latest Updates

Documenting code, one commit at a time.

PHP CSS 10 posts
×
PHP Laravel

Refactoring Data Presentation in Reimpact/platform

The Reimpact/platform project is undergoing improvements to its data presentation layer, focusing on enhanced readability and structural clarity. This involves reformatting data reports to be more user-friendly and logically organized.

Enhanced Data Reporting

The recent work centers around improving the way data reports are rendered. Instead of repeating headers for each row in a data

Read more

Enhancing Report Generation in Reimpact/platform: Storing and Displaying Report Data

This post discusses recent enhancements to the report generation process within the Reimpact/platform project, focusing on storing and displaying the generated report data.

The Feature

The primary goal of these changes is to persist generated report data and provide flexible views for different report types. This involves adding a report_data column to the packaging_generated_reports

Read more

Refactoring Data Access in Reimpact Platform: Removing Redundant Relationships

Introduction

The Reimpact platform is undergoing continuous improvements to enhance its data model and overall efficiency. One recent focus has been on refining relationships between models to ensure data integrity and reduce redundancy.

The Challenge

In a recent update, a specific issue was identified within the LatestMassiveUploadsWidget. The MassiveUpload model, designed for

Read more

Recovering PostgreSQL Report Functions in Laravel

Introduction

When performing database migrations, especially in multi-tenant environments, it's crucial to ensure all aspects of the schema are correctly applied to each tenant. This post explores a scenario in a Laravel application where PostgreSQL functions were unintentionally dropped during a tenant migration and how they were recovered.

The Problem: Silently Missing Functions

Read more
PHP PostgreSQL

Seeding PostgreSQL: Avoiding SQL Escaping Issues

When working with databases, especially PostgreSQL, ensuring data integrity during the seeding process is crucial. A common pitfall involves SQL escaping issues, particularly when dealing with special characters within string values.

The Problem: Escaping Hell in Seed Migrations

Initial attempts to populate a database often involve seed migrations. These migrations contain SQL statements to

Read more

Multi-Tenancy Done Right: Tenant-Specific Database Tables

When building a multi-tenant application with Laravel and PostgreSQL, handling data isolation is crucial. One effective approach is to use separate database schemas for each tenant. This provides a high level of isolation, ensuring that data from different tenants remains completely separate. Let's explore how this works in practice within the Reimpact platform.

The Problem: Shared Tables

Read more

Improving Error Handling in the Reimpact/platform Project

This post details improvements to error handling within the Reimpact/platform project, focusing on delete operations and providing more specific and informative error messages.

The Problem

Previously, the platform had a generic catch-all for delete errors. This made it difficult to distinguish between expected errors, such as foreign key violations, and unexpected errors, hindering debugging

Read more

Ensuring Data Integrity: Restoring Global Rates in a Laravel Application

Introduction

Maintaining data accuracy across all tenants in a multi-tenant application can be challenging. This post explores how to correct an issue where global rates were inadvertently made tenant-specific in a Laravel application, impacting data integrity.

The Problem: Tenant-Scoped Rates

Originally, the rates table was intended to store global rates applicable to all tenants.

Read more

Tenant Context Troubles: Debugging Queue Deserialization in a Multi-Tenant Laravel App

In the Reimpact/platform project, we encountered a tricky issue with queue deserialization in our multi-tenant environment. This post details the problem, our investigation, and the solution we implemented.

The Problem

Our application uses a queue to generate reports. A GenerateReportJob is dispatched, serializing the GeneratedReport model.

Read more