Skip to main content
Your Laravel migrations are already the definitive source of truth for your database schema. Geni takes advantage of that fact by parsing your migration files directly — in timestamp order — and replaying them into an in-memory schema representation. The result is a complete, accurate picture of your table structure that Geni uses to map route parameters, model attributes, and response shapes to their correct OpenAPI types, all without ever opening a database connection.

Supported Blueprint Methods

Geni recognizes all standard Laravel migration Blueprint methods and maps them to their corresponding OpenAPI type and format. Use the table below as a reference when writing or reviewing migrations — if a column is declared with any of these methods, Geni will infer its schema automatically.

Supported Migration Operations

Geni doesn’t just read the initial table definitions — it tracks the full chronological evolution of your schema across every migration file. The following operations are all recognized and applied in order:
  • Table creationSchema::create('users', function (Blueprint $table) { ... })
  • Table alterationSchema::table('users', function (Blueprint $table) { ... })
  • Adding columns — New columns added to existing tables via alteration migrations
  • Dropping columns$table->dropColumn('legacy_field') removes the column from the in-memory schema
  • Renaming columns$table->renameColumn('old', 'new') updates the column name in place
  • Dropping tablesSchema::drop('posts') and Schema::dropIfExists('tags') remove the table entirely
  • Renaming tablesSchema::rename('old_name', 'new_name') carries all columns forward under the new name
  • Macro expansionid(), timestamps(), morphs(), nullableMorphs(), uuidMorphs(), and foreignIdFor() are all expanded into their constituent columns

Schema Overrides Escape Hatch

Geni handles the full range of standard Laravel migration patterns, but some codebases include raw SQL statements or third-party macros that cannot be resolved through static parsing alone. For these cases, you can define manual overrides directly in config/geni.php.
config/geni.php
When Geni encounters a column it could not resolve from your migration files, it checks schema_overrides before falling back to a default type of string. Override entries are keyed as table.column and accept any valid OpenAPI primitive type (string, integer, number, boolean, object, array).
Use schema_overrides when your migrations contain DB::statement("ALTER TABLE ...") calls, rely on unresolvable third-party Blueprint macros, or when a column is managed entirely outside of Laravel’s migration system. For all standard Blueprint methods, no overrides are needed.