Latest Updates

Documenting code, one commit at a time.

Evolving Database Schemas with PostgreSQL Compatibility in Mind

When working on Reimpact's platform, we often encounter scenarios where database schema changes are necessary to accommodate new features or optimize existing functionalities. Ensuring compatibility across different database systems, especially PostgreSQL, requires careful consideration and attention to detail.

The Challenge of Foreign Keys in PostgreSQL

PostgreSQL enforces strict type

Read more

Refactoring Database Schemas for Module-Specific Tables

We've been working on the Reimpact/platform project, and recently tackled a significant refactoring of our database schema. Our initial design had a mix of shared and module-specific tables within each tenant schema, which led to some challenges as the platform grew.

The primary goal of this refactoring was to improve modularity and maintainability by clearly separating module-specific data.

Read more

Scaling with Schemas: Multi-Tenancy Migration in Laravel

The Reimpact platform is undergoing a significant architectural shift, moving from a MySQL row-level multi-tenancy model to a more robust PostgreSQL schema-per-tenant setup. This post dives into the key considerations and steps involved in this migration, leveraging Laravel and Filament.

The Motivation for Schema-Based Tenancy

Row-level multi-tenancy in MySQL, while initially simpler to

Read more

Modernizing Platform Components with Laravel, Filament, and PostgreSQL

The platform project is undergoing a series of updates to enhance its architecture and developer experience.

Streamlining Panel Providers

Component registration is now more organized. The PackagingPanelProvider has been registered, ensuring that necessary components are readily available throughout the application. This centralizes the management of UI elements, improving maintainability.

Read more

Navigating the Data Migration Maze: MySQL to PostgreSQL

Migrating data between different database systems can be a complex undertaking. Recently, the team working on the platform navigated a significant data migration from MySQL to PostgreSQL. This post outlines some key considerations and challenges encountered during the process. These insights can help you avoid common pitfalls when undertaking similar migrations.

The Challenge

Read more

Prompting for Feedback: Balancing User Experience and Engagement

Collecting user feedback is crucial for iterative improvement in any application. However, the timing and method of prompting users for feedback can significantly impact their experience. In the Breniapp application, a new approach balances proactive engagement with user comfort.

The Feature: Just-in-Time Feedback Prompts

A Livewire component has been introduced to present users with a

Read more
PHP PostgreSQL

Graceful Handling of PostgreSQL Privileges in Platform Setup

Introduction

When deploying the Reimpact platform, ensuring a smooth setup process across different environments is crucial. This post addresses a common issue encountered during tenant schema population, specifically when the executing user lacks PostgreSQL superuser privileges. We'll explore the problem and how a simple try-catch block resolves it, enhancing the platform's robustness.

Read more

Enhancing Tenant Schema Population in Laravel

Introduction

When building multi-tenant applications with Laravel, managing database schemas for each tenant can become complex. We recently improved our tenant schema population process in the platform project to handle various edge cases and ensure data integrity across companies.

The Problem

Our initial schema population process had several limitations:

  1. PostgreSQL's
Read more

Multi-Tenancy in Laravel with PostgreSQL Schemas: A Migration Story

Introduction

Row-level filtering is common for multi-tenancy, but what if you need stronger isolation? At Reimpact's platform, we're migrating towards PostgreSQL schemas to achieve true tenant separation, leveraging Laravel, Filament, and the middleware pattern.

This post details our approach to dynamically setting the PostgreSQL search_path for each tenant, ensuring data isolation and

Read more