Codington
0 of 8 problems solved • 0%

Exercise prompt

Link a Deployment to a Service

The service registry is ready. In the new table, REFERENCES names the table and column that a foreign key points to. The deployment ID identifies the run. The service ID identifies what was deployed.

Example

CREATE TABLE checks ( id integer PRIMARY KEY, service_id integer REFERENCES services(id) );

Your task

Create deployments with id integer as primary key and service_id integer referencing services(id), in that order. Insert deployment 101 for worker. Look up its service ID in the registry.

Opening the database…