SchemaUtils does not use configuration entries
Tochemey opened this issue · 2 comments
I have observed that the following configuration entries are ignored when using SchemaUtils.createIfNotExists()
- https://github.com/akka/akka-persistence-jdbc/blob/v5.0.0/core/src/main/resources/reference.conf#L139-L140
- https://github.com/akka/akka-persistence-jdbc/blob/v5.0.0/core/src/main/resources/reference.conf#L160-L161
- https://github.com/akka/akka-persistence-jdbc/blob/v5.0.0/core/src/main/resources/reference.conf#L299-L300
The same applies to legacy schema. This can be damaging to applications that do not use the default public postgres schema. Yeah someone can say that tool is merely for testing but I don't think dev should be copying db schemas all over the place for production. It is like telling someone after buying a car to also buy the engine before it can be driven. 😀
@Tochemey, the tool is for testing. By default, it loads schema we show in the docs.
It doesn't have the ambition to cover all the cases. However, there is an escape hatch if you need load a tweaked schema, for that you should use SchemaUtils.applyScript
. You can then pass whatever script you want.
I understand that it would be more convenient to have it reading the user defined configuration, but since there is already an escape hatch for that edge case, I'm not sure if it's worth the extra effort.