Skip to content
This repository was archived by the owner on Apr 16, 2024. It is now read-only.

Conversation

zavan
Copy link

@zavan zavan commented Feb 17, 2021

This PR changes the TenantInitializer to use Apartment::Tenant.drop instead of the raw DROP SCHEMA IF EXISTS #{db_name} CASCADE SQL, which only works for PostgreSQL.

This allows the task to be used with MySQL (which has no CASCADE option), SQLite3 (which "drops databases" by deleting the DB file), and other adapters supported by apartment, besides PostgreSQL.

Fixes #13.

I also think that the task shouldn't drop existing tenants by default, but only if the user passes a "force" flag. But this is a separate issue.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Error while running bundle exec rake spree_shared:bootstrap['store1']

1 participant