This adds four columns to the `recording_session` table which are
foreign keys to the `iam_scope_hst`, `target_ssh_hst`,
`host_history_base`, and `host_catalog_history_base` tables. The foreign
key to the `iam_scope_hst` table references the project scope of the
target at the time of the recording.
This renames the migration with the session recording table to come
after the history table migrations. This allows the session recording
table to have foreign key references to the history tables without using
alter table statements.
This adds history tables for `static_host` and `host_plugin_host`. This
also adds a base table for the host history tables.
This also adds a new test to the history table test suite. The new test
verifies the contents of each history table against the contents of
their operational table.
This adds history tables for `static_host_catalog` and
`host_plugin_catalog`. This also adds a base table for the host catalog
history tables and an immutable table with one row for when a target has
a direct address assigned to it.
This also adds a reusable trigger function for tables that are
immutable.
This adds a history table for `target_ssh`.
This also fixes a bug in the history table test suite. Prior to this
change, the operational table name was calculated from the history table
name using the SQL trim() function. The SQL trim function as used
returned 'targe' for 'target_ssh_hst' instead of the expected value
'target_ssh'.
This adds two columns to the `recording_session` table. One column is a
foreign key to the `iam_user_hst` table and the other is a foreign key
to the `iam_scope_hst` table. The foreign key to the `iam_scope_hst`
table reference the IAM scope the user belongs to at the time of the
recording.
This moves and renames the migration with the session recording table to
come after the history table migrations. This allows the session
recording table to have foreign key references to the history tables
without using alter table statements.
This adds a history table for `iam_scope`. It also includes reusable
triggers to maintain the included history table and future history
tables.
This also includes a test suite that runs on any table ending in `_hst`.
This adds a SQL function that generates a secure random ID of at least
14 characters suitable for use as a public or private ID. IDs generated
with the function will only contain characters from the unreserved
character set defined in RFC 3986 Section 2.3 making them safe for use
in a URL.