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

db:schema:load is not idempotent #130

Open
AlexKichkailo opened this issue Apr 3, 2024 · 0 comments
Open

db:schema:load is not idempotent #130

AlexKichkailo opened this issue Apr 3, 2024 · 0 comments

Comments

@AlexKichkailo
Copy link

If you try to run db:schema:load multiple times, an error is thrown

DB::Exception: Table <DB>.ar_internal_metadata already exists. **(TABLE_ALREADY_EXISTS)**

It appears that the clickhouse_structure.sql file generated by the clickhouse-activerecord adapter is missing DROP TABLE IF EXISTS statements.

In Rails, db:schema:load is supposed to be idempotent so it could be used to reset the DB in a test or dev environment.

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

1 participant