mirror of
https://github.com/Routstr/routstr-core.git
synced 2026-08-09 02:54:37 +00:00
update migartion
This commit is contained in:
+5
-5
@@ -1,8 +1,8 @@
|
||||
"""add model paths table
|
||||
|
||||
Revision ID: 4f2a4f3f62e0
|
||||
Revises: bf76270b66c4
|
||||
Create Date: 2026-08-02 23:28:24.760061
|
||||
Revision ID: 64ed5594df1f
|
||||
Revises: aa50fde387a2
|
||||
Create Date: 2026-08-02 22:26:33.280409
|
||||
"""
|
||||
|
||||
import sqlalchemy as sa
|
||||
@@ -10,8 +10,8 @@ import sqlmodel
|
||||
from alembic import op
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = "4f2a4f3f62e0"
|
||||
down_revision = "bf76270b66c4"
|
||||
revision = "64ed5594df1f"
|
||||
down_revision = "aa50fde387a2"
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
+5
-5
@@ -1,16 +1,16 @@
|
||||
"""add mint url to lightning invoices
|
||||
|
||||
Revision ID: bf76270b66c4
|
||||
Revises: aa50fde387a2
|
||||
Create Date: 2026-07-30 00:54:30.306876
|
||||
Revision ID: ecfa0d6e2a36
|
||||
Revises: 64ed5594df1f
|
||||
Create Date: 2026-08-02 23:53:00.037456
|
||||
"""
|
||||
|
||||
import sqlalchemy as sa
|
||||
from alembic import op
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = "bf76270b66c4"
|
||||
down_revision = "aa50fde387a2"
|
||||
revision = "ecfa0d6e2a36"
|
||||
down_revision = "64ed5594df1f"
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
@@ -32,12 +32,12 @@ def test_mint_url_migration_upgrades_and_downgrades_from_main_head(
|
||||
root = Path(__file__).resolve().parents[2]
|
||||
database_path = tmp_path / "mint-url-migration.db"
|
||||
database_url = f"sqlite+aiosqlite:///{database_path}"
|
||||
previous_head = "aa50fde387a2"
|
||||
previous_head = "64ed5594df1f"
|
||||
|
||||
_run_alembic(root, database_url, "upgrade", previous_head)
|
||||
assert "mint_url" not in _lightning_invoice_columns(database_path)
|
||||
|
||||
_run_alembic(root, database_url, "upgrade", "bf76270b66c4")
|
||||
_run_alembic(root, database_url, "upgrade", "ecfa0d6e2a36")
|
||||
assert "mint_url" in _lightning_invoice_columns(database_path)
|
||||
|
||||
_run_alembic(root, database_url, "downgrade", previous_head)
|
||||
|
||||
Reference in New Issue
Block a user