Initial Commit after switching from SVN to git
This commit is contained in:
@@ -0,0 +1,59 @@
|
||||
DECLARe @AS XML;
|
||||
|
||||
SET @as = [dbo].[mfr__schema]();
|
||||
|
||||
DECLARE @types TABLE ([edm] varchar(100), [sql] varchar(50));
|
||||
INSERT INTO @types VALUES ('Edm.Boolean', 'bit'),
|
||||
('Edm.DateTime', 'DateTime'),
|
||||
('Edm.Decimal', 'decimal'),
|
||||
('Edm.Double', 'float'),
|
||||
('Edm.Int32', 'int'),
|
||||
('Edm.Int64', 'bigint'),
|
||||
('Edm.String', 'varchar(255)');
|
||||
|
||||
|
||||
--WITH XMLNAMESPACES
|
||||
--(
|
||||
|
||||
-- 'http://schemas.microsoft.com/ado/2007/06/edmx' as edmx,
|
||||
-- 'http://schemas.microsoft.com/ado/2007/08/dataservices/metadata' as m
|
||||
--) , x as (
|
||||
-- SELECT ROW_NUMBER() OVER(ORDER BY (SELECT NULL)) as '#', xD.value('@Name', 'varchar(255)') as 'set', xD.value('End[1]/@Role', 'varchar(255)') as 'role1', xD.value('End[2]/@Role', 'varchar(255)') as 'role2' , xD.query('.') as 'q' from @as.nodes('/Schema/EntityContainer/AssociationSet') as xm(xD)
|
||||
--), y as (
|
||||
-- select [#], [role1], [role2], RIGHT([set],CHARINDEX('_', REVERSE([set])) - 1) as [name]
|
||||
|
||||
-- from x
|
||||
--), z as(
|
||||
-- SELECT [cmd] = N'DROP TABLE IF EXISTS [dbo].[mfr__*' + [name] + N'] GO' + CHAR(10) + ' CREATE TABLE [dbo].[mfr__*' + [name] + N']([' + [role1] + N'] [bigint] NOT NULL,[' + [role2] + N'] [bigint] NOT NULL) ON [PRIMARY] GO' + CHAR(10) FROM y
|
||||
--)
|
||||
--select TOP( 1000) * from z;
|
||||
|
||||
|
||||
--WITH XMLNAMESPACES
|
||||
--(
|
||||
|
||||
-- 'http://schemas.microsoft.com/ado/2007/06/edmx' as edmx,
|
||||
-- 'http://schemas.microsoft.com/ado/2007/08/dataservices/metadata' as m
|
||||
--), x as (
|
||||
-- SELECT xD.value('@Name', 'varchar(255)') as [name], xD.query('.') as 'q' from @as.nodes('/Schema/EntityContainer/EntitySet') as xm(xD)
|
||||
--)
|
||||
--SELEcT * FROM x
|
||||
-- where not exists(select * from sys.objects as o where type_desc = 'USER_TABLE' AND o.[name] = 'mfr__' + x.[name]);
|
||||
|
||||
|
||||
WITH XMLNAMESPACES
|
||||
(
|
||||
'http://schemas.microsoft.com/ado/2007/06/edmx' as edmx,
|
||||
'http://schemas.microsoft.com/ado/2007/08/dataservices/metadata' as m
|
||||
), np as (
|
||||
SELECT ROW_NUMBER() OVER(ORDER BY (SELECT NULL)) as '#', xD.value('../@Name', 'varchar(255)') as [parent], xD.value('@Name', 'varchar(255)') as [name], xD.value('@Type', 'varchar(255)') as [Type], ISNULL(xD.value('@Nullable', 'bit'),1) as [nullable], xD.value('@ToRole', 'varchar(255)') as [ToRole], xD.value('@FromRole', 'varchar(255)') as [FromRole]-- , xD.query('.') as 'q'
|
||||
from @as.nodes('/Schema[1]/EntityType/Property') as xm(xD)
|
||||
)
|
||||
--select distinct [type] from np
|
||||
SELECT '[' + [name] + '] '
|
||||
+ t.sql
|
||||
+ CASE WHEN [nullable] = 0 THEN ' NOT NULL' ELSE '' END
|
||||
+ ','
|
||||
from np LEFT JOIN @types as t ON np.[Type] = t.[edm]
|
||||
where parent = 'StockMovement' order by [#]
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,93 @@
|
||||
{
|
||||
"odata.metadata": "https://portal.mobilefieldreport.com/odata/$metadata",
|
||||
"value": [
|
||||
{
|
||||
"name": "ItemTypes",
|
||||
"url": "ItemTypes"
|
||||
},
|
||||
{
|
||||
"name": "ServiceRequests",
|
||||
"url": "ServiceRequests"
|
||||
},
|
||||
{
|
||||
"name": "Items",
|
||||
"url": "Items"
|
||||
},
|
||||
{
|
||||
"name": "StockMovements",
|
||||
"url": "StockMovements"
|
||||
},
|
||||
{
|
||||
"name": "CostCenters",
|
||||
"url": "CostCenters"
|
||||
},
|
||||
{
|
||||
"name": "ItemUnits",
|
||||
"url": "ItemUnits"
|
||||
},
|
||||
{
|
||||
"name": "TimeEvents",
|
||||
"url": "TimeEvents"
|
||||
},
|
||||
{
|
||||
"name": "Documents",
|
||||
"url": "Documents"
|
||||
},
|
||||
{
|
||||
"name": "Reports",
|
||||
"url": "Reports"
|
||||
},
|
||||
{
|
||||
"name": "Comments",
|
||||
"url": "Comments"
|
||||
},
|
||||
{
|
||||
"name": "Attachments",
|
||||
"url": "Attachments"
|
||||
},
|
||||
{
|
||||
"name": "Appointments",
|
||||
"url": "Appointments"
|
||||
},
|
||||
{
|
||||
"name": "Steps",
|
||||
"url": "Steps"
|
||||
},
|
||||
{
|
||||
"name": "ServiceObjects",
|
||||
"url": "ServiceObjects"
|
||||
},
|
||||
{
|
||||
"name": "StepListTemplates",
|
||||
"url": "StepListTemplates"
|
||||
},
|
||||
{
|
||||
"name": "StepListTemplateInstances",
|
||||
"url": "StepListTemplateInstances"
|
||||
},
|
||||
{
|
||||
"name": "Contacts",
|
||||
"url": "Contacts"
|
||||
},
|
||||
{
|
||||
"name": "Tags",
|
||||
"url": "Tags"
|
||||
},
|
||||
{
|
||||
"name": "Products",
|
||||
"url": "Products"
|
||||
},
|
||||
{
|
||||
"name": "Companies",
|
||||
"url": "Companies"
|
||||
},
|
||||
{
|
||||
"name": "Users",
|
||||
"url": "Users"
|
||||
},
|
||||
{
|
||||
"name": "Qualifications",
|
||||
"url": "Qualifications"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,387 @@
|
||||
{
|
||||
"odata.metadata": "https://portal.mobilefieldreport.com/odata/$metadata#Companies",
|
||||
"value": [
|
||||
{
|
||||
"Contacts": [
|
||||
{
|
||||
"Id": "17030086658",
|
||||
"CustomValues": [],
|
||||
"FirstName": "Andre ",
|
||||
"LastName": "Winkels",
|
||||
"Email": "a.winkels@sanitaerfuchs.de",
|
||||
"JobTitle": "Technische Leitung",
|
||||
"MobilePhone": "0178-3137898",
|
||||
"Telephone": null,
|
||||
"Fax": null,
|
||||
"Note": null,
|
||||
"DateModified": "1980-01-01T00:00:00",
|
||||
"Version": 1,
|
||||
"CompanyId": "17029922816",
|
||||
"IsUser": false,
|
||||
"ExternalId": null,
|
||||
"Gender": "Male",
|
||||
"UserId": "0"
|
||||
},
|
||||
{
|
||||
"Id": "17494310912",
|
||||
"CustomValues": [],
|
||||
"FirstName": "system",
|
||||
"LastName": "system",
|
||||
"Email": "system@sebastian-fuchs---bad-und-heizung-gmbh-und-co-kg.com",
|
||||
"JobTitle": "system",
|
||||
"MobilePhone": null,
|
||||
"Telephone": null,
|
||||
"Fax": null,
|
||||
"Note": null,
|
||||
"DateModified": "1980-01-01T00:00:00",
|
||||
"Version": 1,
|
||||
"CompanyId": "17029922816",
|
||||
"IsUser": false,
|
||||
"ExternalId": null,
|
||||
"Gender": "Male",
|
||||
"UserId": "0"
|
||||
},
|
||||
{
|
||||
"Id": "17494310913",
|
||||
"CustomValues": [],
|
||||
"FirstName": "Simon",
|
||||
"LastName": "Schlese",
|
||||
"Email": "s.schlese@sanitaerfuchs.de",
|
||||
"JobTitle": "Technische Leitung",
|
||||
"MobilePhone": null,
|
||||
"Telephone": null,
|
||||
"Fax": null,
|
||||
"Note": null,
|
||||
"DateModified": "1980-01-01T00:00:00",
|
||||
"Version": 1,
|
||||
"CompanyId": "17029922816",
|
||||
"IsUser": false,
|
||||
"ExternalId": null,
|
||||
"Gender": "Male",
|
||||
"UserId": "0"
|
||||
}
|
||||
],
|
||||
"Tags": [],
|
||||
"ServiceObjects": [
|
||||
{
|
||||
"Location": null,
|
||||
"Id": "17030053888",
|
||||
"Name": "Munk",
|
||||
"Note": null,
|
||||
"CustomValues": [],
|
||||
"DateModified": "1980-01-01T00:00:00",
|
||||
"ExternalId": "S-2046",
|
||||
"MappingId": null,
|
||||
"QuickSearch": null,
|
||||
"Version": 2,
|
||||
"CreateGeoLocation": false,
|
||||
"IsWarehouse": false,
|
||||
"ParentServiceObjectId": "0",
|
||||
"CompanyId": "17029922816",
|
||||
"ProductId": "0"
|
||||
},
|
||||
{
|
||||
"Location": null,
|
||||
"Id": "17494245376",
|
||||
"Name": "Main-Taunus-Schule",
|
||||
"Note": null,
|
||||
"CustomValues": [],
|
||||
"DateModified": "1980-01-01T00:00:00",
|
||||
"ExternalId": "S-3337",
|
||||
"MappingId": null,
|
||||
"QuickSearch": null,
|
||||
"Version": 2,
|
||||
"CreateGeoLocation": false,
|
||||
"IsWarehouse": false,
|
||||
"ParentServiceObjectId": "0",
|
||||
"CompanyId": "17029922816",
|
||||
"ProductId": "0"
|
||||
}
|
||||
],
|
||||
"Location": {
|
||||
"Version": 0,
|
||||
"Id": "17029955584",
|
||||
"AddressString": "Germaniastraße 15",
|
||||
"Postal": "40223",
|
||||
"City": "Düsseldorf",
|
||||
"State": null,
|
||||
"Country": "DE",
|
||||
"Longitude": 6.7619074,
|
||||
"Latitude": 51.2072308,
|
||||
"IsValidLocation": true
|
||||
},
|
||||
"Id": "17029922816",
|
||||
"Version": 4,
|
||||
"IsPhysicalPerson": false,
|
||||
"IsOwner": false,
|
||||
"IsEmailInvoicingActive": false,
|
||||
"IsSupplier": false,
|
||||
"MappingId": null,
|
||||
"ExternalId": null,
|
||||
"Name": "Sebastian Fuchs - Bad und Heizung GmbH und Co. KG",
|
||||
"Note": null,
|
||||
"SupportTelephone": null,
|
||||
"SupportFax": null,
|
||||
"SupportMail": null,
|
||||
"QuickSearch": null,
|
||||
"DateModified": "1980-01-01T00:00:00",
|
||||
"CustomValues": [],
|
||||
"MainContactId": "0"
|
||||
},
|
||||
{
|
||||
"Contacts": [
|
||||
{
|
||||
"Id": "17030086656",
|
||||
"CustomValues": [],
|
||||
"FirstName": "",
|
||||
"LastName": "Munk",
|
||||
"Email": "renate.munk@gmx.net",
|
||||
"JobTitle": null,
|
||||
"MobilePhone": "",
|
||||
"Telephone": "0211 4059209 Fr. Munk",
|
||||
"Fax": "",
|
||||
"Note": null,
|
||||
"DateModified": "1980-01-01T00:00:00",
|
||||
"Version": 1,
|
||||
"CompanyId": "17029922817",
|
||||
"IsUser": false,
|
||||
"ExternalId": null,
|
||||
"Gender": "Male",
|
||||
"UserId": "0"
|
||||
}
|
||||
],
|
||||
"Tags": [],
|
||||
"ServiceObjects": [],
|
||||
"MainContact": {
|
||||
"Id": "17030086656",
|
||||
"CustomValues": [],
|
||||
"FirstName": "",
|
||||
"LastName": "Munk",
|
||||
"Email": "renate.munk@gmx.net",
|
||||
"JobTitle": null,
|
||||
"MobilePhone": "",
|
||||
"Telephone": "0211 4059209 Fr. Munk",
|
||||
"Fax": "",
|
||||
"Note": null,
|
||||
"DateModified": "1980-01-01T00:00:00",
|
||||
"Version": 1,
|
||||
"CompanyId": "17029922817",
|
||||
"IsUser": false,
|
||||
"ExternalId": null,
|
||||
"Gender": "Male",
|
||||
"UserId": "0"
|
||||
},
|
||||
"Location": {
|
||||
"Version": 0,
|
||||
"Id": "17029955586",
|
||||
"AddressString": "Alte Landstr. 91",
|
||||
"Postal": "40489",
|
||||
"City": "Düsseldorf",
|
||||
"State": null,
|
||||
"Country": "DE",
|
||||
"Longitude": 0.0,
|
||||
"Latitude": 0.0,
|
||||
"IsValidLocation": false
|
||||
},
|
||||
"Id": "17029922817",
|
||||
"Version": 2,
|
||||
"IsPhysicalPerson": false,
|
||||
"IsOwner": false,
|
||||
"IsEmailInvoicingActive": false,
|
||||
"IsSupplier": false,
|
||||
"MappingId": null,
|
||||
"ExternalId": "21455",
|
||||
"Name": "Munk",
|
||||
"Note": null,
|
||||
"SupportTelephone": "0211 4059209 Fr. Munk",
|
||||
"SupportFax": null,
|
||||
"SupportMail": "renate.munk@gmx.net",
|
||||
"QuickSearch": null,
|
||||
"DateModified": "1980-01-01T00:00:00",
|
||||
"CustomValues": [],
|
||||
"MainContactId": "17030086656"
|
||||
},
|
||||
{
|
||||
"Contacts": [
|
||||
{
|
||||
"Id": "17030086657",
|
||||
"CustomValues": [],
|
||||
"FirstName": "Herbert",
|
||||
"LastName": "Schons",
|
||||
"Email": "",
|
||||
"JobTitle": null,
|
||||
"MobilePhone": "0171 6581941",
|
||||
"Telephone": "",
|
||||
"Fax": "",
|
||||
"Note": null,
|
||||
"DateModified": "1980-01-01T00:00:00",
|
||||
"Version": 1,
|
||||
"CompanyId": "17029922818",
|
||||
"IsUser": false,
|
||||
"ExternalId": null,
|
||||
"Gender": "Male",
|
||||
"UserId": "0"
|
||||
}
|
||||
],
|
||||
"Tags": [],
|
||||
"ServiceObjects": [],
|
||||
"MainContact": {
|
||||
"Id": "17030086657",
|
||||
"CustomValues": [],
|
||||
"FirstName": "Herbert",
|
||||
"LastName": "Schons",
|
||||
"Email": "",
|
||||
"JobTitle": null,
|
||||
"MobilePhone": "0171 6581941",
|
||||
"Telephone": "",
|
||||
"Fax": "",
|
||||
"Note": null,
|
||||
"DateModified": "1980-01-01T00:00:00",
|
||||
"Version": 1,
|
||||
"CompanyId": "17029922818",
|
||||
"IsUser": false,
|
||||
"ExternalId": null,
|
||||
"Gender": "Male",
|
||||
"UserId": "0"
|
||||
},
|
||||
"Location": {
|
||||
"Version": 0,
|
||||
"Id": "17029955587",
|
||||
"AddressString": "Roßpfad 44",
|
||||
"Postal": "40489",
|
||||
"City": "Düsseldorf",
|
||||
"State": null,
|
||||
"Country": "DE",
|
||||
"Longitude": 0.0,
|
||||
"Latitude": 0.0,
|
||||
"IsValidLocation": false
|
||||
},
|
||||
"Id": "17029922818",
|
||||
"Version": 2,
|
||||
"IsPhysicalPerson": false,
|
||||
"IsOwner": false,
|
||||
"IsEmailInvoicingActive": false,
|
||||
"IsSupplier": false,
|
||||
"MappingId": null,
|
||||
"ExternalId": "21981",
|
||||
"Name": "Herbert Schons",
|
||||
"Note": null,
|
||||
"SupportTelephone": "",
|
||||
"SupportFax": null,
|
||||
"SupportMail": "",
|
||||
"QuickSearch": null,
|
||||
"DateModified": "1980-01-01T00:00:00",
|
||||
"CustomValues": [],
|
||||
"MainContactId": "17030086657"
|
||||
},
|
||||
{
|
||||
"Contacts": [],
|
||||
"Tags": [],
|
||||
"ServiceObjects": [
|
||||
{
|
||||
"Location": null,
|
||||
"Id": "15891563165",
|
||||
"Name": "Herrmann- Josef Hosselmann",
|
||||
"Note": null,
|
||||
"CustomValues": [],
|
||||
"DateModified": "2020-12-01T13:14:51",
|
||||
"ExternalId": "1671",
|
||||
"MappingId": null,
|
||||
"QuickSearch": null,
|
||||
"Version": 3,
|
||||
"CreateGeoLocation": false,
|
||||
"IsWarehouse": false,
|
||||
"ParentServiceObjectId": "0",
|
||||
"CompanyId": "15877014174",
|
||||
"ProductId": "0"
|
||||
}
|
||||
],
|
||||
"Location": {
|
||||
"Version": 0,
|
||||
"Id": "15877047611",
|
||||
"AddressString": "Bastionstr.27",
|
||||
"Postal": "40213",
|
||||
"City": "Düsseldorf",
|
||||
"State": null,
|
||||
"Country": "DE",
|
||||
"Longitude": 0.0,
|
||||
"Latitude": 0.0,
|
||||
"IsValidLocation": false
|
||||
},
|
||||
"Id": "15877014174",
|
||||
"Version": 2,
|
||||
"IsPhysicalPerson": false,
|
||||
"IsOwner": false,
|
||||
"IsEmailInvoicingActive": false,
|
||||
"IsSupplier": false,
|
||||
"MappingId": null,
|
||||
"ExternalId": "10671",
|
||||
"Name": "Herrmann- Josef Hosselmann",
|
||||
"Note": null,
|
||||
"SupportTelephone": "0211 87744544",
|
||||
"SupportFax": null,
|
||||
"SupportMail": "Hosselmann@gmx.de",
|
||||
"QuickSearch": null,
|
||||
"DateModified": "2020-11-06T12:34:05",
|
||||
"CustomValues": [],
|
||||
"MainContactId": "0"
|
||||
},
|
||||
{
|
||||
"Contacts": [],
|
||||
"Tags": [],
|
||||
"ServiceObjects": [
|
||||
{
|
||||
"Location": null,
|
||||
"Id": "15891563374",
|
||||
"Name": "Lutz Thomas",
|
||||
"Note": null,
|
||||
"CustomValues": [
|
||||
{
|
||||
"Meta": "{\"Id\":\"9FC961F5-D9F4-AD4E-FE8B-89BD3BFD4A7B\",\"Name\":\"Im Rottfeld 3, Düsseldorf\"}",
|
||||
"Value": null
|
||||
}
|
||||
],
|
||||
"DateModified": "2021-03-18T12:42:02",
|
||||
"ExternalId": "1880",
|
||||
"MappingId": null,
|
||||
"QuickSearch": null,
|
||||
"Version": 5,
|
||||
"CreateGeoLocation": false,
|
||||
"IsWarehouse": false,
|
||||
"ParentServiceObjectId": "0",
|
||||
"CompanyId": "15877014383",
|
||||
"ProductId": "0"
|
||||
}
|
||||
],
|
||||
"Location": {
|
||||
"Version": 0,
|
||||
"Id": "15877048029",
|
||||
"AddressString": "Weidenstr.38",
|
||||
"Postal": "41542",
|
||||
"City": "Dormagen",
|
||||
"State": null,
|
||||
"Country": "DE",
|
||||
"Longitude": 0.0,
|
||||
"Latitude": 0.0,
|
||||
"IsValidLocation": false
|
||||
},
|
||||
"Id": "15877014383",
|
||||
"Version": 2,
|
||||
"IsPhysicalPerson": false,
|
||||
"IsOwner": false,
|
||||
"IsEmailInvoicingActive": false,
|
||||
"IsSupplier": false,
|
||||
"MappingId": null,
|
||||
"ExternalId": "10880",
|
||||
"Name": "Lutz Thomas",
|
||||
"Note": null,
|
||||
"SupportTelephone": "0213380503",
|
||||
"SupportFax": null,
|
||||
"SupportMail": "",
|
||||
"QuickSearch": null,
|
||||
"DateModified": "2020-11-06T12:34:05",
|
||||
"CustomValues": [],
|
||||
"MainContactId": "0"
|
||||
}
|
||||
]
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user