channel-app 0.0.157a9__py3-none-any.whl → 0.0.157a10__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.
channel_app/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 = alembic
6
+ script_location = database/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
@@ -4,8 +4,8 @@ from sqlalchemy import engine_from_config
4
4
  from sqlalchemy import pool
5
5
 
6
6
  from alembic import context
7
- from core import settings
8
- from database.models import Base as BaseModel
7
+ from channel_app.core import settings
8
+ from channel_app.database.models import Base as BaseModel
9
9
 
10
10
  # this is the Alembic Config object, which provides
11
11
  # access to the values within the .ini file in use.
@@ -43,7 +43,6 @@ def run_migrations_offline() -> None:
43
43
  script output.
44
44
 
45
45
  """
46
- DATABASE_URL = f"postgresql+psycopg2://{settings.DB_USER}:{settings.DB_PASSWORD}@{settings.DB_HOST}:{settings.DB_PORT}/{settings.DB_NAME}"
47
46
  url = config.set_main_option("sqlalchemy.url", DATABASE_URL)
48
47
 
49
48
  context.configure(
@@ -182,7 +182,7 @@ class S3Client:
182
182
  "AWS_ACCESS_KEY_ID": os.getenv("AWS_ACCESS_KEY_ID"),
183
183
  "AWS_SECRET_ACCESS_KEY": os.getenv("AWS_SECRET_ACCESS_KEY"),
184
184
  "AWS_REGION": os.getenv("S3_REGION_NAME"),
185
- "LOGGING_S3_BUCKET": os.getenv("S3_BUCKET_NAME"),
185
+ "S3_BUCKET_NAME": os.getenv("S3_BUCKET_NAME"),
186
186
  }
187
187
 
188
188
  missing_vars = [
channel_app/migrate.py CHANGED
@@ -1,17 +1,22 @@
1
1
  import os
2
+ import sys
2
3
  from alembic.config import Config
3
4
  from alembic import command
4
5
 
5
- def run_alembic_migrations():
6
- # Bulunduğun dosyadan göreli yol oluştur
6
+ def migrate():
7
7
  base_dir = os.path.dirname(os.path.abspath(__file__))
8
8
  ini_path = os.path.join(base_dir, 'alembic.ini')
9
9
 
10
- # Alembic yapılandırmasını yükle
11
10
  alembic_cfg = Config(ini_path)
11
+ alembic_cfg.set_main_option("script_location", os.path.join(base_dir, "database", "migrations"))
12
12
 
13
- # Migrasyonları uygula (upgrade to head)
14
13
  command.upgrade(alembic_cfg, "head")
15
14
 
15
+
16
16
  if __name__ == "__main__":
17
- run_alembic_migrations()
17
+ try:
18
+ migrate()
19
+ except Exception as e:
20
+ print(f"Migration failed: {e}")
21
+
22
+ sys.exit(1)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: channel-app
3
- Version: 0.0.157a9
3
+ Version: 0.0.157a10
4
4
  Summary: Channel app for Sales Channels
5
5
  Home-page: https://github.com/akinon/channel_app
6
6
  Author: akinonteam
@@ -1,12 +1,6 @@
1
1
  channel_app/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- channel_app/alembic.ini,sha256=XLiRhZWEahYX2iZJI-W4rllrv3CxVsiydr-y-OCESy8,3739
3
- channel_app/migrate.py,sha256=Y-e5xgLF2QVvq340eL-G96Vhxi8iYoM0rk-V-ivzrdw,484
4
- channel_app/alembic/README,sha256=MVlc9TYmr57RbhXET6QxgyCcwWP7w-vLkEsirENqiIQ,38
5
- channel_app/alembic/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
- channel_app/alembic/env.py,sha256=09gf5T27hOWppm05teOp9FVyGS99_angdikc91sS35E,2546
7
- channel_app/alembic/script.py.mako,sha256=3qBrHBf7F7ChKDUIdiNItiSXrDpgQdM7sR0YKzpaC50,689
8
- channel_app/alembic/versions/6d5ae5b9c541_create_initial_tables.py,sha256=EtCzz93LZcBYd7cbIe0w5eYPINduo_Duz4tdetTvTo4,2785
9
- channel_app/alembic/versions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
+ channel_app/alembic.ini,sha256=wUP23krSqffP4Gmo-dXuoceqwi8f7RJaC--7cR-Sfsg,3751
3
+ channel_app/migrate.py,sha256=jbeWNvgtSbGk9dKXTgM_rGr1NZf3trEfjJvKVhvNmHE,532
10
4
  channel_app/app/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
11
5
  channel_app/app/order/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
12
6
  channel_app/app/order/service.py,sha256=GZ8StGwvICtI0DWMtYFq1mB9GPdojNpjCh9oVrHlHJE,22366
@@ -43,10 +37,14 @@ channel_app/core/utilities.py,sha256=3iSU4RHFSsdTWBfUYBK23CRGtAIC-nYIBIJLm0Dlx3o
43
37
  channel_app/database/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
44
38
  channel_app/database/models.py,sha256=cdjLcfJe-OYZzk1fl3JL6ght8jryRYLwMF2uV3srM-o,2314
45
39
  channel_app/database/services.py,sha256=VkF38jtV_E3Am7459mN5ofvkF1N06gnTWbRdmMzNjYw,354
40
+ channel_app/database/migrations/README,sha256=MVlc9TYmr57RbhXET6QxgyCcwWP7w-vLkEsirENqiIQ,38
41
+ channel_app/database/migrations/env.py,sha256=Adgy3HiFGltE8AidMUwbTS9ff0udW5J8cWuAZ28EDsk,2427
42
+ channel_app/database/migrations/script.py.mako,sha256=3qBrHBf7F7ChKDUIdiNItiSXrDpgQdM7sR0YKzpaC50,689
43
+ channel_app/database/migrations/versions/6d5ae5b9c541_create_initial_tables.py,sha256=EtCzz93LZcBYd7cbIe0w5eYPINduo_Duz4tdetTvTo4,2785
46
44
  channel_app/logs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
47
45
  channel_app/logs/encoders.py,sha256=6CVgtkV7DrjxGpNXCJgT9bn9B2Ep0lHgtm-0ES7A57I,703
48
46
  channel_app/logs/enums.py,sha256=If6ZjwRTerbJypYI8WjdsleHR7FjlV-TP2nBppFVEc4,214
49
- channel_app/logs/services.py,sha256=70pzuGipeJTmLgHk56Tth0FiLUFEg7-lOQ5u3k22ywg,7171
47
+ channel_app/logs/services.py,sha256=ojW6gbYaF2AWt-NgnpEYbFSYUJL6KPZa_lqzQe7WdmI,7168
50
48
  channel_app/omnitron/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
51
49
  channel_app/omnitron/batch_request.py,sha256=S8IHtbI1RtVLbnOwtfXSmkrREGp8wUYW2E-eu5omwyY,3550
52
50
  channel_app/omnitron/constants.py,sha256=WZR6k_k2zZfN7lfi1ZLv1PphsHIq_LiZgw6Nd6LduvE,2793
@@ -73,7 +71,7 @@ channel_app/omnitron/commands/tests/test_product_images.py,sha256=y6tmiJ00kd2GTq
73
71
  channel_app/omnitron/commands/tests/test_product_prices.py,sha256=5HPX9PmjGw6gk3oNrwtWLqdrOkfeNx1mYP-pYwOesZU,3496
74
72
  channel_app/omnitron/commands/tests/test_product_stocks.py,sha256=q4RGlrCNUUJyN5CBL1fzrvdd4Q3xt816mbMRQT0XEd0,3496
75
73
  channel_app/omnitron/commands/tests/test_products.py,sha256=uj5KLaubY3XNu0hidOH-u-Djfboe81Hj7-lP--01Le0,103494
76
- channel_app-0.0.157a9.dist-info/METADATA,sha256=1j1ByvDdfT90JdhrJqHa2DZY-TbAvxGRbI-7m7pxZ8Q,441
77
- channel_app-0.0.157a9.dist-info/WHEEL,sha256=eOLhNAGa2EW3wWl_TU484h7q1UNgy0JXjjoqKoxAAQc,92
78
- channel_app-0.0.157a9.dist-info/top_level.txt,sha256=JT-gM6L5Cwxr1xEoN7NHrREDs-d6iGFGfRnK-NrJ3tU,12
79
- channel_app-0.0.157a9.dist-info/RECORD,,
74
+ channel_app-0.0.157a10.dist-info/METADATA,sha256=XAM_GiW9PN_9TvYw_QziOkJKPRKr5QGgb6L6RxFnK6g,442
75
+ channel_app-0.0.157a10.dist-info/WHEEL,sha256=eOLhNAGa2EW3wWl_TU484h7q1UNgy0JXjjoqKoxAAQc,92
76
+ channel_app-0.0.157a10.dist-info/top_level.txt,sha256=JT-gM6L5Cwxr1xEoN7NHrREDs-d6iGFGfRnK-NrJ3tU,12
77
+ channel_app-0.0.157a10.dist-info/RECORD,,
File without changes
File without changes
File without changes