Skip to main content

[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. :)

wt., 28 lut 2017 o 15:36 użytkownik Mezzasalma, Claudio <Claudio.Mezzasalma@xxxxxxxxxxxx> napisał:

Hi Henryk,

 

I pinged you on [1] since I think that you last commits may be involved. Could you please give any feedback when you have time?

 

Thanks!

 

[1] https://github.com/eclipse/kapua/issues/329

 

-- 

Claudio Mezzasalma | Eurotech

 

Da: <kapua-dev-bounces@xxxxxxxxxxx> per conto di Henryk Konsek <hekonsek@xxxxxxxxx>
Risposta: kapua developer discussions <kapua-dev@xxxxxxxxxxx>
Data: martedì 28 febbraio 2017 15:26
A: Josko Flander <andrej.nussdorfer@xxxxxxxxxxxx>
Cc: kapua developer discussions <kapua-dev@xxxxxxxxxxx>
Oggetto: Re: [kapua-dev] Database cleanup with liquibase

 

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)

 

Cheers!

 

 

 

wt., 28 lut 2017 o 09:32 użytkownik Andrej Nussdorfer <Andrej.Nussdorfer@xxxxxxxxxxxx> napisał:

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

--

--
Henryk Konsek

Back to the top