-- application_ports: which ports an application typically uses (many-to-many). CREATE TABLE IF NOT EXISTS application_ports ( application_id BIGINT NOT NULL REFERENCES applications(id) ON DELETE CASCADE, port_number INTEGER NOT NULL, PRIMARY KEY (application_id, port_number) );