iamcal/sql-parser
Fast PHP parser for MySQL 5.7 CREATE TABLE statements. Converts schema SQL into an easy-to-use array describing tables, fields, indexes, and options. Designed to deconstruct valid DDL (not validate it); install via Composer.
CREATE TABLE statements for schema comparison, migration scripting, or database version control—without the overhead of full ORM dependencies. Fits scenarios like validating schema changes in pull requests or generating migration SQL from schema diffs.FLOAT(bits)), PostgreSQL, or non-MySQL databases. Avoid if community support is essential (0 dependents, minimal recent activity). For comprehensive schema management (e.g., full DDL parsing, migrations), use Laravel’s built-in tools or Doctrine DBAL instead.For executives: "This open-source package automates critical database safety checks by parsing MySQL schemas in milliseconds—used by Flickr and Tiny Speck to prevent deployment errors. It eliminates manual schema comparisons, reducing migration risks and saving engineering time with zero licensing costs."
For engineering: "It’s a battle-tested, high-performance MySQL 5.7 parser with clean API for extracting table structures. Integrates in minutes via Composer, handles edge cases like indexes and engine settings, and avoids the 60-second parsing bottlenecks of alternatives. Perfect for CI schema validation or migration tooling where speed and simplicity matter."
How can I help you explore Laravel packages today?