1
+ <cfg name =" NorthWind" flatten =" true" >
2
+ <connections >
3
+ <add name =" input" provider =" sqlserver" user =" sa" password =" Secret1!" database =" Northwind" />
4
+ <add name =" output" provider =" postgresql" user =" postgres" password =" Secret1!" database =" TflNorthwind" />
5
+ </connections >
6
+ <entities >
7
+ <add name =" Order Details" version =" RowVersion" >
8
+ <fields >
9
+ <add name =" OrderID" type =" int" primary-key =" true" />
10
+ <add name =" ProductID" type =" int" primary-key =" true" />
11
+ <add name =" UnitPrice" type =" decimal" precision =" 19" scale =" 4" />
12
+ <add name =" Quantity" type =" short" />
13
+ <add name =" Discount" type =" single" />
14
+ <add name =" RowVersion" type =" byte[]" length =" 8" />
15
+ </fields >
16
+ <calculated-fields >
17
+ <add name =" Revenue" type =" decimal" t =" js(Quantity * ((1-Discount) * UnitPrice)).round(2)" />
18
+ </calculated-fields >
19
+ </add >
20
+ <add name =" Orders" version =" RowVersion" >
21
+ <fields >
22
+ <add name =" OrderID" type =" int" primarykey =" true" />
23
+ <add name =" CustomerID" length =" 5" />
24
+ <add name =" EmployeeID" type =" int" />
25
+ <add name =" OrderDate" type =" datetime" />
26
+ <add name =" RequiredDate" type =" datetime" />
27
+ <add name =" ShippedDate" type =" datetime" />
28
+ <add name =" ShipVia" type =" int" />
29
+ <add name =" Freight" type =" decimal" precision =" 19" scale =" 4" />
30
+ <add name =" ShipName" length =" 40" />
31
+ <add name =" ShipAddress" length =" 60" />
32
+ <add name =" ShipCity" length =" 15" />
33
+ <add name =" ShipRegion" length =" 15" />
34
+ <add name =" ShipPostalCode" length =" 10" />
35
+ <add name =" ShipCountry" length =" 15" />
36
+ <add name =" RowVersion" type =" byte[]" alias =" OrdersRowVersion" length =" 8" />
37
+ </fields >
38
+ </add >
39
+ <add name =" Products" version =" RowVersion" >
40
+ <fields >
41
+ <add name =" ProductID" type =" int" primarykey =" true" />
42
+ <add name =" ProductName" length =" 40" />
43
+ <add name =" SupplierID" type =" int" />
44
+ <add name =" CategoryID" type =" int" />
45
+ <add name =" QuantityPerUnit" length =" 20" />
46
+ <add name =" UnitPrice" type =" decimal" precision =" 19" scale =" 4" alias =" ProductsUnitPrice" />
47
+ <add name =" UnitsInStock" type =" short" />
48
+ <add name =" UnitsOnOrder" type =" short" />
49
+ <add name =" ReorderLevel" type =" short" />
50
+ <add name =" Discontinued" type =" bool" />
51
+ <add name =" RowVersion" type =" byte[]" alias =" ProductsRowVersion" length =" 8" />
52
+ </fields >
53
+ </add >
54
+ <add name =" Customers" version =" RowVersion" >
55
+ <fields >
56
+ <add name =" CustomerID" primarykey =" true" length =" 5" />
57
+ <add name =" CompanyName" length =" 40" />
58
+ <add name =" ContactName" length =" 30" />
59
+ <add name =" ContactTitle" length =" 30" />
60
+ <add name =" Address" length =" 60" />
61
+ <add name =" City" length =" 15" />
62
+ <add name =" Region" length =" 15" />
63
+ <add name =" PostalCode" length =" 10" />
64
+ <add name =" Country" length =" 15" />
65
+ <add name =" Phone" length =" 24" />
66
+ <add name =" Fax" length =" 24" />
67
+ <add name =" RowVersion" type =" byte[]" alias =" CustomersRowVersion" length =" 8" />
68
+ </fields >
69
+ </add >
70
+ <add name =" Employees" version =" RowVersion" >
71
+ <fields >
72
+ <add name =" EmployeeID" type =" int" primarykey =" true" />
73
+ <add name =" LastName" length =" 20" />
74
+ <add name =" FirstName" length =" 10" />
75
+ <add name =" Title" length =" 30" />
76
+ <add name =" TitleOfCourtesy" length =" 25" />
77
+ <add name =" BirthDate" type =" datetime" />
78
+ <add name =" HireDate" type =" datetime" />
79
+ <add name =" Address" alias =" EmployeesAddress" length =" 60" />
80
+ <add name =" City" alias =" EmployeesCity" length =" 15" />
81
+ <add name =" Region" alias =" EmployeesRegion" length =" 15" />
82
+ <add name =" PostalCode" alias =" EmployeesPostalCode" length =" 10" />
83
+ <add name =" Country" alias =" EmployeesCountry" length =" 15" />
84
+ <add name =" HomePhone" length =" 24" />
85
+ <add name =" Extension" length =" 4" />
86
+ <add name =" Photo" type =" byte[]" length =" max" />
87
+ <add name =" Notes" length =" max" />
88
+ <add name =" ReportsTo" type =" int" />
89
+ <add name =" PhotoPath" length =" 255" />
90
+ <add name =" RowVersion" type =" byte[]" alias =" EmployeesRowVersion" length =" 8" />
91
+ </fields >
92
+ </add >
93
+ <add name =" Shippers" version =" RowVersion" >
94
+ <fields >
95
+ <add name =" ShipperID" type =" int" primarykey =" true" />
96
+ <add name =" CompanyName" alias =" ShippersCompanyName" length =" 40" />
97
+ <add name =" Phone" alias =" ShippersPhone" length =" 24" />
98
+ <add name =" RowVersion" type =" byte[]" alias =" ShippersRowVersion" length =" 8" />
99
+ </fields >
100
+ </add >
101
+ <add name =" Suppliers" version =" RowVersion" >
102
+ <fields >
103
+ <add name =" SupplierID" type =" int" primarykey =" true" />
104
+ <add name =" CompanyName" alias =" SuppliersCompanyName" length =" 40" />
105
+ <add name =" ContactName" alias =" SuppliersContactName" length =" 30" />
106
+ <add name =" ContactTitle" alias =" SuppliersContactTitle" length =" 30" />
107
+ <add name =" Address" alias =" SuppliersAddress" length =" 60" />
108
+ <add name =" City" alias =" SuppliersCity" length =" 15" />
109
+ <add name =" Region" alias =" SuppliersRegion" length =" 15" />
110
+ <add name =" PostalCode" alias =" SuppliersPostalCode" length =" 10" />
111
+ <add name =" Country" alias =" SuppliersCountry" length =" 15" />
112
+ <add name =" Phone" alias =" SuppliersPhone" length =" 24" />
113
+ <add name =" Fax" alias =" SuppliersFax" length =" 24" />
114
+ <add name =" HomePage" length =" max" />
115
+ <add name =" RowVersion" type =" byte[]" alias =" SuppliersRowVersion" length =" 8" />
116
+ </fields >
117
+ </add >
118
+ <add name =" Categories" version =" RowVersion" >
119
+ <fields >
120
+ <add name =" CategoryID" type =" int" primarykey =" true" />
121
+ <add name =" CategoryName" length =" 15" />
122
+ <add name =" Description" length =" max" />
123
+ <add name =" Picture" type =" byte[]" length =" max" />
124
+ <add name =" RowVersion" type =" byte[]" alias =" CategoriesRowVersion" length =" 8" />
125
+ </fields >
126
+ </add >
127
+ </entities >
128
+ <relationships >
129
+ <!-- following Orders to Customers, Employees, and Shippers -->
130
+ <add left-entity =" Order Details" left-field =" OrderID" right-entity =" Orders" right-field =" OrderID" />
131
+ <add left-entity =" Orders" left-field =" CustomerID" right-entity =" Customers" right-field =" CustomerID" />
132
+ <add left-entity =" Orders" left-field =" EmployeeID" right-entity =" Employees" right-field =" EmployeeID" />
133
+ <add left-entity =" Orders" left-field =" ShipVia" right-entity =" Shippers" right-field =" ShipperID" />
134
+
135
+ <!-- following Products to Suppliers and Categories -->
136
+ <add left-entity =" Order Details" left-field =" ProductID" right-entity =" Products" right-field =" ProductID" />
137
+ <add left-entity =" Products" left-field =" SupplierID" right-entity =" Suppliers" right-field =" SupplierID" />
138
+ <add left-entity =" Products" left-field =" CategoryID" right-entity =" Categories" right-field =" CategoryID" />
139
+ </relationships >
140
+ </cfg >
0 commit comments