Re: Migration struggles

Поиск
Список
Период
Сортировка
От Vijaykumar Jain
Тема Re: Migration struggles
Дата
Msg-id CAM+6J97VQRbWa9djZwDUjPJ5v5YjexYsrTbgcXSH4F_vvHyasA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Migration struggles  (Christian Lehmann <info@chlehmann.ch>)
Список pgsql-admin
On Tue, 3 Aug 2021 at 20:25, Christian Lehmann <info@chlehmann.ch> wrote:
Hi there
Well, migration itself won't be triggered by ansible (maybe in the
future, but then -c for sure will be used!). But I honestly did not
try --if-exists because there is no "create role abc if not exists".
But maybe it handles role-creation differently, I will try that.


there is no "create role if not exists",
it would use "if exists" to drop the objects and the create the objects normally.


from a dummy dumpall
egrep -i 'DROP|CREATE' dump.sql
-- Drop databases (except postgres and template1)
DROP DATABASE IF EXISTS vjain;
-- Drop roles
DROP ROLE IF EXISTS postgres;
DROP ROLE IF EXISTS vjain;
CREATE ROLE postgres;

and so on.. 

В списке pgsql-admin по дате отправления:

Предыдущее
От: Christian Lehmann
Дата:
Сообщение: Re: Migration struggles
Следующее
От: Eko Prasetiyo
Дата:
Сообщение: