Skip to content

Include schema_migrations in the dump#2

Open
che-burashco wants to merge 1 commit intorailsware:masterfrom
che-burashco:patch-1
Open

Include schema_migrations in the dump#2
che-burashco wants to merge 1 commit intorailsware:masterfrom
che-burashco:patch-1

Conversation

@che-burashco
Copy link

No description provided.

@ayanko
Copy link
Member

ayanko commented Sep 17, 2014

Any explanation or benefit?

@che-burashco
Copy link
Author

schema_migrations table is a part of the data that should be dumped to structure.sql. If you look at the original task that is not patched in rails source code you will see that activerecord/lib/active_record/railties/databases.rake includes the following lines of code in the structure:dump rake task:

  if ActiveRecord::Base.connection.supports_migrations?
    File.open(filename, "a") { |f| f << ActiveRecord::Base.connection.dump_schema_information }
  end

This is done so that when rake db:reset is run you would be able to do rake db:migrate without any failures

vpuzzella added a commit to vpuzzella/db_structure_ext that referenced this pull request Jul 8, 2015
vpuzzella added a commit to vpuzzella/db_structure_ext that referenced this pull request Jul 8, 2015
vpuzzella added a commit to vpuzzella/db_structure_ext that referenced this pull request Dec 10, 2015
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