Jonathan Merriweather
Jonathan Merriweather
Is it to raise awareness or be in support of said comments? Because I can't tell, I'd imagine a lot of other people can't tell either. If you want to...
Just wanted to add, don't destroy the metadata. Will reset any indexes. Updated above comment to remove the following: ```elixir # get metadata for database metadata = Amnesia.Metadata.for(database) # destroy...
Is it due to defining User and Message twice with defmodule and deftable?
Why do you define separate structs for `User` and `Message`? Can't you just `alias Database.User` and `alias Database.Message` at the top of your file?
I'd also like to know how to do this, is it as simple as the following? ``` elixir Amnesia.Table.transform(Database.Table, [:id, :name, :new_attribute], fn(old) -> %{old | new_attribute: "default value"} end)...
I believe i've worked this out, needs to be the following: ``` elixir Amnesia.Table.transform(Database.Table, [:id, :name, :new_attribute], fn(old) -> old |> Tuple.append(new_attribute_value) end) ```
here are my exrm release tasks: ``` elixir def transform_table(full_table_name, attribute_list, attribute_values_list) do {:ok, _} = Application.ensure_all_started(:app) Amnesia.Table.transform(full_table_name, attribute_list, fn(existing_values) -> existing_values_as_list = existing_values |> Tuple.to_list existing_values_as_list ++ attribute_values_list |>...
@bradleyd I've noticed that if your data doesn't match your deftable it will not put it into a struct
Is the Message of the type bag? I believe if we need to delete items from a bag we need to use mnesia:delete_object Try doing the following: ``` elixir status...
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: ``` elixir Amnesia.Schema.create Amnesia.start Database.create!([disk!:...