Open AlexKichkailo opened 5 months ago
If you try to run db:schema:load multiple times, an error is thrown
db:schema:load
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.
clickhouse_structure.sql
DROP TABLE IF EXISTS
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.
If you try to run
db:schema:load
multiple times, an error is thrownIt appears that the
clickhouse_structure.sql
file generated by the clickhouse-activerecord adapter is missingDROP 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.