Tagged Questions
1
vote
3answers
190 views
How to get the Sum of a Group of Records?
I am relatively new to rails and also sql. I am using postgres on production.
I have a Like model and through polymorphism, it has attributes likeable_type and likeable_id, this is how items in my ...
1
vote
1answer
517 views
Set/Change Rails id auto increment value
Is there a way for me to set the increment value of id in Rails? Instead of +1, to be +10 (or some other function I specify).
In MySQL there is an option @@auto_increment_increment. Is there a way to ...
0
votes
1answer
1k views
How to migrate a boolean field in MySQL to PostgreSQL in Heroku?
I have a application, running with MySQL in my local machine. There is a field I define as boolean in Rails, which is represent in 0 or 1 in MySQL.
I am now trying migrate to Heroku, which is using ...
0
votes
0answers
66 views
How to insert special characters and keywords into database using `ActiveRecord`
I've exported application code from a Ruby On Rails app that needs to be inserted into PostgreSQL and MySql using ActiveRecord. I've tried different escapes, but no luck. I've tried E and $$ for ...