New Test and updated schema mapping
This commit is contained in:
parent
280a07c150
commit
5cf7d76ebd
@ -809,7 +809,268 @@
|
||||
}
|
||||
],
|
||||
"IsNewTable": false
|
||||
},
|
||||
{
|
||||
"TableName": "user",
|
||||
"ColumnMappings": [
|
||||
{
|
||||
"OldColumn": "Id",
|
||||
"NewColumn": "Id",
|
||||
"Status": "matched",
|
||||
"ColumnDef": {
|
||||
"Name": "Id",
|
||||
"Type": "int(11)",
|
||||
"Nullable": "NO"
|
||||
}
|
||||
},
|
||||
{
|
||||
"OldColumn": "Name",
|
||||
"NewColumn": "Name",
|
||||
"Status": "matched",
|
||||
"ColumnDef": {
|
||||
"Name": "Name",
|
||||
"Type": "varchar(255)",
|
||||
"Nullable": "YES"
|
||||
}
|
||||
},
|
||||
{
|
||||
"OldColumn": "Number",
|
||||
"NewColumn": "Number",
|
||||
"Status": "matched",
|
||||
"ColumnDef": {
|
||||
"Name": "Number",
|
||||
"Type": "int(11)",
|
||||
"Nullable": "YES"
|
||||
}
|
||||
},
|
||||
{
|
||||
"OldColumn": "Password",
|
||||
"NewColumn": "Password",
|
||||
"Status": "matched",
|
||||
"ColumnDef": {
|
||||
"Name": "Password",
|
||||
"Type": "varchar(255)",
|
||||
"Nullable": "YES"
|
||||
}
|
||||
},
|
||||
{
|
||||
"OldColumn": "Description",
|
||||
"NewColumn": "Description",
|
||||
"Status": "matched",
|
||||
"ColumnDef": {
|
||||
"Name": "Description",
|
||||
"Type": "varchar(255)",
|
||||
"Nullable": "YES"
|
||||
}
|
||||
},
|
||||
{
|
||||
"OldColumn": "LastPwChange",
|
||||
"NewColumn": "LastPwChange",
|
||||
"Status": "matched",
|
||||
"ColumnDef": {
|
||||
"Name": "LastPwChange",
|
||||
"Type": "datetime",
|
||||
"Nullable": "YES"
|
||||
}
|
||||
}
|
||||
],
|
||||
"IsNewTable": false
|
||||
},
|
||||
{
|
||||
"TableName": "group",
|
||||
"ColumnMappings": [
|
||||
{
|
||||
"OldColumn": "Id",
|
||||
"NewColumn": "Id",
|
||||
"Status": "matched",
|
||||
"ColumnDef": {
|
||||
"Name": "Id",
|
||||
"Type": "int(11)",
|
||||
"Nullable": "NO"
|
||||
}
|
||||
},
|
||||
{
|
||||
"OldColumn": "Gid",
|
||||
"NewColumn": "Gid",
|
||||
"Status": "matched",
|
||||
"Note": "Could be part of JSON or renamed",
|
||||
"ColumnDef": {
|
||||
"Name": "Gid",
|
||||
"Type": "int(11)",
|
||||
"Nullable": "YES"
|
||||
}
|
||||
},
|
||||
{
|
||||
"OldColumn": "Name",
|
||||
"NewColumn": "Name",
|
||||
"Status": "matched",
|
||||
"ColumnDef": {
|
||||
"Name": "Name",
|
||||
"Type": "varchar(255)",
|
||||
"Nullable": "YES"
|
||||
}
|
||||
},
|
||||
{
|
||||
"OldColumn": "User_id",
|
||||
"NewColumn": "User_id",
|
||||
"Status": "matched",
|
||||
"Note": "Could be part of JSON or renamed",
|
||||
"ColumnDef": {
|
||||
"Name": "User_id",
|
||||
"Type": "int(11)",
|
||||
"Nullable": "YES"
|
||||
}
|
||||
}
|
||||
],
|
||||
"IsNewTable": false
|
||||
},
|
||||
{
|
||||
"TableName": "component",
|
||||
"ColumnMappings": [
|
||||
{
|
||||
"OldColumn": "Id",
|
||||
"NewColumn": "Id",
|
||||
"Status": "matched",
|
||||
"ColumnDef": {
|
||||
"Name": "Id",
|
||||
"Type": "int(11)",
|
||||
"Nullable": "NO"
|
||||
}
|
||||
},
|
||||
{
|
||||
"OldColumn": "Name",
|
||||
"NewColumn": "Name",
|
||||
"Status": "matched",
|
||||
"ColumnDef": {
|
||||
"Name": "Name",
|
||||
"Type": "varchar(255)",
|
||||
"Nullable": "YES"
|
||||
}
|
||||
},
|
||||
{
|
||||
"OldColumn": "ClassName",
|
||||
"NewColumn": "ClassName",
|
||||
"Status": "matched",
|
||||
"ColumnDef": {
|
||||
"Name": "ClassName",
|
||||
"Type": "varchar(255)",
|
||||
"Nullable": "YES"
|
||||
}
|
||||
},
|
||||
{
|
||||
"OldColumn": "ParentName",
|
||||
"NewColumn": "ParentName",
|
||||
"Status": "matched",
|
||||
"Note": "Could be part of JSON or renamed",
|
||||
"ColumnDef": {
|
||||
"Name": "ParentName",
|
||||
"Type": "varchar(255)",
|
||||
"Nullable": "YES"
|
||||
}
|
||||
},
|
||||
{
|
||||
"OldColumn": "ItemNr",
|
||||
"NewColumn": "ItemNr",
|
||||
"Status": "matched",
|
||||
"ColumnDef": {
|
||||
"Name": "ItemNr",
|
||||
"Type": "int(11)",
|
||||
"Nullable": "YES"
|
||||
}
|
||||
},
|
||||
{
|
||||
"OldColumn": "Mode",
|
||||
"NewColumn": "Mode",
|
||||
"Status": "matched",
|
||||
"Note": "Could be part of JSON or renamed",
|
||||
"ColumnDef": {
|
||||
"Name": "Mode",
|
||||
"Type": "varchar(255)",
|
||||
"Nullable": "YES"
|
||||
}
|
||||
},
|
||||
{
|
||||
"OldColumn": "Logging",
|
||||
"NewColumn": "Logging",
|
||||
"Status": "matched",
|
||||
"Note": "Could be part of JSON or renamed",
|
||||
"ColumnDef": {
|
||||
"Name": "Logging",
|
||||
"Type": "varchar(255)",
|
||||
"Nullable": "YES"
|
||||
}
|
||||
},
|
||||
{
|
||||
"OldColumn": "Parameters",
|
||||
"NewColumn": "Parameters",
|
||||
"Status": "matched",
|
||||
"Note": "Could be part of JSON or renamed",
|
||||
"ColumnDef": {
|
||||
"Name": "Parameters",
|
||||
"Type": "varchar(8000)",
|
||||
"Nullable": "YES"
|
||||
}
|
||||
}
|
||||
],
|
||||
"IsNewTable": false
|
||||
},
|
||||
{
|
||||
"TableName": "measurementcorrection",
|
||||
"ColumnMappings": [
|
||||
{
|
||||
"OldColumn": "Id",
|
||||
"NewColumn": "Id",
|
||||
"Status": "matched",
|
||||
"ColumnDef": {
|
||||
"Name": "Id",
|
||||
"Type": "int(11)",
|
||||
"Nullable": "NO"
|
||||
}
|
||||
},
|
||||
{
|
||||
"OldColumn": "RangeIx",
|
||||
"NewColumn": "RangeIx",
|
||||
"Status": "matched",
|
||||
"ColumnDef": {
|
||||
"Name": "RangeIx",
|
||||
"Type": "int(11)",
|
||||
"Nullable": "NO"
|
||||
}
|
||||
},
|
||||
{
|
||||
"OldColumn": "Measurement",
|
||||
"NewColumn": "Measurement",
|
||||
"Status": "matched",
|
||||
"Note": "Could be part of JSON or renamed",
|
||||
"ColumnDef": {
|
||||
"Name": "Measurement",
|
||||
"Type": "float",
|
||||
"Nullable": "YES"
|
||||
}
|
||||
},
|
||||
{
|
||||
"OldColumn": "Correction",
|
||||
"NewColumn": "Correction",
|
||||
"Status": "matched",
|
||||
"Note": "Could be part of JSON or renamed",
|
||||
"ColumnDef": {
|
||||
"Name": "Correction",
|
||||
"Type": "float",
|
||||
"Nullable": "YES"
|
||||
}
|
||||
},
|
||||
{
|
||||
"OldColumn": "Component_id",
|
||||
"NewColumn": "Component_id",
|
||||
"Status": "matched",
|
||||
"ColumnDef": {
|
||||
"Name": "Component_id",
|
||||
"Type": "int(11)",
|
||||
"Nullable": "YES"
|
||||
}
|
||||
}
|
||||
],
|
||||
"IsNewTable": false
|
||||
}
|
||||
|
||||
]
|
||||
}
|
||||
@ -55,6 +55,15 @@ public class SqlDumpFileParserTest
|
||||
|
||||
ValidateSqlDumpParserResults(sql);
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void SqlDumpParserFile_2()
|
||||
{
|
||||
string basePath = GetProjectRoot();
|
||||
string sql = Path.Combine(basePath,"Resources/slm50-250709-1549.sql");
|
||||
|
||||
ValidateSqlDumpParserResults(sql);
|
||||
}
|
||||
|
||||
private static void ValidateSqlDumpParserResults(string sql)
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user