Skip to content

Commit

Permalink
Missing first_release in targetdb.targeting_generation peewee ORM (#283)
Browse files Browse the repository at this point in the history
* added first_release column

* correct targeting_generation_to_version table name

* add first_release to sqlalchemy
  • Loading branch information
imedan authored Feb 11, 2025
1 parent b653038 commit 59be29a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion python/sdssdb/peewee/sdss5db/targetdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -506,6 +506,7 @@ class Meta:
class TargetingGeneration(TargetdbBase):
pk = AutoField()
label = TextField()
first_release = TextField()

cartons = ManyToManyField(Carton, backref='generations',
through_model=TargetingGenerationToCartonDeferred)
Expand Down Expand Up @@ -543,7 +544,7 @@ class TargetingGenerationToVersion(TargetdbBase):
backref='+')

class Meta:
table_name = 'targeting_generation_to_carton'
table_name = 'targeting_generation_to_version'


# AssignmentDeferred.set_model(Assignment)
Expand Down
1 change: 1 addition & 0 deletions python/sdssdb/sqlalchemy/sdss5db/targetdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,7 @@ class TargetingGeneration(Base):

pk = Column(Integer, primary_key=True, server_default=text("nextval('targetdb.targeting_generation_pk_seq'::regclass)"))
label = Column(Text, nullable=False)
first_release = Column(Text, nullable=False)


class TargetingGenerationToCarton(Base):
Expand Down

0 comments on commit 59be29a

Please sign in to comment.