Skip to content

Commit

Permalink
changed FK identifiers to str
Browse files Browse the repository at this point in the history
  • Loading branch information
frankcorneliusmartin committed Jan 31, 2024
1 parent 5de0d9e commit 8f711ac
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion vantage6-algorithm-store/server.sh
Expand Up @@ -18,4 +18,4 @@ uwsgi \
/vantage6/vantage6-algorithm-store/vantage6/algorithm/store/wsgi.py \
--pyargv "${VANTAGE6_CONFIG_LOCATION}"

echo "[server.sh exit]"
echo "[server.sh exit]"
@@ -1,5 +1,5 @@
from __future__ import annotations
from sqlalchemy import Column, String, ForeignKey
from sqlalchemy import Column, String, ForeignKey, Integer
from sqlalchemy.orm import relationship

from vantage6.algorithm.store.model.base import Base
Expand All @@ -18,7 +18,7 @@ class Argument(Base):
Name of the argument
description : str
Description of the argument
function_id : str
function_id : int
ID of the algorithm that this function belongs to
function : :class:`~.model.algorithm.algorithm`
Algorithm function that this argument belongs to
Expand All @@ -29,7 +29,7 @@ class Argument(Base):
# fields
name = Column(String)
description = Column(String)
function_id = Column(String, ForeignKey("function.id"))
function_id = Column(Integer, ForeignKey("function.id"))
type_ = Column(String)

# relationships
Expand Down
@@ -1,5 +1,5 @@
from __future__ import annotations
from sqlalchemy import Column, String, ForeignKey
from sqlalchemy import Column, String, ForeignKey, Integer
from sqlalchemy.orm import relationship

from vantage6.algorithm.store.model.base import Base
Expand All @@ -18,7 +18,7 @@ class Database(Base):
Name of the database in the function
description : str
Description of the database
function_id : str
function_id : int
ID of the algorithm that this function belongs to
function : :class:`~.model.algorithm.algorithm`
Algorithm function that this database belongs to
Expand All @@ -27,7 +27,7 @@ class Database(Base):
# fields
name = Column(String)
description = Column(String)
function_id = Column(String, ForeignKey("function.id"))
function_id = Column(Integer, ForeignKey("function.id"))

# relationships
function = relationship("Function", back_populates="databases")
@@ -1,5 +1,5 @@
from __future__ import annotations
from sqlalchemy import Column, String, ForeignKey
from sqlalchemy import Column, String, ForeignKey, Integer
from sqlalchemy.orm import relationship

from vantage6.algorithm.store.model.base import Base
Expand All @@ -20,7 +20,7 @@ class Function(Base):
Description of the function
type_ : str
Type of function
algorithm_id : str
algorithm_id : int
ID of the algorithm that this function belongs to
algorithm : :class:`~.model.algorithm.algorithm`
Algorithm that this function belongs to
Expand All @@ -34,7 +34,7 @@ class Function(Base):
name = Column(String)
description = Column(String)
type_ = Column(String)
algorithm_id = Column(String, ForeignKey("algorithm.id"))
algorithm_id = Column(Integer, ForeignKey("algorithm.id"))

# relationships
algorithm = relationship("Algorithm", back_populates="functions")
Expand Down

0 comments on commit 8f711ac

Please sign in to comment.