Skip to content

Commit

Permalink
bump 0.7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
svenrdz committed Sep 12, 2024
1 parent c3c1f0b commit 37572f3
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 2 deletions.
2 changes: 1 addition & 1 deletion alembic.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[alembic]
script_location = esgpull/db/migrations
script_location = esgpull/migrations
prepend_sys_path = .
version_path_separator = os # Use os.pathsep. Default configuration used for new projects.

Expand Down
3 changes: 3 additions & 0 deletions esgpull/migrations/env.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,10 @@ def run_migrations_offline() -> None:
url=url,
target_metadata=target_metadata,
literal_binds=True,
dialect_name="sqlite",
dialect_opts={"paramstyle": "named"},
version_table="version",
render_as_batch=True,
)

with context.begin_transaction():
Expand All @@ -70,6 +72,7 @@ def run_migrations_online() -> None:
connection=connection,
target_metadata=target_metadata,
version_table="version",
render_as_batch=True,
)

with context.begin_transaction():
Expand Down
38 changes: 38 additions & 0 deletions esgpull/migrations/versions/0.7.0_update_tables.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
"""update tables
Revision ID: 0.7.0
Revises: 0.6.5
Create Date: 2024-09-12 16:32:48.745570
"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '0.7.0'
down_revision = '0.6.5'
branch_labels = None
depends_on = None


def upgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
with op.batch_alter_table('file', schema=None) as batch_op:
batch_op.alter_column('size',
existing_type=sa.INTEGER(),
type_=sa.BigInteger(),
existing_nullable=False)

# ### end Alembic commands ###


def downgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
with op.batch_alter_table('file', schema=None) as batch_op:
batch_op.alter_column('size',
existing_type=sa.BigInteger(),
type_=sa.INTEGER(),
existing_nullable=False)

# ### end Alembic commands ###
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "hatchling.build"

[project]
name = "esgpull"
version = "0.6.5"
version = "0.7.0"
classifiers = [
"License :: OSI Approved :: BSD License",
"Programming Language :: Python :: 3",
Expand Down Expand Up @@ -91,6 +91,7 @@ extend-exclude = ["output/*", "esgpull/migrations/*"]
extend-select = ["I"]

[tool.rye]
managed = true
dev-dependencies = [
"jupyter-console>=6.6.3",
"typing-extensions>=4.12.2",
Expand Down

0 comments on commit 37572f3

Please sign in to comment.