Skip to content

rake db:structure:dump not working - database use multiple schemas. (sql server 2012) #436

@6ewis

Description

@6ewis

Note: The legacy database I'm dealing with use multiple schemas. When I run rake db:schema:dump, it returns an inaccurate representation of the database, and rake db:structure:dump returns

defncopy: error: [host].[database_with_multiple_schemas].dbo.[specific_table] not found
rake aborted! 
Note: dbo is the wrong schema but it uses it by default
Error dumping database

As per the doc (https://github.com/rails-sqlserver/AdventureWorks.Ruby#test-database-tasks) I added override_task.rb and databases.rake to fix defncopy oddities. However, after running rake db:structure: dump I get the following error:

NoMethodError: undefined method `push' for LL("structure", "db"):Rake::Scope
/home/ldackam/mergetool/lib/override_task.rb:14:in `override_task'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions