Codington
0 of 8 problems solved • 0%

Exercise prompt

Require a Service for Each Run

The live release log needs a service on every row. Combine NOT NULL with REFERENCES to require an existing service. Use DEFAULT to give new runs their first status.

Your task

Create deployments with id integer as primary key, a required service_id integer referencing services(id), and status text defaulting to queued, in that order. Insert run 106 for worker and let the database fill in the status.

Opening the database…