From ec3856a25c532b8b552a428c869bc8a47000b1de Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Tue, 10 Sep 2019 17:15:01 +0200 Subject: [PATCH] Propagate changes about revert mechanism and naming on migration 12 --- .../0012_postgresql_password_to_md5_authentication.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/yunohost/data_migrations/0012_postgresql_password_to_md5_authentication.py b/src/yunohost/data_migrations/0012_postgresql_password_to_md5_authentication.py index 5d36b3e23..636b4f12b 100644 --- a/src/yunohost/data_migrations/0012_postgresql_password_to_md5_authentication.py +++ b/src/yunohost/data_migrations/0012_postgresql_password_to_md5_authentication.py @@ -10,12 +10,7 @@ class MyMigration(Migration): all_hba_files = glob.glob("/etc/postgresql/*/*/pg_hba.conf") - def forward(self): + def run(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*)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))