[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [kapua-dev] Database cleanup with liquibase
|
Just answered in the issue. :)
Claudio Mezzasalma | Eurotech
Hi Andrej,
Adding Kapua Dev list to CC, as other developers might ask similar questions.
Now broker applies [1] schema changes to the database on startup. So try to avoid executing scipts manually and let Liquibase do the job :) .
If you would like to clean database to empty state, use this [2] script.
I will be removing all the other drop scripts and have this single uber clean script instead. So we will end up with:
- create/seed scripts in classpath under liquibase/*.sql (those are executed by Liquibase)
- uber clean script [2] (this one is executed manually by developers or in unit tests)
Hi!
I saw you migrated the security tables to liquibase, which is nice and fine. I have a question, though.
I used to execute the table drop/table create/table seed combination of sql scripts in the test setup step to get a clean slate for each test
scenario. But now the create/seed scripts are gone.. There is also only an update method in the liquibase client too.
How can I do a database cleanup now?
Executing the drop script causes problems (the tests then complain that the athz_domain table does not exist) but if I don't, the persistence
manager complains about duplicate entries in the table.
I will be grateful for any hint.
Thanks!
BR,
Andrej
--