9 lines
471 B
SQL
9 lines
471 B
SQL
-- host_applications: direct association between a host and an application.
|
|
-- Allows explicitly tagging a host with an application regardless of ports.
|
|
-- One application can only be linked once to a given host.
|
|
CREATE TABLE IF NOT EXISTS host_applications (
|
|
host_id INTEGER NOT NULL REFERENCES hosts(id) ON DELETE CASCADE,
|
|
application_id INTEGER NOT NULL REFERENCES applications(id) ON DELETE CASCADE,
|
|
PRIMARY KEY (host_id, application_id)
|
|
);
|