Skip to content

Conversation

srsbiz
Copy link
Contributor

@srsbiz srsbiz commented Dec 14, 2024

Q A
Type feature
BC Break no

Summary

This will allow to add queries that needs to be executed after changes made to schema object.

Reason for this change

When people need to write data in newly created table / added column, they probably resorts to calling $this->connection->executeStatement in postUp, and this may be wrong in at least two scenarios:

  1. When testing migration with --dry-run option, executeStatement is always called, since migration does not know about dry-run mode
  2. Such SQLs are not visible if executed with -vv or --write-sql options, since executeStatement does not log queries like addSql.

@srsbiz srsbiz changed the title Introduce addDefferedSql method in migration class Introduce addDeferredSql method in migration class Dec 16, 2024
This will allow to add queries that needs to be executed after changes
made to schema object.
@srsbiz srsbiz force-pushed the add-deferred-sql branch from 6f6ead1 to 2667666 Compare March 30, 2025 20:54
@srsbiz
Copy link
Contributor Author

srsbiz commented Mar 30, 2025

Failing check is caused by #1456

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant