relations-sqlite 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-sqlite-0.6.2 → relations_sqlite-0.6.4}/PKG-INFO +11 -2
  2. {relations-sqlite-0.6.2 → relations_sqlite-0.6.4}/lib/relations_sqlite/table.py +5 -2
  3. {relations-sqlite-0.6.2 → relations_sqlite-0.6.4}/lib/relations_sqlite.egg-info/PKG-INFO +11 -2
  4. relations_sqlite-0.6.4/lib/relations_sqlite.egg-info/requires.txt +1 -0
  5. {relations-sqlite-0.6.2 → relations_sqlite-0.6.4}/setup.py +9 -2
  6. relations-sqlite-0.6.2/lib/relations_sqlite.egg-info/requires.txt +0 -1
  7. {relations-sqlite-0.6.2 → relations_sqlite-0.6.4}/LICENSE.txt +0 -0
  8. {relations-sqlite-0.6.2 → relations_sqlite-0.6.4}/README.md +0 -0
  9. {relations-sqlite-0.6.2 → relations_sqlite-0.6.4}/lib/relations_sqlite/__init__.py +0 -0
  10. {relations-sqlite-0.6.2 → relations_sqlite-0.6.4}/lib/relations_sqlite/clause.py +0 -0
  11. {relations-sqlite-0.6.2 → relations_sqlite-0.6.4}/lib/relations_sqlite/column.py +0 -0
  12. {relations-sqlite-0.6.2 → relations_sqlite-0.6.4}/lib/relations_sqlite/criteria.py +0 -0
  13. {relations-sqlite-0.6.2 → relations_sqlite-0.6.4}/lib/relations_sqlite/criterion.py +0 -0
  14. {relations-sqlite-0.6.2 → relations_sqlite-0.6.4}/lib/relations_sqlite/ddl.py +0 -0
  15. {relations-sqlite-0.6.2 → relations_sqlite-0.6.4}/lib/relations_sqlite/expression.py +0 -0
  16. {relations-sqlite-0.6.2 → relations_sqlite-0.6.4}/lib/relations_sqlite/index.py +0 -0
  17. {relations-sqlite-0.6.2 → relations_sqlite-0.6.4}/lib/relations_sqlite/query.py +0 -0
  18. {relations-sqlite-0.6.2 → relations_sqlite-0.6.4}/lib/relations_sqlite/sql.py +0 -0
  19. {relations-sqlite-0.6.2 → relations_sqlite-0.6.4}/lib/relations_sqlite.egg-info/SOURCES.txt +0 -0
  20. {relations-sqlite-0.6.2 → relations_sqlite-0.6.4}/lib/relations_sqlite.egg-info/dependency_links.txt +0 -0
  21. {relations-sqlite-0.6.2 → relations_sqlite-0.6.4}/lib/relations_sqlite.egg-info/top_level.txt +0 -0
  22. {relations-sqlite-0.6.2 → relations_sqlite-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-sqlite
3
- Version: 0.6.2
3
+ Version: 0.6.4
4
4
  Home-page: https://github.com/relations-dil/python-relations-sqlite
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-sqlite
13
22
 
@@ -22,6 +22,9 @@ class TABLE(relations_sqlite.DDL, relations_sql.TABLE):
22
22
 
23
23
  INDEXES = False
24
24
 
25
+ PRIMARY = "PRIMARY KEY (%s)"
26
+ PRIMARY_AUTO = False # the auto column is INTEGER PRIMARY KEY, already the key
27
+
25
28
  def name(self, state="migration", prefix='', rename=False):
26
29
  """
27
30
  Generate a quoted name, with table as the default
@@ -75,7 +78,7 @@ class TABLE(relations_sqlite.DDL, relations_sql.TABLE):
75
78
  "unique": {},
76
79
  }
77
80
 
78
- for attr in ["name", "store", "schema"]:
81
+ for attr in ["id", "name", "store", "schema"]:
79
82
  value = self.migration.get(attr, self.definition.get(attr))
80
83
  if value is not None:
81
84
  migration[attr] = value
@@ -83,7 +86,7 @@ class TABLE(relations_sqlite.DDL, relations_sql.TABLE):
83
86
  renames = {}
84
87
 
85
88
  for field in self.definition.get("fields", []):
86
- if field.get("inject") or field["name"] in self.migration.get("fields", {}).get("remove", []):
89
+ if field.get("inject") or field["name"] in self.migration.get("fields", {}).get("remove", []) or not field['store']:
87
90
  continue
88
91
  if field["name"] in self.migration.get("fields", {}).get("change", {}):
89
92
  migration["fields"].append({**field, **self.migration["fields"]["change"][field["name"]]})
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: relations-sqlite
3
- Version: 0.6.2
3
+ Version: 0.6.4
4
4
  Home-page: https://github.com/relations-dil/python-relations-sqlite
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-sqlite
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-sqlite",
10
- version="0.6.2",
17
+ version=version,
11
18
  package_dir = {'': 'lib'},
12
19
  py_modules = [
13
20
  'relations_sqlite',
@@ -23,7 +30,7 @@ setup(
23
30
  'relations_sqlite.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-sqlite",
29
36
  author="Gaffer Fitch",
@@ -1 +0,0 @@
1
- relations-sql>=0.6.7