amnesia
amnesia copied to clipboard
Database.create can't handle disk only storage?
How can I start Amnesia in disk_only_mode ?
I tried:
Database.create disk!: [node]
with result:
Database creation failure: [error: {:bad_type, Database, :disc_only_copies, :"smalldev@MacBook-Air"}, error: {:bad_type, Database.User, :disc_only_copies, :"smalldev@MacBook-Air"}, error: {:bad_type, Database.History, :disc_only_copies, :"smalldev@MacBook-Air"}]
What i'm doing wrong?
I figured out, that I need to destroy (already destroyed) schema and database under console to create disk only schema. After I do that it works as expected.
For anyone trying to create the database without the mix task and getting the same error above, I got it to work using the following:
Amnesia.Schema.create
Amnesia.start
Database.create!([disk!: [node]])
:ok = Database.wait(15000)