DbMigration can no longer be found

133 views
Skip to first unread message

Sybren Gjaltema

unread,
Mar 21, 2022, 9:32:49 AM3/21/22
to Ebean ORM
Hi!

I'm trying to upgrade from ebean 11.42.2 to 12.16.0, but in my migrations classes it seems the io.ebean.dbmigration.DbMigration class can no longer be imported. Did this class move somewhere else, or to a new/different dependency? I have dependencies on ebean, ebean-migration, and have tried ebean-ddlgen (although it seems these are internal ebean classes that I probably shouldn't touch anyway), and my IntelliJ could not find any dependencies with the class either.

I checked the documentation (https://ebean.io/docs/db-migrations/) but there the DbMigration class is also still used. What am I doing wrong?

Cheers,
Sybren

Rob Bygrave

unread,
Mar 21, 2022, 3:34:46 PM3/21/22
to ebean@googlegroups
Hi,

I believe you need to add ebean-ddl-generator as a test dependency.  Alternatively, you can add ebean-test as a test dependency and start using ebean-test to control ddl generation for testing with support for testing against docker database containers. 


---


In particular:

#2074 - Refactor extract ebean-ddlgen module. In future this module would expected to be a test only dependency

Moves the DDL generation for both "drop-all/create-all" and DB migration generation into it's own module. Initially this will be included as a dependency of ebean (our top level composite) but in a future release this will instead ONLY be a dependency of ebean-test - so only a test scope dependency.

This is because we typically only need to generate DDL for testing purposes and for to generate DB migrations (which is also typically test scope).

Applications wanting to use DDL generation at runtime (in a deployed application) would then explicitly include this dependency as a compile scope dependency.


Cheers, Rob.


--

---
You received this message because you are subscribed to the Google Groups "Ebean ORM" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ebean+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ebean/beefcb6b-9abc-4242-86dd-ac3f09514c4bn%40googlegroups.com.

Sybren Gjaltema

unread,
Mar 22, 2022, 9:30:15 AM3/22/22
to Ebean ORM
Hi Rob,

Thanks, adding ebean-test did the trick. I may be running into some other issues that arrise from my tests, but I'll try and get them working myself first before asking here (it has to do with @PrivateOwned being removed and orphanRemoval=true still throwing referential integrity constraint violations).

Cheers,
Sybren
Reply all
Reply to author
Forward
0 new messages