dmart 1.4.12__py3-none-any.whl → 1.4.14__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.
- alembic.ini +1 -1
- {dmart-1.4.12.dist-info → dmart-1.4.14.dist-info}/METADATA +1 -1
- {dmart-1.4.12.dist-info → dmart-1.4.14.dist-info}/RECORD +10 -10
- dmart.py +13 -21
- dmart_migrations/__pycache__/__init__.cpython-314.pyc +0 -0
- dmart_migrations/__pycache__/env.cpython-314.pyc +0 -0
- dmart_migrations/versions/__pycache__/b53f916b3f6d_json_to_jsonb.cpython-314.pyc +0 -0
- {dmart-1.4.12.dist-info → dmart-1.4.14.dist-info}/WHEEL +0 -0
- {dmart-1.4.12.dist-info → dmart-1.4.14.dist-info}/entry_points.txt +0 -0
- {dmart-1.4.12.dist-info → dmart-1.4.14.dist-info}/top_level.txt +0 -0
alembic.ini
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
[alembic]
|
|
4
4
|
# path to migration scripts
|
|
5
5
|
# Use forward slashes (/) also on windows to provide an os agnostic path
|
|
6
|
-
script_location =
|
|
6
|
+
script_location = dmart_migrations
|
|
7
7
|
|
|
8
8
|
# template used to generate migration file names; The default value is %%(rev)s_%%(slug)s
|
|
9
9
|
# Uncomment the line below if you want the files to be prepended with date and time
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
alembic.ini,sha256=
|
|
1
|
+
alembic.ini,sha256=zs8d8VhH9TRwZrPK697EZPBCfaKvI4SqTuGuG0FAm2Y,3747
|
|
2
2
|
bundler.py,sha256=so8ZJResb1PcOH5vboa_mpFAdYr_T8u8DbbFXd570Lg,1704
|
|
3
3
|
data_generator.py,sha256=CnE-VHEeX7-lAXtqCgbRqR9WHjTuOgeiZcviYrHAmho,2287
|
|
4
|
-
dmart.py,sha256=
|
|
4
|
+
dmart.py,sha256=HHCKuf_JomcSCwWs2QWH4FKNhCZa-r5kgbk0r6vcAEQ,24117
|
|
5
5
|
get_settings.py,sha256=Sbe2WCoiK398E7HY4SNLfDN_GmE8knR4M-YJWF31jcg,153
|
|
6
6
|
info.json,sha256=hXQWl19lfMkEj_zXdehGeKjiKGNJ7emY4S7d4pIqJ1E,123
|
|
7
7
|
main.py,sha256=KZGhIL6AnEm5ZAPy4IvhBDpzSTjuodilV7NafNOyhzM,19676
|
|
@@ -178,8 +178,8 @@ dmart_migrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,
|
|
|
178
178
|
dmart_migrations/env.py,sha256=P1gnJRIUrP2jLHZ7HDbfkzkpuZJ_LMWqw05HIqOUJHo,3110
|
|
179
179
|
dmart_migrations/notes.txt,sha256=X7LYSNmulLRiAUXvw07Z85bSGRTnx4NUpoNC9D2DfO8,395
|
|
180
180
|
dmart_migrations/script.py.mako,sha256=u-ABdYW1tcIILgJFJdQZYLxoAI8Awd6wZbx30rY6fxU,680
|
|
181
|
-
dmart_migrations/__pycache__/__init__.cpython-314.pyc,sha256=
|
|
182
|
-
dmart_migrations/__pycache__/env.cpython-314.pyc,sha256=
|
|
181
|
+
dmart_migrations/__pycache__/__init__.cpython-314.pyc,sha256=BB6R74YhUmoPWg2dYz2gTIM0CE7sMcOt0dsgqEEPza4,174
|
|
182
|
+
dmart_migrations/__pycache__/env.cpython-314.pyc,sha256=27dvi9nRTOIogSJ7ytGX2i1CbTEw4rwPaZV_OGS175g,4278
|
|
183
183
|
dmart_migrations/scripts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
184
184
|
dmart_migrations/scripts/calculate_checksums.py,sha256=v2NLEvReA9V3noJE-BWANgKDdhc8Mqg1ZmJJ8nc8sGI,3443
|
|
185
185
|
dmart_migrations/scripts/migration_f7a4949eed19.py,sha256=oUXuxjU4MbVafm4S-xu5J_4apHqW6hQZ8ftpJtCtM28,1462
|
|
@@ -215,7 +215,7 @@ dmart_migrations/versions/__pycache__/8640dcbebf85_add_notes_to_users.cpython-31
|
|
|
215
215
|
dmart_migrations/versions/__pycache__/91c94250232a_adding_fk_on_owner_shortname.cpython-314.pyc,sha256=IIEupLleN5nEUUpTCXWGV-LXsdzGJrcnrolJmpi8WMo,6383
|
|
216
216
|
dmart_migrations/versions/__pycache__/98ecd6f56f9a_ext_meta_with_owner_group_shortname.cpython-314.pyc,sha256=tPXDQ_TCEK9sv3ZinAk9vUJcwuqE75ymoT_0O_0qLss,5657
|
|
217
217
|
dmart_migrations/versions/__pycache__/9aae9138c4ef_indexing_created_at_updated_at.cpython-314.pyc,sha256=D3m2fuhNbUUNZi21p45UDy8uUmAOio1RZzqoPnKD6G4,6990
|
|
218
|
-
dmart_migrations/versions/__pycache__/b53f916b3f6d_json_to_jsonb.cpython-314.pyc,sha256=
|
|
218
|
+
dmart_migrations/versions/__pycache__/b53f916b3f6d_json_to_jsonb.cpython-314.pyc,sha256=eBvU5VFctw1AqklCtprJJhvGXZVYpvxBcuZiI6bOBGY,34035
|
|
219
219
|
dmart_migrations/versions/__pycache__/eb5f1ec65156_adding_user_locked_to_device.cpython-314.pyc,sha256=v47hBAxgbjkSAsEn8O2EUTUOPR0D9bVD8fJl9erlpzM,2514
|
|
220
220
|
dmart_migrations/versions/__pycache__/f7a4949eed19_adding_query_policies_to_meta.cpython-314.pyc,sha256=jCW56_bq_qQM6H9CjPu2qOm8gywSO7TEHHywlyv1qcI,5099
|
|
221
221
|
languages/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -282,8 +282,8 @@ utils/ticket_sys_utils.py,sha256=9QAlW2iiy8KyxQRBDj_WmzS5kKb0aYJmGwd4qzmGVqo,700
|
|
|
282
282
|
utils/web_notifier.py,sha256=QM87VVid2grC5lK3NdS1yzz0z1wXljr4GChJOeK86W4,843
|
|
283
283
|
utils/templates/activation.html.j2,sha256=XAMKCdoqONoc4ZQucD0yV-Pg5DlHHASZrTVItNS-iBE,640
|
|
284
284
|
utils/templates/reminder.html.j2,sha256=aoS8bTs56q4hjAZKsb0jV9c-PIURBELuBOpT_qPZNVU,639
|
|
285
|
-
dmart-1.4.
|
|
286
|
-
dmart-1.4.
|
|
287
|
-
dmart-1.4.
|
|
288
|
-
dmart-1.4.
|
|
289
|
-
dmart-1.4.
|
|
285
|
+
dmart-1.4.14.dist-info/METADATA,sha256=H9gFXc-9yiV-o41d2QeSLIcFWjIJn041SLM6Ktc5_oY,2069
|
|
286
|
+
dmart-1.4.14.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
287
|
+
dmart-1.4.14.dist-info/entry_points.txt,sha256=GjfoGh1bpxuU9HHGJzbtCFPNptHv9TryxHMN3uBSKpg,37
|
|
288
|
+
dmart-1.4.14.dist-info/top_level.txt,sha256=XELQhaIfj-qupnyBrir39qFRh8ncu1RXkCHeitzqLLg,275
|
|
289
|
+
dmart-1.4.14.dist-info/RECORD,,
|
dmart.py
CHANGED
|
@@ -537,7 +537,10 @@ def main():
|
|
|
537
537
|
pkg_dir = Path(__file__).resolve().parent
|
|
538
538
|
|
|
539
539
|
# Try to find migrations directory
|
|
540
|
-
alembic_dir = pkg_dir / "
|
|
540
|
+
alembic_dir = pkg_dir / "dmart_migrations"
|
|
541
|
+
if not alembic_dir.exists():
|
|
542
|
+
# Fallback to alembic for backward compatibility
|
|
543
|
+
alembic_dir = pkg_dir / "alembic"
|
|
541
544
|
|
|
542
545
|
original_ini_path = pkg_dir / "alembic.ini"
|
|
543
546
|
if not original_ini_path.exists():
|
|
@@ -547,42 +550,31 @@ def main():
|
|
|
547
550
|
print(f"Error: 'alembic.ini' not found in {pkg_dir} or {alembic_dir}")
|
|
548
551
|
sys.exit(1)
|
|
549
552
|
|
|
550
|
-
# Use subprocess to run alembic to avoid shadowing issues in the current process.
|
|
551
|
-
# We use the current python executable to ensure we use the same environment.
|
|
552
|
-
env = os.environ.copy()
|
|
553
|
-
python_path = env.get("PYTHONPATH", "")
|
|
554
|
-
if python_path:
|
|
555
|
-
env["PYTHONPATH"] = f"{pkg_dir}{os.pathsep}{python_path}"
|
|
556
|
-
else:
|
|
557
|
-
env["PYTHONPATH"] = str(pkg_dir)
|
|
558
|
-
|
|
559
553
|
try:
|
|
560
|
-
# Check if alembic is installed
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
if check.returncode != 0:
|
|
554
|
+
# Check if alembic library is installed using importlib.metadata
|
|
555
|
+
import importlib.metadata
|
|
556
|
+
try:
|
|
557
|
+
importlib.metadata.version('alembic')
|
|
558
|
+
except importlib.metadata.PackageNotFoundError:
|
|
566
559
|
print("Error: 'alembic' library not found. Please install it with 'pip install alembic'.")
|
|
567
560
|
sys.exit(1)
|
|
568
561
|
|
|
569
562
|
import tempfile
|
|
570
|
-
|
|
563
|
+
import re
|
|
564
|
+
# Create a temporary alembic.ini to override script_location with absolute path
|
|
571
565
|
with tempfile.NamedTemporaryFile(mode='w', suffix='.ini', delete=False) as tf:
|
|
572
566
|
with open(original_ini_path, 'r') as f:
|
|
573
567
|
content = f.read()
|
|
574
568
|
|
|
575
|
-
# Ensure script_location points to the actual directory (absolute path)
|
|
576
|
-
import re
|
|
577
569
|
content = re.sub(r'^script_location\s*=.*$', f'script_location = {alembic_dir.as_posix()}', content, flags=re.MULTILINE)
|
|
578
570
|
tf.write(content)
|
|
579
571
|
temp_ini_path = tf.name
|
|
580
572
|
|
|
581
573
|
try:
|
|
574
|
+
# Run alembic upgrade head
|
|
582
575
|
result = subprocess.run(
|
|
583
576
|
[sys.executable, "-m", "alembic", "-c", temp_ini_path, "upgrade", "head"],
|
|
584
|
-
cwd=pkg_dir
|
|
585
|
-
env=env
|
|
577
|
+
cwd=pkg_dir
|
|
586
578
|
)
|
|
587
579
|
if result.returncode != 0:
|
|
588
580
|
sys.exit(result.returncode)
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
File without changes
|
|
File without changes
|
|
File without changes
|