Skip to content

Commit

Permalink
Restore nullability of column definition
Browse files Browse the repository at this point in the history
  • Loading branch information
mvdbeek committed May 23, 2024
1 parent 0eced90 commit 70aa9d7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions lib/galaxy/model/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -782,7 +782,7 @@ class User(Base, Dictifiable, RepresentById):
create_time: Mapped[datetime] = mapped_column(default=now, nullable=True)
update_time: Mapped[datetime] = mapped_column(default=now, onupdate=now, nullable=True)
email: Mapped[str] = mapped_column(TrimmedString(255), index=True)
username: Mapped[str] = mapped_column(TrimmedString(255), index=True, unique=True)
username: Mapped[str] = mapped_column(TrimmedString(255), index=True, unique=True, nullable=True)
password: Mapped[str] = mapped_column(TrimmedString(255))
last_password_change: Mapped[Optional[datetime]] = mapped_column(default=now)
external: Mapped[Optional[bool]] = mapped_column(default=False)
Expand Down Expand Up @@ -6847,7 +6847,7 @@ class HistoryDatasetCollectionAssociation(
collection_id: Mapped[int] = mapped_column(ForeignKey("dataset_collection.id"), index=True)
history_id: Mapped[int] = mapped_column(ForeignKey("history.id"), index=True)
name: Mapped[Optional[str]] = mapped_column(TrimmedString(255))
hid: Mapped[int]
hid: Mapped[int] = mapped_column(nullabled=True)
visible: Mapped[Optional[bool]]
deleted: Mapped[Optional[bool]] = mapped_column(default=False)
copied_from_history_dataset_collection_association_id: Mapped[Optional[int]] = mapped_column(
Expand Down Expand Up @@ -11152,7 +11152,7 @@ class APIKeys(Base, RepresentById):
id: Mapped[int] = mapped_column(primary_key=True)
create_time: Mapped[datetime] = mapped_column(default=now, nullable=True)
user_id: Mapped[Optional[int]] = mapped_column(ForeignKey("galaxy_user.id"), index=True)
key: Mapped[str] = mapped_column(TrimmedString(32), index=True, unique=True)
key: Mapped[str] = mapped_column(TrimmedString(32), index=True, unique=True, nullable=True)
user: Mapped[Optional["User"]] = relationship(back_populates="api_keys")
deleted: Mapped[bool] = mapped_column(index=True, server_default=false())

Expand Down
2 changes: 1 addition & 1 deletion lib/tool_shed/webapp/model/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ class APIKeys(Base):
id: Mapped[int] = mapped_column(Integer, primary_key=True)
create_time: Mapped[Optional[datetime]] = mapped_column(DateTime, default=now)
user_id: Mapped[Optional[int]] = mapped_column(ForeignKey("galaxy_user.id"), index=True)
key: Mapped[str] = mapped_column(TrimmedString(32), index=True, unique=True)
key: Mapped[str] = mapped_column(TrimmedString(32), index=True, unique=True, nullable=True)
user = relationship("User", back_populates="api_keys")
deleted: Mapped[Optional[bool]] = mapped_column(Boolean, index=True, default=False)

Expand Down

0 comments on commit 70aa9d7

Please sign in to comment.