diff --git a/python/sdssdb/peewee/sdss5db/catalogdb.py b/python/sdssdb/peewee/sdss5db/catalogdb.py index 95bc8d5c..5cc7c32f 100644 --- a/python/sdssdb/peewee/sdss5db/catalogdb.py +++ b/python/sdssdb/peewee/sdss5db/catalogdb.py @@ -280,6 +280,7 @@ class Meta: class Legacy_Survey_DR8(CatalogdbModel): + ls_id = BigIntegerField(primary_key=True) ref_cat = TextField() ref_id = BigIntegerField() @@ -429,7 +430,7 @@ class BHM_Spiders_Generic_Superset(CatalogdbModel): opt_modelflux_z = FloatField(null=True) opt_modelflux_ivar_z = FloatField(null=True) - ls = ForeignKeyField(Legacy_Survey_DR8, backref='+') + ls = ForeignKeyField(Legacy_Survey_DR8, field='ls_id', backref='+') gaia = ForeignKeyField(Gaia_DR2, object_id_name='gaia_dr2_source_id', backref='+') class Meta: @@ -639,6 +640,8 @@ class Meta: class SkyMapper_DR1_1(CatalogdbModel): + object_id = BigIntegerField(primary_key=True) + allwise = ForeignKeyField(AllWise, field='cntr', column_name='allwise_cntr', object_id_name='allwise_cntr',