zlacker

[parent] [thread] 3 comments
1. daenz+(OP)[view] [source] 2021-12-18 05:10:47
Do you have to set up the triggers, tables, and procedures beforehand or how does that work?
replies(1): >>option+ZF
2. option+ZF[view] [source] 2021-12-18 13:50:11
>>daenz+(OP)
The libraries create their own tables, triggers etc during initialization.
replies(1): >>daenz+cS3
◧◩
3. daenz+cS3[view] [source] [discussion] 2021-12-19 18:31:07
>>option+ZF
So your application needs privileged access (to create tables, triggers, etc) to the database in order to run? That's an anti-pattern. Your deployed application should only need least privileges possible. If you need to do extra things to your database, it should be done in migrations, which should be more privileged, but now you've decoupled the creation of these extra db objects from the library itself, meaning if the library changes, your migrations will not be in sync.
replies(1): >>mlyle+VH4
◧◩◪
4. mlyle+VH4[view] [source] [discussion] 2021-12-19 23:59:49
>>daenz+cS3
No... JPA writes out a file with the necessary DDL and the administrator runs it.

If this is insufficient for more complicated migrations, there's tooling to support it. e.g. Flyway.

[go to top]