Oracle database support #365
Replies: 4 comments 2 replies
-
I'm not actively planning to add support but would accept a PR for this. It looks like there is a golang oracle driver available so it should be pretty straight forward. I'm not as familiar with Oracle but we would need docker-based integration tests set up for it as well to validate the functionality. |
Beta Was this translation helpful? Give feedback.
-
Looking forward in order to reason about how to add it. As Oracle drivers require OCI (rana/ora, goracle, godror), final dbmate package should need cgo. This shouldn't be an issue, if we add a caveat as done for SQLite. The main obstacle I see is that Oracle container images and client libraries require manual download from vendor site that makes tough to keep the simpleness in automatic test containers and pipeline. See:
In order to workaround this issue, the way I suggest is to add the oracle service as an optional additional yml override in docker-compose and an ad-hoc Oracle Makefile that references the optional service, but this leads to exclude Oracle tests from your standard build pipeline. What do you think about? Carlo |
Beta Was this translation helpful? Give feedback.
-
I worked on Oracle driver and I've just opened a PR (#129). There are two open points:
Unfortunately - having add oracle driver which points to OCI C library - the built executable won't build without CGO and will require oracle client installed for DBMate to work; I understand that this introduces a big restriction on the tool and maybe it's better to keep it as a standalone fork |
Beta Was this translation helpful? Give feedback.
-
Starting in 2020-09-06, a pure Go Oracle client was developed and is still under active development, which could be used for the client-side piece for dbmate's Oracle support. https://github.com/sijms/go-ora Since Oracle has made an official Docker image available of the server piece, it might be easier to implement this support in dbmate using the combination of these two pieces. Regarding schema dump for Oracle, the standard tool is called Data Pump, aka While you can use Data Pump to export entire tablespaces with data, its default mode is schema-only. Is anyone still seriously interested in using dbmate for managing migrations on Oracle databases? If there's sufficient interest, I could probably work on this, and in a way that involves very minimal change to dbmate. |
Beta Was this translation helpful? Give feedback.
-
Hi there,
thank you for the tool, it is great. Is there any plan to support Oracle databases too?
Carlo
Beta Was this translation helpful? Give feedback.
All reactions