pum 1.1.8__py3-none-any.whl → 1.1.9__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
pum/info.py CHANGED
@@ -3,9 +3,11 @@ import sys
3
3
  import psycopg
4
4
 
5
5
  from .pum_config import PumConfig
6
- from .schema_migrations import SchemaMigrations
6
+ from .schema_migrations import SchemaMigrations, MIGRATION_TABLE_NAME
7
7
 
8
8
  logger = logging.getLogger(__name__)
9
+ # set to info here
10
+ logger.setLevel(logging.INFO)
9
11
 
10
12
 
11
13
  def run_info(connection: psycopg.Connection, config: PumConfig) -> None:
@@ -17,14 +19,20 @@ def run_info(connection: psycopg.Connection, config: PumConfig) -> None:
17
19
 
18
20
  """
19
21
  try:
20
- schema_migrations = SchemaMigrations(connection, config)
21
- if not schema_migrations.exists():
22
+ schema_migrations = SchemaMigrations(config=config)
23
+ if not schema_migrations.exists(connection=connection):
22
24
  logger.info(
23
- f"No migrations found in {config.pum.migration_table_schema}.{config.pum.migration_table_name}."
25
+ f"No migrations found in {config.config.pum.migration_table_schema}.{MIGRATION_TABLE_NAME}."
24
26
  )
25
27
  else:
26
28
  # Add your logic for when migrations exist; for now, we simply print a message.
27
29
  logger.info("Migrations found.")
30
+ logger.info(
31
+ f"Schema migrations table: {config.config.pum.migration_table_schema}.{MIGRATION_TABLE_NAME}"
32
+ )
33
+ logger.info(
34
+ f"Version: {schema_migrations.migration_details(connection=connection)['version']}"
35
+ )
28
36
  except Exception:
29
37
  logger.exception("An error occurred while checking for migrations.")
30
38
  sys.exit(1)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pum
3
- Version: 1.1.8
3
+ Version: 1.1.9
4
4
  Summary: Pum stands for "Postgres Upgrades Manager". It is a Database migration management tool very similar to flyway-db or Liquibase, based on metadata tables.
5
5
  Author-email: Denis Rouzaud <denis@opengis.ch>
6
6
  License-Expression: GPL-2.0-or-later
@@ -7,7 +7,7 @@ pum/dependency_handler.py,sha256=34wvDGWlI-vsMFm1z0XcSDN2cnL_VFAh61GWmeYEzk4,384
7
7
  pum/dumper.py,sha256=EJZ8T44JM0GKgdqw1ENOfhZ-RI89OQ4DNdoTZKtLdEw,3404
8
8
  pum/exceptions.py,sha256=xyzzY4ht1nKfrVt59Giulflpmu83nJhxoTygrqiqPlw,1137
9
9
  pum/hook.py,sha256=5MrVa6Xr0o28RfsXylGDatlM_vOKfKtGJmhYx8crC94,9541
10
- pum/info.py,sha256=VSCUZJJ_ae-khKaudwbgqszZXBMKB_yskuQo5Mc1PgY,1024
10
+ pum/info.py,sha256=CGj-Lt4Y2l2ymAl3OFqCWfJD5xZF4aaUSztAiSKwgE4,1395
11
11
  pum/parameter.py,sha256=qdbWk3WZc419AW-qwGMxlgc-7GEhdwIoPBnDk6UsVZU,2485
12
12
  pum/pum_config.py,sha256=xTEdYh-628pnkoqH56NoPIuhIQauc1d6hksM8hcCCU4,11232
13
13
  pum/role_manager.py,sha256=yr-fmytflGqANY3IZIpgJBoMOK98ynTWfemIBhAy79A,10131
@@ -15,9 +15,9 @@ pum/schema_migrations.py,sha256=FiaqAbhFX7vd3Rk_R43kd7-QWfil-Q5587EU8xSLBkA,1050
15
15
  pum/sql_content.py,sha256=KoAa3CNVH_Hh6Z3FxpCYJCsG1NEiCRpfzlfP8wPFZHE,10414
16
16
  pum/upgrader.py,sha256=C0WRNm3A9wqossb-j2kaJBAnJpv7IDXNcc1MKlFg6z0,6684
17
17
  pum/conf/pum_config_example.yaml,sha256=_nwV_7z6S_Se-mejh_My0JFLY-A0Q4nigeLGPZAfcqg,424
18
- pum-1.1.8.dist-info/licenses/LICENSE,sha256=2ylvL381vKOhdO-w6zkrOxe9lLNBhRQpo9_0EbHC_HM,18046
19
- pum-1.1.8.dist-info/METADATA,sha256=DjE39lMpsDEsgxn_PBgBhebNT9Ro-v5EfEWnJTvtDys,3138
20
- pum-1.1.8.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
21
- pum-1.1.8.dist-info/entry_points.txt,sha256=U6dmxSpKs1Pe9vWiR29VPhJMDjrmZeJCSxvfLGR8BD4,36
22
- pum-1.1.8.dist-info/top_level.txt,sha256=ddiI4HLBhY6ql-NNm0Ez0JhoOHdWDIzrHeCdHmmagcc,4
23
- pum-1.1.8.dist-info/RECORD,,
18
+ pum-1.1.9.dist-info/licenses/LICENSE,sha256=2ylvL381vKOhdO-w6zkrOxe9lLNBhRQpo9_0EbHC_HM,18046
19
+ pum-1.1.9.dist-info/METADATA,sha256=6Dh9xnPMp0-TixMi_3dIKUwPe3Xf817LRsC29CS35u8,3138
20
+ pum-1.1.9.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
21
+ pum-1.1.9.dist-info/entry_points.txt,sha256=U6dmxSpKs1Pe9vWiR29VPhJMDjrmZeJCSxvfLGR8BD4,36
22
+ pum-1.1.9.dist-info/top_level.txt,sha256=ddiI4HLBhY6ql-NNm0Ez0JhoOHdWDIzrHeCdHmmagcc,4
23
+ pum-1.1.9.dist-info/RECORD,,
File without changes