You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In my config, I have config.active_record.schema_format = :sql
When running bin/rails solid_cache:install, it creates a db/cache_schema.rb, which appears to then be swiftly ignored by Rails' db:prepare task.
As a result, the database gets created, but is empty... which leads to problems :)
I don't know if sql mode can be supported or not. But if not, I would suggest raising and error in bin/rails solid_cache:install is that config is :sql.
Thanks!
The text was updated successfully, but these errors were encountered:
this has just bitten me too, so here's a workaround that helped:
comment out config.active_record.schema_format = :sql
now, run bin/rails db:create:cache and bin/rails db:prepare DATABASE=cache
comment config.active_record.schema_format = :sql in again
run bin/rails db:schema:dump:cache
that way you end up with a not quite validcache_structure.sql. In my case, I had to manually add semicolons and remove the CREATE TABLE sqlite_sequence(name,seq); part.
here's the structure, for reference:
CREATETABLE "ar_internal_metadata" ("key"varcharNOT NULLPRIMARY KEY, "value"varchar, "created_at" datetime(6) NOT NULL, "updated_at" datetime(6) NOT NULL);
CREATETABLE "schema_migrations" ("version"varcharNOT NULLPRIMARY KEY);
CREATETABLE "solid_cache_entries" ("id"integerPRIMARY KEY AUTOINCREMENT NOT NULL, "key" blob(1024) NOT NULL, "value" blob(536870912) NOT NULL, "created_at" datetime(6) NOT NULL, "key_hash"integer(8) NOT NULL, "byte_size"integer(4) NOT NULL);
CREATEINDEX "index_solid_cache_entries_on_byte_size" ON"solid_cache_entries" ("byte_size");
CREATEUNIQUE INDEX "index_solid_cache_entries_on_key_hash" ON"solid_cache_entries" ("key_hash");
CREATEINDEX "index_solid_cache_entries_on_key_hash_and_byte_size" ON"solid_cache_entries" ("key_hash", "byte_size");
INSERT INTO"schema_migrations" (version) VALUES ('1');
In my config, I have
config.active_record.schema_format = :sql
When running
bin/rails solid_cache:install
, it creates adb/cache_schema.rb
, which appears to then be swiftly ignored by Rails'db:prepare
task.As a result, the database gets created, but is empty... which leads to problems :)
I don't know if sql mode can be supported or not. But if not, I would suggest raising and error in
bin/rails solid_cache:install
is that config is:sql
.Thanks!
The text was updated successfully, but these errors were encountered: