yhttp-dbmanager 8.0.1__tar.gz → 8.0.2__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.
- {yhttp_dbmanager-8.0.1/yhttp_dbmanager.egg-info → yhttp_dbmanager-8.0.2}/PKG-INFO +1 -1
- {yhttp_dbmanager-8.0.1 → yhttp_dbmanager-8.0.2}/tests/test_migrator.py +4 -0
- {yhttp_dbmanager-8.0.1 → yhttp_dbmanager-8.0.2}/yhttp/ext/dbmanager/__init__.py +1 -1
- {yhttp_dbmanager-8.0.1 → yhttp_dbmanager-8.0.2}/yhttp/ext/dbmanager/install.py +1 -2
- {yhttp_dbmanager-8.0.1 → yhttp_dbmanager-8.0.2}/yhttp/ext/dbmanager/migration.py +7 -1
- {yhttp_dbmanager-8.0.1 → yhttp_dbmanager-8.0.2/yhttp_dbmanager.egg-info}/PKG-INFO +1 -1
- {yhttp_dbmanager-8.0.1 → yhttp_dbmanager-8.0.2}/LICENSE +0 -0
- {yhttp_dbmanager-8.0.1 → yhttp_dbmanager-8.0.2}/README.md +0 -0
- {yhttp_dbmanager-8.0.1 → yhttp_dbmanager-8.0.2}/setup.cfg +0 -0
- {yhttp_dbmanager-8.0.1 → yhttp_dbmanager-8.0.2}/setup.py +0 -0
- {yhttp_dbmanager-8.0.1 → yhttp_dbmanager-8.0.2}/tests/test_cli_createdrop.py +0 -0
- {yhttp_dbmanager-8.0.1 → yhttp_dbmanager-8.0.2}/tests/test_cli_migration.py +0 -0
- {yhttp_dbmanager-8.0.1 → yhttp_dbmanager-8.0.2}/tests/test_cli_usercommand.py +0 -0
- {yhttp_dbmanager-8.0.1 → yhttp_dbmanager-8.0.2}/tests/test_dbmanager.py +0 -0
- {yhttp_dbmanager-8.0.1 → yhttp_dbmanager-8.0.2}/tests/test_dburi.py +0 -0
- {yhttp_dbmanager-8.0.1 → yhttp_dbmanager-8.0.2}/tests/test_install.py +0 -0
- {yhttp_dbmanager-8.0.1 → yhttp_dbmanager-8.0.2}/yhttp/ext/dbmanager/cli.py +0 -0
- {yhttp_dbmanager-8.0.1 → yhttp_dbmanager-8.0.2}/yhttp/ext/dbmanager/dbmanager.py +0 -0
- {yhttp_dbmanager-8.0.1 → yhttp_dbmanager-8.0.2}/yhttp/ext/dbmanager/uri.py +0 -0
- {yhttp_dbmanager-8.0.1 → yhttp_dbmanager-8.0.2}/yhttp_dbmanager.egg-info/SOURCES.txt +0 -0
- {yhttp_dbmanager-8.0.1 → yhttp_dbmanager-8.0.2}/yhttp_dbmanager.egg-info/dependency_links.txt +0 -0
- {yhttp_dbmanager-8.0.1 → yhttp_dbmanager-8.0.2}/yhttp_dbmanager.egg-info/requires.txt +0 -0
- {yhttp_dbmanager-8.0.1 → yhttp_dbmanager-8.0.2}/yhttp_dbmanager.egg-info/top_level.txt +0 -0
|
@@ -36,6 +36,10 @@ def test_migrator_upgrade_downgrade(migrator, mktmptree):
|
|
|
36
36
|
'0001-foo.py': foo_content,
|
|
37
37
|
'0002-bar.py': bar_content,
|
|
38
38
|
})
|
|
39
|
+
|
|
40
|
+
with pytest.raises(ValueError):
|
|
41
|
+
migrator.versions_directory
|
|
42
|
+
|
|
39
43
|
migrator.settings.directory = root
|
|
40
44
|
|
|
41
45
|
assert migrator.dbversion() == 0
|
|
@@ -15,8 +15,7 @@ def install(app, cliarguments=None):
|
|
|
15
15
|
|
|
16
16
|
@app.when
|
|
17
17
|
def ready(app):
|
|
18
|
-
if 'url' not in app.settings.db
|
|
19
|
-
'directory' not in app.settings.db.migration:
|
|
18
|
+
if 'url' not in app.settings.db:
|
|
20
19
|
raise ValueError(
|
|
21
20
|
'Please provide db.url configuration entry, for example: '
|
|
22
21
|
'postgres://:@/dbname'
|
|
@@ -111,7 +111,13 @@ class Migrator:
|
|
|
111
111
|
|
|
112
112
|
@cached_property
|
|
113
113
|
def versions_directory(self):
|
|
114
|
-
|
|
114
|
+
try:
|
|
115
|
+
vdir = self.settings.directory
|
|
116
|
+
except AttributeError:
|
|
117
|
+
raise ValueError(
|
|
118
|
+
'Please provide db.migration.directory configuration entry.'
|
|
119
|
+
)
|
|
120
|
+
|
|
115
121
|
if not os.path.exists(vdir):
|
|
116
122
|
os.mkdir(vdir)
|
|
117
123
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{yhttp_dbmanager-8.0.1 → yhttp_dbmanager-8.0.2}/yhttp_dbmanager.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|