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

No Primary key in task_records #6

Open
theSteveMitchell opened this issue Sep 26, 2014 · 4 comments
Open

No Primary key in task_records #6

theSteveMitchell opened this issue Sep 26, 2014 · 4 comments
Labels

Comments

@theSteveMitchell
Copy link
Owner

Not necessarily a problem, but if you ever try to interact with task_records directly (query from rails console, for example) it'll throw an error.

  • Fix this
  • provide a migration path for those who've already installed
@theSteveMitchell
Copy link
Owner Author

Apparently this isn't an issue anymore. I can't remember the exact reason this was failing.

@jonahwh
Copy link

jonahwh commented Oct 6, 2015

I believe this is causing issues when trying to delete task records.

[3] pry(main)> TaskRecord.first.delete
  TaskRecord Load (0.4ms)  SELECT  "task_records".* FROM "task_records" LIMIT 1
NoMethodError: undefined method `to_sym' for nil:NilClass
from /home/rof/cache/bundler/ruby/2.2.0/gems/activerecord-4.2.1/lib/active_record/sanitization.rb:59:in `block in expand_hash_conditions_for_aggregates'

@fastjames
Copy link

Hello @theSteveMitchell , this issue is of special interest to me because postgresql has issues with tables lacking primary keys. From your entries here, I gather that it's OK to add a primary key to this table ourselves. Is that accurate?

@bendangelo
Copy link

I added a primary key and it seems fine to me.

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

No branches or pull requests

4 participants