You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, phinx does not natively support specifying ALGORITHM=INSTANT for MySQL migrations. ALGORITHM=INSTANT allows for schema changes (like adding columns) without requiring a table copy or affecting existing data, offering significant performance and downtime advantages for compatible operations.
This feature would enhance the flexibility and efficiency of database schema migrations, especially for users leveraging MySQL 8.0+ where ALGORITHM=INSTANT is available for certain DDL operations.
Proposed Solution:
Introduce a method or syntax in migrations to allow developers to specify the use of ALGORITHM=INSTANT explicitly for operations that support it.
Example:
$table->addColumn('new_column', 'string', ['algorithm' => 'instant'])->update();
Ensure fallback behavior is clearly defined if ALGORITHM=INSTANT is unsupported by the MySQL version or for the requested operation.
Benefits
Reduces downtime and performance impact during migrations for supported schema changes.
Aligns phinx with modern database practices and MySQL optimizations.
MySQL documentation on ALGORITHM=INSTANT.
Adding this feature will provide a smoother migration experience, particularly for large-scale production environments. It would also make phinx more competitive by leveraging cutting-edge database features.
Please let me know if further clarification or input is required!
The text was updated successfully, but these errors were encountered:
abhikaddy
changed the title
Add Native Support for ALGORITHM=INSTANT in Migrations
Add Native Support for ALGORITHM=INSTANT in Migrations for MYSQL
Nov 26, 2024
Currently, phinx does not natively support specifying ALGORITHM=INSTANT for MySQL migrations. ALGORITHM=INSTANT allows for schema changes (like adding columns) without requiring a table copy or affecting existing data, offering significant performance and downtime advantages for compatible operations.
This feature would enhance the flexibility and efficiency of database schema migrations, especially for users leveraging MySQL 8.0+ where ALGORITHM=INSTANT is available for certain DDL operations.
Proposed Solution:
Introduce a method or syntax in migrations to allow developers to specify the use of ALGORITHM=INSTANT explicitly for operations that support it.
Example:
$table->addColumn('new_column', 'string', ['algorithm' => 'instant'])->update();
Ensure fallback behavior is clearly defined if ALGORITHM=INSTANT is unsupported by the MySQL version or for the requested operation.
Benefits
Reduces downtime and performance impact during migrations for supported schema changes.
Aligns phinx with modern database practices and MySQL optimizations.
MySQL documentation on ALGORITHM=INSTANT.
Adding this feature will provide a smoother migration experience, particularly for large-scale production environments. It would also make phinx more competitive by leveraging cutting-edge database features.
Please let me know if further clarification or input is required!
The text was updated successfully, but these errors were encountered: