pgconnect 0.3.2__tar.gz → 0.3.3__tar.gz

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pgconnect
3
- Version: 0.3.2
3
+ Version: 0.3.3
4
4
  Summary: A PostgreSQL connection and ORM library
5
5
  Home-page: https://github.com/AdnanBinPulok/PgConnect
6
6
  Author: AdnanBinPulok
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "pgconnect"
7
- version = "0.3.2"
7
+ version = "0.3.3"
8
8
  authors = [
9
9
  { name="Adnan Bin Pulok", email="adnanbinpulok@gmail.com" },
10
10
  ]
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
2
2
 
3
3
  setup(
4
4
  name='pgconnect',
5
- version='0.3.2',
5
+ version='0.3.3',
6
6
  author='AdnanBinPulok',
7
7
  author_email='adnanbinpulok@gmail.com',
8
8
  description='A PostgreSQL connection and ORM library',
@@ -86,7 +86,6 @@ class Table:
86
86
  """
87
87
  try:
88
88
  if not self.indexes:
89
- print(f"No indexes defined for table {self.name}. Skipping index schema check.")
90
89
  return True
91
90
  connection = await self._get_connection()
92
91
  # if connection is busy wait 1 second and try again
@@ -94,7 +93,7 @@ class Table:
94
93
  # make sure nothing more than in that index is defined
95
94
  for key in index:
96
95
  if key not in ["name", "columns", "unique"]:
97
- print(f"Index {index['name']} has invalid key {key}. Skipping index schema check.")
96
+ print(f"Index {index['name']} has invalid key {key}. Skipping index schema check.\nExpected keys are: ['name', 'columns', 'unique']")
98
97
  return False
99
98
  return True
100
99
  except Exception as e:
@@ -120,12 +119,10 @@ class Table:
120
119
  WHERE tablename = '{self.name}';
121
120
  """
122
121
  existing_indexes = await connection.fetch(existing_indexes_query, timeout=self.timeout)
123
- print(f"Existing indexes for {self.name}: {existing_indexes}")
124
122
  # drop indexes that are not defined in the table
125
123
  for index in existing_indexes:
126
124
  index_name = index['indexname']
127
125
  if index_name == f"{self.name}_pkey":
128
- print(f"Skipping primary key index: {index_name}")
129
126
  continue
130
127
  if self.indexes:
131
128
  if not any(index_name == idx.get("name", None) for idx in self.indexes):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pgconnect
3
- Version: 0.3.2
3
+ Version: 0.3.3
4
4
  Summary: A PostgreSQL connection and ORM library
5
5
  Home-page: https://github.com/AdnanBinPulok/PgConnect
6
6
  Author: AdnanBinPulok
File without changes
File without changes
File without changes