0
votes
2answers
143 views

postgresql rails price range filter with between

I have the following array of price ranges how can I perform a query to find the price range between these using and operator This is the array I have ["0-1000", "5001_15000", "15001_25000"] ...
0
votes
0answers
100 views

Rails app: errors moving from postgres to mysql on ubuntu ec2

So after some problems with postgres on rails ala this Postgres rails doesn't recognize user, I uninstalled postgres and decided to try mysql for my rails app. I installed mysql successfully, and ...
0
votes
0answers
209 views

Rails Mysql to Postgresql Float

I'm transferring my database from mysql to postgresql. I have a latitude and longitude column for one of my models: t.float :latitude t.float :longitude I'm using mysql2psql gem to load the ...
0
votes
0answers
105 views

Rails 4 Heroku Mysql to Postgres Dump Pending Migrations

I've converted my mysql db to postgres. I'm used the following to import it to the db: heroku pgbackups:restore database 'http://app.com' --app This creates all the tables and imports the data. ...
1
vote
4answers
453 views

Rails multitenant architecture, scoping access to multiple tenants

We have a single-tenant database architecture at the moment with MySQL running upward of 100 databases. We switch database connection on subdomain using the Apartment gem and all is dandy! However, ...
1
vote
1answer
785 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 ...
2
votes
1answer
386 views

Rails 3: Would PostgreSQL be a better fit than MySQL for partitioning tables?

Is Postgres a better option than MySQL for partitioning tables by date? How well does Postgres play with Rails and when it comes to partitioning tables? The purpose of my application will be to ...
1
vote
3answers
196 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 ...
0
votes
1answer
2k 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 ...
1
vote
1answer
197 views

PostgreSQL to MySQL Conversion (Ruby on Rails)

Is there any Ruby script for converting a PostgreSQL database to a MySQL database? I have searched many sites to no avail.