Supported Blueprint Methods
Geni recognizes all standard Laravel migrationBlueprint 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 creation —
Schema::create('users', function (Blueprint $table) { ... }) - Table alteration —
Schema::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 tables —
Schema::drop('posts')andSchema::dropIfExists('tags')remove the table entirely - Renaming tables —
Schema::rename('old_name', 'new_name')carries all columns forward under the new name - Macro expansion —
id(),timestamps(),morphs(),nullableMorphs(),uuidMorphs(), andforeignIdFor()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 inconfig/geni.php.
config/geni.php
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.