Skip to content

Commit

Permalink
Fill in the migration.
Browse files Browse the repository at this point in the history
ezpz.
  • Loading branch information
SyntaxColoring committed Jan 9, 2025
1 parent ce07f85 commit 5a9743d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions robot-server/robot_server/persistence/_migrations/v8_to_v9.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,14 @@
from robot_server.persistence.file_and_directory_names import DB_FILE
from robot_server.persistence.tables import schema_9

from ._util import copy_contents
from .._folder_migrator import Migration


class Migration8to9(Migration): # noqa: D101
def migrate(self, source_dir: Path, dest_dir: Path) -> None:
"""Migrate the persistence directory from schema 8 to 9."""
# FIX BEFORE MERGE: Put an actual migration here.
copy_contents(source_dir=source_dir, dest_dir=dest_dir)

with sql_engine_ctx(dest_dir / DB_FILE) as engine:
schema_9.metadata.create_all(engine)
schema_9.labware_offset_table.create(engine)

0 comments on commit 5a9743d

Please sign in to comment.