chronomodel
chronomodel copied to clipboard
Document how to set up database permissions for schemas "history" and "temporal"
OK, just now I figured out the solution to my problem: Insufficient database permissions for the user on production. I had to
grant usage on schema history to "my_database_user";
grant usage on schema temporal to "my_database_user";
grant all privileges on all tables in schema history to "my_database_user";
grant all privileges on all sequences in schema history to "my_database_user";
grant all privileges on all tables in schema temporal to "my_database_user";
grant all privileges on all sequences in schema temporal to "my_database_user";
This is what I got after merging chronomodel
into master and running migrations on our production server:
def set_impression
@impression = Impression.find(params[:id])
end
leads to
ActiveRecord::UnknownPrimaryKey (Unknown primary key for table impressions in model Impression.):
and Impression.primary_key
is nil
. Even if the migrations have run successfully, when I ask Impression.chrono?
I get false
.
This was all not very self-explaining and it took me a while until I found out the source of the problem.
So my suggestion is to either:
- Add a hint in the README
- Check for permissions and raise a more helpful error
Thoughts?