Logging Historical Data
Historical data can be logged any time an entity in the database is manipulated through creation, update, or deletion. Since historical data is automatically created when other entities are changed, historical data can only be read.
The PTC.DBConnection.HistoricalData Data Shape defines the information that is logged when an entry is made in the historical data database table:
UID—The internal unique identifier of the entry in the historical data table.
ReferenceKey—The internal unique identifier (UID) of the object in the database table for that object.
TableName—The name of the object's database table.
ColumnName—The name of the column that was changed in the object’s database table.
Value—The new value of the column.
DataType—The base type of the value in the object’s database table.
ActionType—A numerical value representing the action being recorded (1 = Create, 2 = Update, 3 = Delete).
DataShapeName—The name of the Data Shape corresponding to the object's database table.
FieldName—The name of the field being changed, as it appears in the Data Shape.
TimeStamp—The time at which the action was executed.
UserName—The user who performed the action.
For more information, see Historical Data Properties.
Was this helpful?