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

Schema load fails with views defined and existing tables #7

Open
liveh2o opened this issue Feb 21, 2015 · 0 comments
Open

Schema load fails with views defined and existing tables #7

liveh2o opened this issue Feb 21, 2015 · 0 comments
Labels

Comments

@liveh2o
Copy link
Owner

liveh2o commented Feb 21, 2015

When running db:schema:load, the following error is raised:

rake aborted!
ActiveRecord::StatementInvalid: PG::DependentObjectsStillExist: ERROR:  cannot drop table accounts because other objects depend on it
DETAIL:  view account_type_totals depends on table accounts
view daily_account_transaction_totals depends on table accounts
view monthly_account_transaction_totals depends on table accounts
HINT:  Use DROP ... CASCADE to drop the dependent objects too.
: DROP TABLE "accounts"

This is due to the fact that tables are created with :force => true, which drops the table if it exists. Per the error message, we may be able to modify the drop command to include cascading.

@liveh2o liveh2o added the bug label Feb 21, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant