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

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

Closed
6ewis opened this issue Jan 14, 2016 · 2 comments

Comments

@6ewis
Copy link

6ewis commented Jan 14, 2016

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'
@metaskills
Copy link
Member

Thanks for the comments. I think this issue duplicates two others. The first #317 as that pertains to different schemas and the :ruby schema dumper format. I think this is where you want to focus your attention.

The second is ActiveRecord's alternative structure dump. Basically now we have defncopy which I am almost sure may not be any better for you. The latest 0.9.5.beta versions of TinyTDS when compiled against the latest 0.95 FreeTDS have bugs fixed in defncopy, but that tool only goes so far. Please follow issue #437 for that. I suspect it'll be a few months at least till we see that one come to fruition.

@6ewis
Copy link
Author

6ewis commented Jan 18, 2016

@metaskills thanks for the prompt reply. I'll look into it

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

No branches or pull requests

2 participants