mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Propagate changes about revert mechanism and naming on migration 12
This commit is contained in:
parent
dc7b8d1faa
commit
ec3856a25c
1 changed files with 1 additions and 6 deletions
|
@ -10,12 +10,7 @@ class MyMigration(Migration):
|
||||||
|
|
||||||
all_hba_files = glob.glob("/etc/postgresql/*/*/pg_hba.conf")
|
all_hba_files = glob.glob("/etc/postgresql/*/*/pg_hba.conf")
|
||||||
|
|
||||||
def forward(self):
|
def run(self):
|
||||||
for filename in self.all_hba_files:
|
for filename in self.all_hba_files:
|
||||||
pg_hba_in = read_file(filename)
|
pg_hba_in = read_file(filename)
|
||||||
write_to_file(filename, re.sub(r"local(\s*)all(\s*)all(\s*)password", "local\\1all\\2all\\3md5", pg_hba_in))
|
write_to_file(filename, re.sub(r"local(\s*)all(\s*)all(\s*)password", "local\\1all\\2all\\3md5", pg_hba_in))
|
||||||
|
|
||||||
def backward(self):
|
|
||||||
for filename in self.all_hba_files:
|
|
||||||
pg_hba_in = read_file(filename)
|
|
||||||
write_to_file(filename, re.sub(r"local(\s*)all(\s*)all(\s*)md5", "local\\1all\\2all\\3password", pg_hba_in))
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue