Fix backfill script imports to match actual module paths
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -16,15 +16,14 @@ from sqlalchemy.ext.asyncio import AsyncSession
|
|||||||
|
|
||||||
|
|
||||||
async def backfill(dry_run: bool = False) -> int:
|
async def backfill(dry_run: bool = False) -> int:
|
||||||
from shared.db.sessions import get_session_factory
|
from shared.db.session import get_session
|
||||||
from blog.models.content import Post
|
from models.ghost_content import Post
|
||||||
from blog.bp.blog.ghost.lexical_to_sx import lexical_to_sx
|
from bp.blog.ghost.lexical_to_sx import lexical_to_sx
|
||||||
|
|
||||||
session_factory = get_session_factory("blog")
|
|
||||||
converted = 0
|
converted = 0
|
||||||
errors = 0
|
errors = 0
|
||||||
|
|
||||||
async with session_factory() as sess:
|
async with get_session() as sess:
|
||||||
stmt = select(Post).where(
|
stmt = select(Post).where(
|
||||||
and_(
|
and_(
|
||||||
Post.lexical.isnot(None),
|
Post.lexical.isnot(None),
|
||||||
|
|||||||
Reference in New Issue
Block a user