Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document how to set up database permissions for schemas "history" and "temporal" #64

Open
roschaefer opened this issue Nov 21, 2017 · 0 comments

Comments

@roschaefer
Copy link
Contributor

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:

  1. Add a hint in the README
  2. Check for permissions and raise a more helpful error

Thoughts?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants