Skip to content

Commit

Permalink
Merge pull request #159 from lsst/tickets/DM-41251
Browse files Browse the repository at this point in the history
DM-41251: Add initial foreign-key test to DP0.3
  • Loading branch information
gpdf authored Oct 25, 2023
2 parents 7396851 + 99c82a4 commit 301fd19
Showing 1 changed file with 23 additions and 5 deletions.
28 changes: 23 additions & 5 deletions yml/dp03_10yr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ tables:
nullable: false
description: Unique identifier.
mysql:datatype: BIGINT
ivoa:ucd: meta.id;src
ivoa:ucd: meta.id;meta.main;src
- name: discoverySubmissionDate
"@id": "#SSObject.discoverySubmissionDate"
datatype: double
Expand Down Expand Up @@ -359,15 +359,15 @@ tables:
ivoa:ucd: meta.code
- name: DiaSource
"@id": "#DiaSource"
description: Table to store 'difference image sources'; - sources detected at SNR
description: Table to store 'difference image sources' - sources detected at SNR
>=5 on difference images.
columns:
- name: diaSourceId
"@id": "#DiaSource.diaSourceId"
datatype: long
description: Unique id.
mysql:datatype: BIGINT
ivoa:ucd: meta.id;obs.image
ivoa:ucd: meta.id;meta.main;src
- name: ccdVisitId
"@id": "#DiaSource.ccdVisitId"
datatype: long
Expand Down Expand Up @@ -493,11 +493,20 @@ tables:
"@id": "#IDX_DiaSource_ssObjectId"
columns:
- "#DiaSource.ssObjectId"
constraints:
- name: SSO_DS_10yr
"@type": "ForeignKey"
"@id": "#FK_DiaSource_ssObjectId_SSObject_ssObjectId_10yr"
description: Link SSObjects to associated DiaSources
columns:
- "#DiaSource.ssObjectId"
referencedColumns:
- "#SSObject.ssObjectId"
mysql:engine: MyISAM
mysql:charset: latin1
- name: SSSource
"@id": "#SSSource"
description: LSST-computed per-source quantities. 1:1 relationship with DIASource.
description: LSST-computed per-source quantities. 1:1 relationship with DiaSource.
Recomputed daily, upon MPCORB ingestion.
primaryKey: "#SSSource.ssObjectId"
mysql:engine: MyISAM
Expand All @@ -514,7 +523,7 @@ tables:
datatype: long
description: Unique identifier of the observation
mysql:datatype: BIGINT
ivoa:ucd: meta.id;src
ivoa:ucd: meta.id;meta.main;src
- name: mpcUniqueId
"@id": "#SSSource.mpcUniqueId"
datatype: long
Expand Down Expand Up @@ -676,6 +685,15 @@ tables:
description: ''
mysql:datatype: FLOAT
fits:tunit: AU
constraints:
- name: SSO_SSS_10yr
"@type": "ForeignKey"
"@id": "#FK_SSSource_ssObjectId_SSObject_ssObjectId_10yr"
description: Link SSObjects to associated SSSources
columns:
- "#SSSource.ssObjectId"
referencedColumns:
- "#SSObject.ssObjectId"
- name: MPCORB
"@id": "#MPCORB"
description: The orbit catalog produced by the Minor Planet Center. Ingested daily.
Expand Down

0 comments on commit 301fd19

Please sign in to comment.