Skip to content

Commit

Permalink
Change imports in alembic.ini\nApply init migration to alembic_curren…
Browse files Browse the repository at this point in the history
…t\nRemove auto creation of migration file
  • Loading branch information
gred committed Oct 28, 2024
1 parent f12d111 commit 44557ce
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
6 changes: 3 additions & 3 deletions alembic.ini
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[alembic]
# path to migration scripts
# Use forward slashes (/) also on windows to provide an os agnostic path
script_location = src/core/library/alembic/migrations
script_location = tagstudio/src/core/library/alembic/migrations

# template used to generate migration file names; The default value is %%(rev)s_%%(slug)s
# Uncomment the line below if you want the files to be prepended with date and time
Expand All @@ -13,7 +13,7 @@ script_location = src/core/library/alembic/migrations

# sys.path path, will be prepended to sys.path if present.
# defaults to the current working directory.
prepend_sys_path = .
prepend_sys_path = . tagstudio

# timezone to use when rendering the date within the migration file
# as well as the filename.
Expand Down Expand Up @@ -61,7 +61,7 @@ version_path_separator = os # Use os.pathsep. Default configuration used for ne
# are written from script.py.mako
# output_encoding = utf-8

sqlalchemy.url = sqlite:///./src/core/library/alembic/alembic_current.sqlite
sqlalchemy.url = sqlite:///./tagstudio/src/core/library/alembic/alembic_current.sqlite


[post_write_hooks]
Expand Down
1 change: 0 additions & 1 deletion tagstudio/src/core/library/alchemy/library.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,6 @@ def migrate(self, db_url: str):
alembic_cfg = Config("alembic.ini")
alembic_cfg.set_main_option("sqlalchemy.url", db_url)
command.stamp(alembic_cfg, "head")
command.revision(alembic_cfg, autogenerate=True)
command.upgrade(alembic_cfg, "head")

def open_library(self, library_dir: Path, storage_path: str | None = None) -> LibraryStatus:
Expand Down
Binary file modified tagstudio/src/core/library/alembic/alembic_current.sqlite
Binary file not shown.

0 comments on commit 44557ce

Please sign in to comment.