tbfDBBackup/tbfDBBackup.Tests/Resources/schema-mapping-backup.json
Michal Buzik 1185af2bf1 Add schema-mapping-backup.json resource for tests
Introduce `schema-mapping-backup.json` to support testing of database schema mappings. Includes column mappings, modifications, deletions, and additions across multiple tables for enhanced test coverage.
2025-08-22 11:50:25 +02:00

811 lines
20 KiB
JSON

{
"Tables": [
{
"TableName": "procedure",
"ColumnMappings": [
{
"OldColumn": "Id",
"NewColumn": "Id",
"Status": "matched",
"ColumnDef": {
"Name": "Id",
"Type": "int(11)",
"Nullable": "NO"
}
},
{
"OldColumn": "ItemNr",
"NewColumn": "ItemNr",
"Status": "matched",
"ColumnDef": {
"Name": "ItemNr",
"Type": "int(11)",
"Nullable": "YES"
}
},
{
"OldColumn": "Name",
"NewColumn": "Name",
"Status": "matched",
"ColumnDef": {
"Name": "Name",
"Type": "varchar(255)",
"Nullable": "YES"
}
},
{
"OldColumn": "Description",
"NewColumn": "Description",
"Status": "matched",
"ColumnDef": {
"Name": "Description",
"Type": "varchar(255)",
"Nullable": "YES"
}
},
{
"OldColumn": "CreationUser",
"NewColumn": "CreationUser",
"Status": "matched",
"ColumnDef": {
"Name": "CreationUser",
"Type": "varchar(255)",
"Nullable": "YES"
}
},
{
"OldColumn": "CreationTime",
"NewColumn": "CreationTime",
"Status": "matched",
"ColumnDef": {
"Name": "CreationTime",
"Type": "datetime",
"Nullable": "YES"
}
},
{
"OldColumn": "LastChgUser",
"NewColumn": "LastChgUser",
"Status": "matched",
"ColumnDef": {
"Name": "LastChgUser",
"Type": "varchar(255)",
"Nullable": "YES"
}
},
{
"OldColumn": "LastChgTime",
"NewColumn": "LastChgTime",
"Status": "matched",
"ColumnDef": {
"Name": "LastChgTime",
"Type": "datetime",
"Nullable": "YES"
}
},
{
"OldColumn": "LongDescription",
"NewColumn": "LongDescription",
"Status": "matched",
"ColumnDef": {
"Name": "LongDescription",
"Type": "varchar(255)",
"Nullable": "YES"
}
},
{
"OldColumn": "ProcedureState",
"NewColumn": "ProcedureState",
"Status": "matched",
"ColumnDef": {
"Name": "ProcedureState",
"Type": "varchar(255)",
"Nullable": "YES"
}
},
{
"OldColumn": "Revision",
"NewColumn": "Revision",
"Status": "matched",
"ColumnDef": {
"Name": "Revision",
"Type": "int(11)",
"Nullable": "YES"
}
},
{
"OldColumn": "PredecessorId",
"NewColumn": "PredecessorId",
"Status": "matched",
"ColumnDef": {
"Name": "PredecessorId",
"Type": "int(11)",
"Nullable": "YES"
}
},
{
"OldColumn": "ObtainedByCopy",
"NewColumn": "ObtainedByCopy",
"Status": "matched",
"ColumnDef": {
"Name": "ObtainedByCopy",
"Type": "tinyint(1)",
"Nullable": "YES"
}
},
{
"OldColumn": "MetersKind",
"NewColumn": "MetersKind",
"Status": "matched",
"ColumnDef": {
"Name": "MetersKind",
"Type": "varchar(255)",
"Nullable": "YES"
}
},
{
"OldColumn": "Watermeters",
"NewColumn": "Watermeters",
"Status": "matched",
"ColumnDef": {
"Name": "Watermeters",
"Type": "varchar(255)",
"Nullable": "YES"
}
},
{
"OldColumn": "ProtocolTitle",
"Status": "new",
"Note": "New",
"ColumnDef": {
"Name": "ProtocolTitle",
"Type": "varchar(255)",
"Nullable": "YES"
}
},
{
"OldColumn": "Protected",
"NewColumn": "Protected",
"Status": "matched",
"ColumnDef": {
"Name": "Protected",
"Type": "tinyint(1)",
"Nullable": "NO"
}
},
{
"OldColumn": "MustBeComplete",
"NewColumn": "MustBeComplete",
"Status": "matched",
"ColumnDef": {
"Name": "MustBeComplete",
"Type": "tinyint(1)",
"Nullable": "NO"
}
},
{
"OldColumn": "ManualCtrlDisabled",
"NewColumn": "ManualCtrlDisabled",
"Status": "matched",
"ColumnDef": {
"Name": "ManualCtrlDisabled",
"Type": "tinyint(1)",
"Nullable": "NO"
}
},
{
"OldColumn": "DataEntry",
"NewColumn": "DataEntry",
"Status": "matched",
"ColumnDef": {
"Name": "DataEntry",
"Type": "varchar(255)",
"Nullable": "YES"
}
},
{
"OldColumn": "ResultsPrinter",
"NewColumn": "ResultsPrinter",
"Status": "matched",
"ColumnDef": {
"Name": "ResultsPrinter",
"Type": "varchar(255)",
"Nullable": "YES"
}
},
{
"OldColumn": "ResultsWriter",
"NewColumn": "ResultsWriter",
"Status": "matched",
"ColumnDef": {
"Name": "ResultsWriter",
"Type": "varchar(255)",
"Nullable": "YES"
}
},
{
"OldColumn": "TransitionStart",
"NewColumn": "TransitionStart",
"Status": "matched",
"ColumnDef": {
"Name": "TransitionStart",
"Type": "varchar(255)",
"Nullable": "YES"
}
},
{
"OldColumn": "TransitionEnd",
"NewColumn": "TransitionEnd",
"Status": "matched",
"ColumnDef": {
"Name": "TransitionEnd",
"Type": "varchar(255)",
"Nullable": "YES"
}
},
{
"OldColumn": "AltProcName",
"NewColumn": "AltProcName",
"Status": "matched",
"ColumnDef": {
"Name": "AltProcName",
"Type": "varchar(255)",
"Nullable": "YES"
}
},
{
"OldColumn": "AltProcPeriod",
"NewColumn": "AltProcPeriod",
"Status": "matched",
"ColumnDef": {
"Name": "AltProcPeriod",
"Type": "int(11)",
"Nullable": "NO"
}
}
],
"IsNewTable": false
},
{
"TableName": "test",
"ColumnMappings": [
{
"OldColumn": "Id",
"NewColumn": "Id",
"Status": "matched",
"ColumnDef": {
"Name": "Id",
"Type": "int(11)",
"Nullable": "NO"
}
},
{
"OldColumn": "ItemNr",
"NewColumn": "ItemNr",
"Status": "matched",
"ColumnDef": {
"Name": "ItemNr",
"Type": "int(11)",
"Nullable": "YES"
}
},
{
"OldColumn": "Name",
"NewColumn": "Name",
"Status": "matched",
"ColumnDef": {
"Name": "Name",
"Type": "varchar(255)",
"Nullable": "YES"
}
},
{
"OldColumn": "Part",
"NewColumn": "Part",
"Status": "matched",
"ColumnDef": {
"Name": "Part",
"Type": "int(11)",
"Nullable": "YES"
}
},
{
"OldColumn": "Publish",
"NewColumn": "Publish",
"Status": "matched",
"ColumnDef": {
"Name": "Publish",
"Type": "tinyint(4)",
"Nullable": "YES"
}
},
{
"OldColumn": "Evaluate",
"NewColumn": "DoEvaluate",
"Status": "Renamed",
"Note": "",
"ColumnDef": {
"Name": "Evaluate",
"Type": "tinyint(1)",
"Nullable": "YES"
}
},
{
"OldColumn": "Qfrom",
"NewColumn": "Qfrom",
"Status": "Change",
"Note": "Could be part of JSON or renamed",
"ColumnDefList": [{
"Name": "Qfrom",
"Type": "float",
"Nullable": "YES"
},
{
"Name": "Qfrom",
"Type": "double",
"Nullable": "YES"
}
]
},
{
"OldColumn": "Qto",
"NewColumn": "Qto",
"Status": "Change",
"Note": "",
"ColumnDefList": [
{
"Name": "Qto",
"Type": "float",
"Nullable": "YES"
},
{
"Name": "Qto",
"Type": "double",
"Nullable": "YES"
}
]
},
{
"OldColumn": "Volume",
"Status": "Change",
"Note": "",
"ColumnDefList": [
{
"Name": "Volume",
"Type": "float",
"Nullable": "YES"
},
{
"Name": "Volume",
"Type": "double",
"Nullable": "YES"
}
]
},
{
"OldColumn": "TstTime",
"NewColumn": "TestTime",
"Status": "update",
"Note": "Could be part of JSON or renamed",
"ColumnDefList": [
{
"Name": "TstTime",
"Type": "float",
"Nullable": "YES"
},
{
"Name": "TestTime",
"Type": "double",
"Nullable": "YES"
}
]
},
{
"OldColumn": "Repeats",
"NewColumn": "Repeats",
"Status": "matched",
"ColumnDef": {
"Name": "Repeats",
"Type": "int(11)",
"Nullable": "YES"
}
},
{
"OldColumn": "Emptying",
"NewColumn": "DoDraining",
"Status": "Renamed",
"Note": "",
"ColumnDef": {
"Name": "Emptying",
"Type": "tinyint(1)",
"Nullable": "YES"
}
},
{
"OldColumn": "Zeroing",
"Status": "uncertain",
"Note": "Could be part of JSON or renamed",
"ColumnDef": {
"Name": "Zeroing",
"Type": "tinyint(1)",
"Nullable": "YES"
}
},
{
"OldColumn": "DoControlWaterTemp",
"Status": "uncertain",
"Note": "Could be part of JSON or renamed",
"ColumnDef": {
"Name": "DoControlWaterTemp",
"Type": "tinyint(1)",
"Nullable": "NO"
}
},
{
"OldColumn": "TempLimLo",
"NewColumn": "TempLimLo",
"Status": "matched",
"ColumnDef": {
"Name": "TempLimLo",
"Type": "float",
"Nullable": "NO"
}
},
{
"OldColumn": "TempLimHi",
"NewColumn": "TempLimHi",
"Status": "matched",
"ColumnDef": {
"Name": "TempLimHi",
"Type": "float",
"Nullable": "NO"
}
},
{
"OldColumn": "PumpPower",
"NewColumn": "PumpPower",
"Status": "matched",
"ColumnDef": {
"Name": "PumpPower",
"Type": "float",
"Nullable": "YES"
}
},
{
"OldColumn": "MassRepeats",
"NewColumn": "MassRepeats",
"Status": "matched",
"ColumnDef": {
"Name": "MassRepeats",
"Type": "int(11)",
"Nullable": "YES"
}
},
{
"OldColumn": "MassSpread",
"NewColumn": "MassSpread",
"Status": "matched",
"ColumnDef": {
"Name": "MassSpread",
"Type": "float",
"Nullable": "YES"
}
},
{
"OldColumn": "MassMethod",
"NewColumn": "MassMethod",
"Status": "Changed",
"Note": "`MassMethod` tinyint(3) unsigned DEFAULT NULL,",
"ColumnDefList": [
{
"Name": "MassMethod",
"Type": "tinyint(1)",
"Nullable": "YES"
},
{
"Name": "MassMethod",
"Type": "tinyint(3)",
"Nullable": "YES"
}
]
},
{
"OldColumn": "TimeBeforeFlow",
"NewColumn": "TimeBeforeFlow",
"Status": "matched",
"ColumnDef": {
"Name": "TimeBeforeFlow",
"Type": "int(11)",
"Nullable": "YES"
}
},
{
"OldColumn": "TimeFlow2Mass",
"NewColumn": "TimeFlow2Mass",
"Status": "matched",
"ColumnDef": {
"Name": "TimeFlow2Mass",
"Type": "int(11)",
"Nullable": "YES"
}
},
{
"OldColumn": "TimeMass2Start",
"NewColumn": "TimePump2StartV",
"Status": "Renamed",
"Note": "",
"ColumnDef": {
"Name": "TimeMass2Start",
"Type": "int(11)",
"Nullable": "YES"
}
},
{
"OldColumn": "TimeStop2Mass",
"NewColumn": "TimeStop2Mass",
"Status": "matched",
"ColumnDef": {
"Name": "TimeStop2Mass",
"Type": "int(11)",
"Nullable": "YES"
}
},
{
"OldColumn": "Method",
"NewColumn": "Method",
"Status": "matched",
"ColumnDef": {
"Name": "Method",
"Type": "varchar(255)",
"Nullable": "YES"
}
},
{
"OldColumn": "ErrLimLo",
"NewColumn": "ErrLimLo",
"Status": "matched",
"ColumnDef": {
"Name": "ErrLimLo",
"Type": "float",
"Nullable": "YES"
}
},
{
"OldColumn": "ErrLimHi",
"NewColumn": "ErrLimHi",
"Status": "matched",
"ColumnDef": {
"Name": "ErrLimHi",
"Type": "float",
"Nullable": "YES"
}
},
{
"OldColumn": "Uncertainty",
"NewColumn": "Uncertainty",
"Status": "matched",
"ColumnDef": {
"Name": "Uncertainty",
"Type": "float",
"Nullable": "YES"
}
},
{
"OldColumn": "TolerRed",
"Status": "Deleted",
"ColumnDef": {
"Name": "TolerRed",
"Type": "double",
"Nullable": "YES"
}
},
{
"OldColumn": "RedType",
"Status": "Deleted",
"ColumnDef": {
"Name": "RedType",
"Type": "varchar(255)",
"Nullable": "YES"
}
},
{
"OldColumn": "FeedingPath",
"NewColumn": "FeedingPath",
"Status": "matched",
"ColumnDef": {
"Name": "FeedingPath",
"Type": "varchar(255)",
"Nullable": "YES"
}
},
{
"OldColumn": "BenchPath",
"NewColumn": "BenchPath",
"Status": "matched",
"ColumnDef": {
"Name": "BenchPath",
"Type": "varchar(255)",
"Nullable": "YES"
}
},
{
"OldColumn": "OutputPath",
"NewColumn": "OutputPath",
"Status": "matched",
"ColumnDef": {
"Name": "OutputPath",
"Type": "varchar(255)",
"Nullable": "YES"
}
},
{
"OldColumn": "MetersPath",
"NewColumn": "MetersPath",
"Status": "matched",
"ColumnDef": {
"Name": "MetersPath",
"Type": "varchar(255)",
"Nullable": "YES"
}
},
{
"OldColumn": "HeatMetersPath",
"NewColumn": "HeatMetersPath",
"Status": "matched",
"ColumnDef": {
"Name": "HeatMetersPath",
"Type": "varchar(255)",
"Nullable": "YES"
}
},
{
"OldColumn": "RelTransBefore",
"NewColumn": "TransBefore",
"Status": "Renamed",
"ColumnDef": {
"Name": "RelTransBefore",
"Type": "varchar(255)",
"Nullable": "YES"
}
},
{
"OldColumn": "RelTransBetween",
"NewColumn": "TransBetween",
"Status": "Renamed",
"Note": "",
"ColumnDef": {
"Name": "RelTransBetween",
"Type": "varchar(255)",
"Nullable": "YES"
}
},
{
"OldColumn": "RelTransAfter",
"NewColumn": "TransAfter",
"Status": "Renamed",
"Note": "",
"ColumnDef": {
"Name": "RelTransAfter",
"Type": "varchar(255)",
"Nullable": "YES"
}
},
{
"OldColumn": "TransitionAfter",
"Status": "Deleted",
"Note": "",
"ColumnDef": {
"Name": "TransitionAfter",
"Type": "varchar(255)",
"Nullable": "YES"
}
},
{
"OldColumn": "Procedure_id",
"NewColumn": "Procedure_id",
"Status": "matched",
"ColumnDef": {
"Name": "Procedure_id",
"Type": "int(11)",
"Nullable": "YES"
}
}
],
"IsNewTable": false
},
{
"TableName": "componentprocedure",
"ColumnMappings": [
{
"OldColumn": "Id",
"NewColumn": "Id",
"Status": "matched",
"ColumnDef": {
"Name": "Id",
"Type": "int(11)",
"Nullable": "NO"
}
},
{
"OldColumn": "CmpntName",
"NewColumn": "CmpntName",
"Status": "matched",
"ColumnDef": {
"Name": "CmpntName",
"Type": "varchar(255)",
"Nullable": "YES"
}
},
{
"OldColumn": "Parameters",
"NewColumn": "Parameters",
"Status": "matched",
"ColumnDef": {
"Name": "Parameters",
"Type": "varchar(8000)",
"Nullable": "YES"
}
},
{
"OldColumn": "Procedure_id",
"NewColumn": "Procedure_id",
"Status": "matched",
"ColumnDef": {
"Name": "Procedure_id",
"Type": "int(11)",
"Nullable": "YES"
}
}
],
"IsNewTable": false
},
{
"TableName": "componenttest",
"ColumnMappings": [
{
"OldColumn": "Id",
"NewColumn": "Id",
"Status": "matched",
"ColumnDef": {
"Name": "Id",
"Type": "int(11)",
"Nullable": "NO"
}
},
{
"OldColumn": "CmpntName",
"NewColumn": "CmpntName",
"Status": "matched",
"ColumnDef": {
"Name": "CmpntName",
"Type": "varchar(255)",
"Nullable": "YES"
}
},
{
"OldColumn": "Parameters",
"NewColumn": "Parameters",
"Status": "matched",
"ColumnDef": {
"Name": "Parameters",
"Type": "varchar(8000)",
"Nullable": "YES"
}
},
{
"OldColumn": "Test_id",
"NewColumn": "Test_id",
"Status": "matched",
"ColumnDef": {
"Name": "Test_id",
"Type": "int(11)",
"Nullable": "YES"
}
}
],
"IsNewTable": false
}
]
}