-
-
Notifications
You must be signed in to change notification settings - Fork 955
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
Make it compatible with Yugabyte database #715
Comments
I guess you could migrate an postgres instance, dump the schema and use the dump to migrate your database. I'm sorry but for us it is already a lot of work to manage migrations for mysql, cockroach, postgres and sqlite, you will have to work around limitations by writing your own migrations. Please report if you succeed 😉 |
Thank you very much for the advice. Here are my results. First of all, I'm not very used to database management. Said that, I was able to migrate the database from postgres to yugabyte, but still unable to run Kratos (but is another problem, I will open a new issue for that). Everything is done with docker containers. What I did was:
As I said, I was able to migrate the database, but still unable to run Kratos (but I can't neither run Kratos alongside with postgres, so probably is a problem related to docker-compose configuration or Kratos configuration, although I use basically the one served as example on the git repository). One thing that still can't really picture, is what happens when the next update rolls out. I would be able to update the yugabyte schema? Or I will have to recreate everything again and re-import the data? |
Depends on the migration, if it is compatible with yugabyte you should be able to apply it using the postgres driver. But as you know, not all migrations are compatible and you will have to figure out a way to work around the specific problem. Another example is sqlite, it does not allow adding columns to existing tables. We have to work around that like in this migration. |
Yup, exactly! I'll be closing this one because compatibility with YugaByte is not something we can work on! |
Just coming across this - Yugabyte was built using the Postgres Query layer so there's actually a very good chance there is compatibility here. |
Alter commands have been improved. Is this still an issue? |
Hi,
I'm trying to use kratos with yugabyte database (using the postgress api) without success. Yugabyte is a relational distributed database that have a postgress api (with still some limitations, as with in here).
The problem comes when kratos tries to create/migrate the tables. This is the kind of error I get:
An error occurred while connecting to SQL: error executing 20191100000011_courier_body_type.postgres.up.sql, sql: ALTER TABLE "courier_messages" ALTER COLUMN "body" TYPE text, ALTER COLUMN "body" SET NOT NULL;: ERROR: This ALTER TABLE command is not yet supported. (SQLSTATE 0A000)
This is an known ongoing issue with ALTER sql sentence in yugabyte, link here.
I was thinking that maybe it is kind of "easy" to replace the problematic ALTER sentences and have it working with yugabyte. Such feature would be very handy for example when high availability is required.
The text was updated successfully, but these errors were encountered: