Skip to content

Fixed db:prepare task for multiple databases. - #36416

Merged
eileencodes merged 1 commit into
rails:masterfrom
freeletics:fix-db-prepare
Jun 5, 2019
Merged

eileencodes merged 1 commit into
rails:masterfrom
freeletics:fix-db-prepare

Conversation

@morgoth

@morgoth morgoth commented Jun 5, 2019

Copy link
Copy Markdown
Member

When one database existed already, but not the other,
during setup of missing one, existing database was wiped out.

Other issue caused by this - when using structure.sql , on existing database it was loaded again, resulting in error.

Issue was that when invoking rake task migrate and setup they were not scoped to the current connection, but repeated for all databases.

/cc @robertomiranda @eileencodes

When one database existed already, but not the other,
during setup of missing one, existing database was wiped out.
@eileencodes
eileencodes merged commit ccb3061 into rails:master Jun 5, 2019
eileencodes added a commit that referenced this pull request Jun 5, 2019
Fixed db:prepare task for multiple databases.
@eileencodes eileencodes added this to the 6.0.0 milestone Jun 5, 2019
@eileencodes

Copy link
Copy Markdown
Member

Backported to 6-0-stable

Migration.verbose = verbose_was
end

def dump_schema(configuration, format = ActiveRecord::Base.schema_format, spec_name = "primary")

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, please do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants