Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add error message when using runMany() and skip #604

Merged
merged 6 commits into from
Mar 5, 2023
Merged

Add error message when using runMany() and skip #604

merged 6 commits into from
Mar 5, 2023

Conversation

markstory
Copy link
Member

Applying skip to multiple profiles when using runMany() creates a problem that I don't think is solvable.

The problem boils down to skip is able to exclude some or all tables from a migration set (plugin or application). When we're attempting to reset both table schema and phinxlog state we can only operate at the connection level. Because both your plugin and application are using the same connection the queries we need to use to find which tables need to be dropped and which phinxlogs need to be reset pollute each other and overlap.

Because we don't have enough metadata to know which tables map to which phinxlog tables, and which migrations within those migration logs we can only operate on schema and phinxlogs in a coarse manner.

Refs #603

Applying `skip` to multiple profiles when using `runMany()` creates
a problem that I don't think is solvable.

The problem boils down to skip is able to exclude some or all tables
from a migration set (plugin or application). When we're attempting to
reset both table schema and phinxlog state we can only operate at the
connection level. Because both your plugin and application are using the
same connection the queries we need to use to find which tables need to
be dropped and which phinxlogs need to be reset pollute each other and
overlap.

Because we don't have enough metadata to know which tables map to which
phinxlog tables, and which migrations within those migration logs we can
only operate on schema and phinxlogs in a coarse manner.

Refs #603
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.

2 participants