We've moved discussions to Discord

No support for MySQL?

I've just purchased Jumpstart but it appears it only supports Postgres and not MySQL?

And it's not just a case of adding the mysql2 gem as I've tried that. The database schema is using a few things such as jsonb
Chris Oliver
Yeah, officially it's only supporting Postgres. You should be able to convert it, but it might take some work.

MySQL JSON doesn't seem like it is nearly as full featured as Postgres JSON. The casting attribute to array doesn't seem valid for MySQL.

From a quick test: 
rails db:system:change --to=mysql

I had to modify the migrations to use `json` columns and remove the default values from them.
Also removed the `algorithm: :concurrently` line from a migration.

I also had to disable Plan `features` attribute since this seems like a Postgres only feature: https://api.rubyonrails.org/classes/ActiveRecord/Attributes/ClassMethods.html
To make the features on Plan work, it can probably just be added as a string array column for MySQL instead. We are just storing the array of features in the JSON column for Postgres, but it'd be fine to make this a separate column.

Everything seems to work fine with MySQL after that.
Chris Oliver
I still don't know if I want to officially support MySQL, but it looks like we could add some conditional things to our migrations to handle them nicely depending on the database being used.

https://stackoverflow.com/questions/6178303/database-specific-migration-code?noredirect=1&lq=1
Floris van Lint
Hello  Chris Oliver we are building an app that interfaces with (existing) mariadb / sql databases. We are having a hard time with converting from the default postgres, mostly because of the mysql2 gem.. do you have any other suggestions, despite it not being supported?
Chris Oliver
Floris van Lint You might be able to use Rails 6's multi-database support to use the primary db as Postgres and connect to the MySQL databases separately. 

We won't be officially supporting MySQL in Jumpstart Pro, but feel free to email me chris @ gorails.com with the issue you're running into and I'll try to help.
Floris van Lint
Thanks  Chris Oliver  we will look at the multi db support, that sounds like it would work. Our DB cluster does both MariaDB / Galera as well as postgresql, so that seems like a good fit.
suman kumar dey
do we have the mysql support now ?
Notifications
You’re not receiving notifications from this thread.