1212from renku_data_services .crc .orm import ResourceClassORM
1313from renku_data_services .project .orm import ProjectORM
1414from renku_data_services .session import models
15- from renku_data_services .utils .sqlalchemy import ULIDType
15+ from renku_data_services .utils .sqlalchemy import PurePosixPathType , ULIDType
1616
1717metadata_obj = MetaData (schema = "sessions" ) # Has to match alembic ini section name
1818JSONVariant = JSON ().with_variant (JSONB (), "postgresql" )
@@ -51,8 +51,8 @@ class EnvironmentORM(BaseORM):
5151 """Default URL path to open in a session."""
5252
5353 port : Mapped [int ] = mapped_column ("port" )
54- working_directory : Mapped [str ] = mapped_column ("working_directory" , String () )
55- mount_directory : Mapped [str ] = mapped_column ("mount_directory" , String () )
54+ working_directory : Mapped [PurePosixPath ] = mapped_column ("working_directory" , PurePosixPathType )
55+ mount_directory : Mapped [PurePosixPath ] = mapped_column ("mount_directory" , PurePosixPathType )
5656 uid : Mapped [int ] = mapped_column ("uid" )
5757 gid : Mapped [int ] = mapped_column ("gid" )
5858 environment_kind : Mapped [models .EnvironmentKind ] = mapped_column ("environment_kind" )
@@ -72,8 +72,8 @@ def dump(self) -> models.Environment:
7272 gid = self .gid ,
7373 uid = self .uid ,
7474 environment_kind = self .environment_kind ,
75- mount_directory = PurePosixPath ( self .mount_directory ) ,
76- working_directory = PurePosixPath ( self .working_directory ) ,
75+ mount_directory = self .mount_directory ,
76+ working_directory = self .working_directory ,
7777 port = self .port ,
7878 args = self .args ,
7979 command = self .command ,
0 commit comments