Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Database Types #52

Closed
tsujigiri opened this Issue · 3 comments

2 participants

@tsujigiri
Collaborator

There are some columns with a type of string, that are used for other types. Not that it is highly important, but I think we should convert them.

I made a (incomplete) list:

  • table.column (desired type)
  • fitbit_bodies.weight (float)
  • fitbig_bodies.bmi (float)
  • fitbit_activities.steps (int)
  • fitbit_activities.floors (int)
  • fitbit_sleeps.minutes_awake (int)
  • fitbit_sleeps.minutes_asleep (int)
  • fitbit_sleeps.number_awakenings (int)
  • fitbit_sleeps.minutes_to_sleep (int)
  • fitbit_*.date_logged (date)
@philippbayer philippbayer was assigned
@philippbayer
Collaborator

Added a small migration in the latest commit, however, postgresql throws up stating "column "weight" cannot be cast to type double precision"

The Internet says to use "proper" pgSQL in the migration:
http://stackoverflow.com/questions/10343383/rails-migrations-tried-to-change-the-type-of-column-from-string-to-integer

Is there a nicer solution in pure Ruby or do I have to write the SQL?

@tsujigiri
Collaborator

See #54. That should do it.

@philippbayer
Collaborator

Aha, so that works :) Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.