relations-postgresql 0.6.2__tar.gz → 0.6.4__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.
Files changed (22) hide show
  1. {relations-postgresql-0.6.2 → relations_postgresql-0.6.4}/PKG-INFO +11 -2
  2. {relations-postgresql-0.6.2 → relations_postgresql-0.6.4}/lib/relations_postgresql/column.py +18 -0
  3. {relations-postgresql-0.6.2 → relations_postgresql-0.6.4}/lib/relations_postgresql.egg-info/PKG-INFO +11 -2
  4. relations_postgresql-0.6.4/lib/relations_postgresql.egg-info/requires.txt +1 -0
  5. {relations-postgresql-0.6.2 → relations_postgresql-0.6.4}/setup.py +9 -2
  6. relations-postgresql-0.6.2/lib/relations_postgresql.egg-info/requires.txt +0 -1
  7. {relations-postgresql-0.6.2 → relations_postgresql-0.6.4}/LICENSE.txt +0 -0
  8. {relations-postgresql-0.6.2 → relations_postgresql-0.6.4}/README.md +0 -0
  9. {relations-postgresql-0.6.2 → relations_postgresql-0.6.4}/lib/relations_postgresql/__init__.py +0 -0
  10. {relations-postgresql-0.6.2 → relations_postgresql-0.6.4}/lib/relations_postgresql/clause.py +0 -0
  11. {relations-postgresql-0.6.2 → relations_postgresql-0.6.4}/lib/relations_postgresql/criteria.py +0 -0
  12. {relations-postgresql-0.6.2 → relations_postgresql-0.6.4}/lib/relations_postgresql/criterion.py +0 -0
  13. {relations-postgresql-0.6.2 → relations_postgresql-0.6.4}/lib/relations_postgresql/ddl.py +0 -0
  14. {relations-postgresql-0.6.2 → relations_postgresql-0.6.4}/lib/relations_postgresql/expression.py +0 -0
  15. {relations-postgresql-0.6.2 → relations_postgresql-0.6.4}/lib/relations_postgresql/index.py +0 -0
  16. {relations-postgresql-0.6.2 → relations_postgresql-0.6.4}/lib/relations_postgresql/query.py +0 -0
  17. {relations-postgresql-0.6.2 → relations_postgresql-0.6.4}/lib/relations_postgresql/sql.py +0 -0
  18. {relations-postgresql-0.6.2 → relations_postgresql-0.6.4}/lib/relations_postgresql/table.py +0 -0
  19. {relations-postgresql-0.6.2 → relations_postgresql-0.6.4}/lib/relations_postgresql.egg-info/SOURCES.txt +0 -0
  20. {relations-postgresql-0.6.2 → relations_postgresql-0.6.4}/lib/relations_postgresql.egg-info/dependency_links.txt +0 -0
  21. {relations-postgresql-0.6.2 → relations_postgresql-0.6.4}/lib/relations_postgresql.egg-info/top_level.txt +0 -0
  22. {relations-postgresql-0.6.2 → relations_postgresql-0.6.4}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: relations-postgresql
3
- Version: 0.6.2
3
+ Version: 0.6.4
4
4
  Home-page: https://github.com/relations-dil/python-relations-postgresql
5
5
  Author: Gaffer Fitch
6
6
  Author-email: relations@gaf3.com
@@ -8,6 +8,15 @@ Classifier: Programming Language :: Python :: 3
8
8
  Classifier: License :: OSI Approved :: MIT License
9
9
  Description-Content-Type: text/markdown
10
10
  License-File: LICENSE.txt
11
+ Requires-Dist: relations-sql>=0.6.10
12
+ Dynamic: author
13
+ Dynamic: author-email
14
+ Dynamic: classifier
15
+ Dynamic: description
16
+ Dynamic: description-content-type
17
+ Dynamic: home-page
18
+ Dynamic: license-file
19
+ Dynamic: requires-dist
11
20
 
12
21
  # relations-postgresql
13
22
 
@@ -48,3 +48,21 @@ class COLUMN(relations_postgresql.DDL, relations_sql.COLUMN):
48
48
  cast = self.KINDS.get(self.migration.get("kind", self.definition["kind"]), self.KINDS["json"])
49
49
 
50
50
  sql.append(f'ALTER {self.name()} TYPE {cast} USING {self.name()}::{cast}')
51
+
52
+ def modify(self, indent=0, count=0, pad=' ', **kwargs):
53
+ """
54
+ MODIFY DLL, an id that stops being an auto int also loses the sequence default BIGSERIAL gave it
55
+ """
56
+
57
+ super().modify(indent=indent, count=count, pad=pad, **kwargs)
58
+
59
+ migration = self.migration
60
+
61
+ stops = migration.get("auto") is False or migration.get("kind", "int") != "int"
62
+
63
+ if self.definition.get("auto") and "default" not in migration and stops:
64
+
65
+ current = pad * (count * indent)
66
+ delimitter = f",\n{current}" if indent else ','
67
+
68
+ self.sql = delimitter.join(filter(None, [self.sql, self.UNSET_DEFAULT % self.name()]))
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: relations-postgresql
3
- Version: 0.6.2
3
+ Version: 0.6.4
4
4
  Home-page: https://github.com/relations-dil/python-relations-postgresql
5
5
  Author: Gaffer Fitch
6
6
  Author-email: relations@gaf3.com
@@ -8,6 +8,15 @@ Classifier: Programming Language :: Python :: 3
8
8
  Classifier: License :: OSI Approved :: MIT License
9
9
  Description-Content-Type: text/markdown
10
10
  License-File: LICENSE.txt
11
+ Requires-Dist: relations-sql>=0.6.10
12
+ Dynamic: author
13
+ Dynamic: author-email
14
+ Dynamic: classifier
15
+ Dynamic: description
16
+ Dynamic: description-content-type
17
+ Dynamic: home-page
18
+ Dynamic: license-file
19
+ Dynamic: requires-dist
11
20
 
12
21
  # relations-postgresql
13
22
 
@@ -0,0 +1 @@
1
+ relations-sql>=0.6.10
@@ -1,13 +1,20 @@
1
1
  #!/usr/bin/env python
2
2
 
3
+ import os
3
4
  from setuptools import setup
4
5
 
5
6
  with open("README.md", "r") as readme_file:
6
7
  long_description = readme_file.read()
7
8
 
9
+ version = os.environ.get("BUILD_VERSION")
10
+
11
+ if version is None:
12
+ with open("VERSION", "r") as version_file:
13
+ version = version_file.read().strip()
14
+
8
15
  setup(
9
16
  name="relations-postgresql",
10
- version="0.6.2",
17
+ version=version,
11
18
  package_dir = {'': 'lib'},
12
19
  py_modules = [
13
20
  'relations_postgresql',
@@ -23,7 +30,7 @@ setup(
23
30
  'relations_postgresql.table'
24
31
  ],
25
32
  install_requires=[
26
- 'relations-sql>=0.6.7'
33
+ 'relations-sql>=0.6.10'
27
34
  ],
28
35
  url="https://github.com/relations-dil/python-relations-postgresql",
29
36
  author="Gaffer Fitch",
@@ -1 +0,0 @@
1
- relations-sql>=0.6.7