-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b54cec5
commit f4123ad
Showing
5 changed files
with
68 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
CREATE TABLE object_id_tag ( | ||
object_id bytea NOT NULL REFERENCES object(id), | ||
tag text NOT NULL, | ||
value text NOT NULL, | ||
|
||
CONSTRAINT pk_object_id_tag PRIMARY KEY (object_id, tag) | ||
); | ||
|
||
INSERT INTO object_id_tag (object_id, tag, value) SELECT id, 'host', host FROM object; | ||
INSERT INTO object_id_tag (object_id, tag, value) SELECT id, 'service', service FROM object WHERE service IS NOT NULL; | ||
|
||
ALTER TABLE object | ||
DROP COLUMN host, | ||
DROP COLUMN service; |