public string GetLogTriggerForTable(string sSourceTableName) { string sLogTrigger = ""; sSourceTableName = this._oMySqlUtility_Source.GetTableNameOnly(sSourceTableName); string sDestinationTableName = this._HistoryTablePrefix + sSourceTableName + this._HistoryTableSuffix; DataTable dt = GetTableSchema(sSourceTableName); sDestinationTableName = this._oMySqlUtility_Destination.AddSchemaToTableName(sDestinationTableName); DataLogger_LogTable oLogTable = new DataLogger_LogTable(sSourceTableName, sDestinationTableName, this._oMySqlUtility_Source.GetDBNameFromConnection(), this._oMySqlUtility_Destination.GetDBNameFromConnection(), dt); sLogTrigger = oLogTable.GetSourceTableTrigger(sSourceTableName + "_BEFORE_UPDATE"); return sLogTrigger; }
public string GetLogSchemaForTable(string sSourceTableName) { sSourceTableName = this._oMySqlUtility_Source.GetTableNameOnly(sSourceTableName); string sLogSchema = ""; string sDestinationTableName = this._HistoryTablePrefix + sSourceTableName + this._HistoryTableSuffix; DataTable dt = GetTableSchema(sSourceTableName); sDestinationTableName = this._oMySqlUtility_Destination.AddSchemaToTableName(sDestinationTableName); DataLogger_LogTable oLogTable = new DataLogger_LogTable(sSourceTableName, sDestinationTableName, this._oMySqlUtility_Source.GetDBNameFromConnection(), this._oMySqlUtility_Destination.GetDBNameFromConnection(), dt); sLogSchema = oLogTable.GetTableDefinition(); return sLogSchema; }