mysql-patterns

Design advanced MySQL schema patterns for Laravel applications.

Updated Jan 6, 2023
One-click install
npx skills add https://github.com/pekral/phpstan-rules --skill mysql-patterns-pekral
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: mysql-patterns
Source: https://github.com/pekral/phpstan-rules/tree/main/.claude/skills/mysql-patterns
Command: npx skills add https://github.com/pekral/phpstan-rules --skill mysql-patterns-pekral

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill addresses the complexity of implementing advanced MySQL features in Laravel applications, ensuring that schema design and data access patterns remain performant, consistent, and deadlock-resistant.

Core Features & Use Cases

  • Advanced Schema Design: Provides patterns for JSON columns, generated columns, and table partitioning to handle complex data structures and large datasets.
  • Performance Optimization: Offers guidance on upserts, full-text search, and read/write splitting to maintain database efficiency.
  • Reliability & Safety: Includes strategies for deadlock handling, connection management, and ensuring data integrity through proper indexing and transaction management.

Quick Start

Use the mysql-patterns skill to design a migration for a large events table using range partitioning and a generated column for indexable JSON data.

Frequently Asked Questions about mysql-patterns

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I design a MySQL schema for large datasets in Laravel using table partitioning?

Design robust MySQL schemas in Laravel by applying architectural patterns for table partitioning and generated columns, enabling efficient data access and scalability for large datasets.

Can I index JSON columns in MySQL to improve Laravel application performance?

Index JSON columns in MySQL by using generated columns to extract and index specific JSON data, improving query performance and maintaining data access consistency within Laravel applications.

How do I prevent deadlocks when implementing MySQL transactions in Laravel?

Prevent deadlocks in MySQL transactions by applying deadlock-resilient transaction handling patterns, ensuring strict performance standards and data consistency during concurrent database operations in Laravel.

What is the best way to configure read-write splitting for high-traffic MySQL databases?

Configure read-write splitting for high-traffic MySQL databases by implementing architectural patterns that manage connection routing, maintaining database efficiency and reliability under heavy load.

Does this approach support upserts and full-text search optimization in MySQL?

This approach supports MySQL upserts and full-text search optimization by providing specific architectural patterns that enforce performance standards and version-specific compatibility checks within Laravel.