Re: Migration struggles

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 3 Aug 2021 at 20:25, Christian Lehmann <info@xxxxxxxxxxxx> 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.. 

[Index of Archives]     [Postgresql Home]     [Postgresql General]     [Postgresql Performance]     [Postgresql PHP]     [Postgresql Jobs]     [PHP Users]     [PHP Databases]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Yosemite Forum]

  Powered by Linux