diff --git a/datagateway_api/src/datagateway_api/database/models.py b/datagateway_api/src/datagateway_api/database/models.py index a314d119..275271b1 100644 --- a/datagateway_api/src/datagateway_api/database/models.py +++ b/datagateway_api/src/datagateway_api/database/models.py @@ -459,7 +459,7 @@ class DATAPUBLICATIONDATE(Base, EntityHelper, metaclass=EntityMeta): __singularfieldname__ = "dataPublicationDate" __pluralfieldname__ = "dataPublicationDates" __table_args__ = ( - Index("UNQ_DATAPUBLICATIONDATE_0", "DATAPUBLICATION_ID", "DATE_TYPE"), + Index("UNQ_DATAPUBLICATIONDATE_0", "DATAPUBLICATION_ID", "DATETYPE"), ) id = Column("ID", BigInteger, primary_key=True) @@ -468,7 +468,7 @@ class DATAPUBLICATIONDATE(Base, EntityHelper, metaclass=EntityMeta): modId = Column("MOD_ID", String(255), nullable=False) modTime = Column("MOD_TIME", DateTime, nullable=False) dateType = Column("DATETYPE", String(255), nullable=False) - date = Column("DATE", String(255), nullable=False) + date = Column("DATE_", String(255), nullable=False) datapublicationId = Column( "DATAPUBLICATION_ID", ForeignKey("DATAPUBLICATION.ID"), nullable=False ) @@ -567,7 +567,7 @@ class DATAPUBLICATIONUSER(Base, EntityHelper, metaclass=EntityMeta): USER = relationship( "USER", - primaryjoin="DATAPUBLICATIONUSER.userID == USER.id", + primaryjoin="DATAPUBLICATIONUSER.userId == USER.id", backref="dataPublicationUsers", ) @@ -807,7 +807,6 @@ class DATASETTECHNIQUE(Base, EntityHelper, metaclass=EntityMeta): id = Column("ID", BigInteger, primary_key=True) createId = Column("CREATE_ID", String(255), nullable=False) createTime = Column("CREATE_TIME", DateTime, nullable=False) - description = Column("DESCRIPTION", String(255)) modId = Column("MOD_ID", String(255), nullable=False) modTime = Column("MOD_TIME", DateTime, nullable=False) datasetId = Column("DATASET_ID", ForeignKey("DATASET.ID"), nullable=False) @@ -854,12 +853,11 @@ class FUNDINGREFERENCE(Base, EntityHelper, metaclass=EntityMeta): __tablename__ = "FUNDINGREFERENCE" __singularfieldname__ = "fundingReference" __pluralfieldname__ = "fundingReferences" - __table_args__ = (Index("UNQ_FUNDINGREFERENCE_0", "FUNDER_NAME", "AWARD_NUMBER"),) + __table_args__ = (Index("UNQ_FUNDINGREFERENCE_0", "FUNDERNAME", "AWARDNUMBER"),) id = Column("ID", BigInteger, primary_key=True) createId = Column("CREATE_ID", String(255), nullable=False) createTime = Column("CREATE_TIME", DateTime, nullable=False) - description = Column("DESCRIPTION", String(255)) modId = Column("MOD_ID", String(255), nullable=False) modTime = Column("MOD_TIME", DateTime, nullable=False) funderIdentifier = Column("FUNDERIDENTIFIER", String(255)) @@ -990,7 +988,7 @@ class INVESTIGATIONFACILITYCYCLE(Base, EntityHelper, metaclass=EntityMeta): facilityCycleId = Column( "FACILITYCYCLE_ID", ForeignKey("FACILITYCYCLE.ID"), nullable=False, ) - investigationID = Column( + investigationId = Column( "INVESTIGATION_ID", ForeignKey("INVESTIGATION.ID"), nullable=False, index=True, ) @@ -1001,7 +999,7 @@ class INVESTIGATIONFACILITYCYCLE(Base, EntityHelper, metaclass=EntityMeta): ) INVESTIGATION = relationship( "INVESTIGATION", - primaryjoin="INVESTIGATIONFACILITYCYCLE.investigationID == INVESTIGATION.id", + primaryjoin="INVESTIGATIONFACILITYCYCLE.investigationId == INVESTIGATION.id", backref="investigationFacilityCycles", ) @@ -1020,7 +1018,7 @@ class INVESTIGATIONFUNDING(Base, EntityHelper, metaclass=EntityMeta): modId = Column("MOD_ID", String(255), nullable=False) modTime = Column("MOD_TIME", DateTime, nullable=False) fundingId = Column("FUNDING_ID", ForeignKey("FUNDINGREFERENCE.ID"), nullable=False) - investigationID = Column( + investigationId = Column( "INVESTIGATION_ID", ForeignKey("INVESTIGATION.ID"), nullable=False, index=True, ) @@ -1031,7 +1029,7 @@ class INVESTIGATIONFUNDING(Base, EntityHelper, metaclass=EntityMeta): ) INVESTIGATION = relationship( "INVESTIGATION", - primaryjoin="INVESTIGATIONFUNDING.investigationID == INVESTIGATION.id", + primaryjoin="INVESTIGATIONFUNDING.investigationId == INVESTIGATION.id", backref="fundingReferences", ) diff --git a/datagateway_api/src/swagger/datagateway_api/openapi.yaml b/datagateway_api/src/swagger/datagateway_api/openapi.yaml index 8b7f5a1e..4bc3947f 100644 --- a/datagateway_api/src/swagger/datagateway_api/openapi.yaml +++ b/datagateway_api/src/swagger/datagateway_api/openapi.yaml @@ -779,6 +779,8 @@ components: type: string email: type: string + familyName: + type: string fullName: type: string givenName: @@ -795,7 +797,7 @@ components: type: string publicationId: type: integer - userID: + userId: type: integer required: - id @@ -805,7 +807,7 @@ components: - modTime - contributorType - publicationId - - userID + - userId DATASET: properties: DATASETTYPE: @@ -967,8 +969,6 @@ components: type: string datasetId: type: integer - description: - type: string id: readOnly: true type: integer @@ -1150,8 +1150,6 @@ components: createTime: format: datetime type: string - description: - type: string funderIdentifier: type: string funderName: @@ -1421,7 +1419,7 @@ components: id: readOnly: true type: integer - investigationID: + investigationId: type: integer modId: type: string @@ -1435,7 +1433,7 @@ components: - modId - modTime - facilityCycleId - - investigationID + - investigationId INVESTIGATIONFUNDING: properties: FUNDINGREFERENCE: @@ -1452,7 +1450,7 @@ components: id: readOnly: true type: integer - investigationID: + investigationId: type: integer modId: type: string @@ -1466,7 +1464,7 @@ components: - modId - modTime - fundingId - - investigationID + - investigationId INVESTIGATIONGROUP: properties: GROUPING: