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