-- REMOVE LAYER
--DECLARE @LayerId UNIQUEIDENTIFIER;
--SET @LayerId = '92ee1732-3900-4a8e-bb78-9bdc00332dd3';
--DELETE FROM [diunabi-morska].[dbo].[Records] WHERE [LayerId] = (SELECT @LayerId);
--DELETE FROM [diunabi-morska].[dbo].[Layers] WHERE [Id] = (SELECT @LayerId);


-- ADD IMPORT LAYER
--DECLARE @LayerId UNIQUEIDENTIFIER;
--SET @LayerId = 'cc9cfb8d-21fe-4361-9e4c-3c598ed803cb';
--
--INSERT INTO [diunabi-morska].[dbo].[Layers] 
--([Id], [Number], [Source], [Name], [CreatedAt], [ModifiedAt], [IsDeleted], 
--[CreatedById], [ModifiedById], [Type])
--VALUES ((SELECT @LayerId),983, 'Manual', 'L983-A-IW_M7-2024/04-202403301123',
--GETDATE(), GETDATE(), 0, '117be4f0-b5d1-41a1-a962-39dc30cce368', '117be4f0-b5d1-41a1-a962-39dc30cce368', 2);
--
--INSERT INTO [diunabi-morska].[dbo].[Records] 
--([Id], [Code], [Desc1], [CreatedAt], [ModifiedAt], [CreatedById], [ModifiedById], [IsDeleted], [LayerId])
--VALUES ((SELECT NEWID()), 'StartDate', '2024.03.29',
--GETDATE(), GETDATE(), '117be4f0-b5d1-41a1-a962-39dc30cce368', '117be4f0-b5d1-41a1-a962-39dc30cce368', 0, (SELECT @LayerId));
--
--INSERT INTO [diunabi-morska].[dbo].[Records] 
--([Id], [Code], [Desc1], [CreatedAt], [ModifiedAt], [CreatedById], [ModifiedById], [IsDeleted], [LayerId])
--VALUES ((SELECT NEWID()), 'EndDate', '2024.05.05',
--GETDATE(), GETDATE(), '117be4f0-b5d1-41a1-a962-39dc30cce368', '117be4f0-b5d1-41a1-a962-39dc30cce368', 0, (SELECT @LayerId));
--
--INSERT INTO [diunabi-morska].[dbo].[Records] 
--([Id], [Code], [Desc1], [CreatedAt], [ModifiedAt], [CreatedById], [ModifiedById], [IsDeleted], [LayerId])
--VALUES ((SELECT NEWID()), 'Source', 'GoogleSheet',
--GETDATE(), GETDATE(), '117be4f0-b5d1-41a1-a962-39dc30cce368', '117be4f0-b5d1-41a1-a962-39dc30cce368', 0, (SELECT @LayerId));
--
--INSERT INTO [diunabi-morska].[dbo].[Records] 
--([Id], [Code], [Desc1], [CreatedAt], [ModifiedAt], [CreatedById], [ModifiedById], [IsDeleted], [LayerId])
--VALUES ((SELECT NEWID()), 'SheetTabName', 'Kwiecien_2024',
--GETDATE(), GETDATE(), '117be4f0-b5d1-41a1-a962-39dc30cce368', '117be4f0-b5d1-41a1-a962-39dc30cce368', 0, (SELECT @LayerId));
--
--INSERT INTO [diunabi-morska].[dbo].[Records] 
--([Id], [Code], [Desc1], [CreatedAt], [ModifiedAt], [CreatedById], [ModifiedById], [IsDeleted], [LayerId])
--VALUES ((SELECT NEWID()), 'SheetId', '1epk7AdNNvTyN4TKIIOqan-h5A8HYGbRVM_OS-Ns-Qlg', 
--GETDATE(), GETDATE(), '117be4f0-b5d1-41a1-a962-39dc30cce368', '117be4f0-b5d1-41a1-a962-39dc30cce368', 0, (SELECT @LayerId));
--
--INSERT INTO [diunabi-morska].[dbo].[Records] 
--([Id], [Code], [Desc1], [CreatedAt], [ModifiedAt], [CreatedById], [ModifiedById], [IsDeleted], [LayerId])
--VALUES ((SELECT NEWID()), 'DataRange', 'D4:BS5',
--GETDATE(), GETDATE(), '117be4f0-b5d1-41a1-a962-39dc30cce368', '117be4f0-b5d1-41a1-a962-39dc30cce368', 0, (SELECT @LayerId));
--
--INSERT INTO [diunabi-morska].[dbo].[Records] 
--([Id], [Code], [Desc1], [CreatedAt], [ModifiedAt], [CreatedById], [ModifiedById], [IsDeleted], [LayerId])
--VALUES ((SELECT NEWID()), 'ImportName', 'D3',
--GETDATE(), GETDATE(), '117be4f0-b5d1-41a1-a962-39dc30cce368', '117be4f0-b5d1-41a1-a962-39dc30cce368', 0, (SELECT @LayerId));
--
--INSERT INTO [diunabi-morska].[dbo].[Records] 
--([Id], [Code], [Desc1], [CreatedAt], [ModifiedAt], [CreatedById], [ModifiedById], [IsDeleted], [LayerId])
--VALUES ((SELECT NEWID()), 'ImportMonth', 'F3',
--GETDATE(), GETDATE(), '117be4f0-b5d1-41a1-a962-39dc30cce368', '117be4f0-b5d1-41a1-a962-39dc30cce368', 0, (SELECT @LayerId));
--
--INSERT INTO [diunabi-morska].[dbo].[Records] 
--([Id], [Code], [Desc1], [CreatedAt], [ModifiedAt], [CreatedById], [ModifiedById], [IsDeleted], [LayerId])
--VALUES ((SELECT NEWID()), 'ImportYear', 'E3',
--GETDATE(), GETDATE(), '117be4f0-b5d1-41a1-a962-39dc30cce368', '117be4f0-b5d1-41a1-a962-39dc30cce368', 0, (SELECT @LayerId));
--
--INSERT INTO [diunabi-morska].[dbo].[Records] 
--([Id], [Code], [Desc1], [CreatedAt], [ModifiedAt], [CreatedById], [ModifiedById], [IsDeleted], [LayerId])
--VALUES ((SELECT NEWID()), 'CheckSum', 'G3',
--GETDATE(), GETDATE(), '117be4f0-b5d1-41a1-a962-39dc30cce368', '117be4f0-b5d1-41a1-a962-39dc30cce368', 0, (SELECT @LayerId));
--
--INSERT INTO [diunabi-morska].[dbo].[Records] 
--([Id], [Code], [Desc1], [CreatedAt], [ModifiedAt], [CreatedById], [ModifiedById], [IsDeleted], [LayerId])
--VALUES ((SELECT NEWID()), 'Type', 'ImportWorker',
--GETDATE(), GETDATE(), '117be4f0-b5d1-41a1-a962-39dc30cce368', '117be4f0-b5d1-41a1-a962-39dc30cce368', 0, (SELECT @LayerId));
--
--INSERT INTO [diunabi-morska].[dbo].[Records] 
--([Id], [Code], [Desc1], [CreatedAt], [ModifiedAt], [CreatedById], [ModifiedById], [IsDeleted], [LayerId])
--VALUES ((SELECT NEWID()), 'IsEnabled', 'True',
--GETDATE(), GETDATE(), '117be4f0-b5d1-41a1-a962-39dc30cce368', '117be4f0-b5d1-41a1-a962-39dc30cce368', 0, (SELECT @LayerId));
--
--
--ADD PROCESS LAYERS
-- T3-SingleSource
--DECLARE @LayerId UNIQUEIDENTIFIER;
--SET @LayerId = 'cfda856b-58f5-43c2-a035-1226553ca7bf';
--
--INSERT INTO [diunabi-morska].[dbo].[Layers] 
--([Id], [Number], [Source], [Name], [CreatedAt], [ModifiedAt], [IsDeleted], 
--[CreatedById], [ModifiedById], [Type])
--VALUES ((SELECT @LayerId), 987, 'Manual', 'L987-A-PW_M7-2024/04-202403301130',
--GETDATE(), GETDATE(), 0, '117be4f0-b5d1-41a1-a962-39dc30cce368', '117be4f0-b5d1-41a1-a962-39dc30cce368', 2);
--
--INSERT INTO [diunabi-morska].[dbo].[Records] 
--([Id], [Code], [Desc1], [CreatedAt], [ModifiedAt], [CreatedById], [ModifiedById], [IsDeleted], [LayerId])
--VALUES ((SELECT NEWID()), 'Source', 'M7',
--GETDATE(), GETDATE(), '117be4f0-b5d1-41a1-a962-39dc30cce368', '117be4f0-b5d1-41a1-a962-39dc30cce368', 0, (SELECT @LayerId));
--
--INSERT INTO [diunabi-morska].[dbo].[Records] 
--([Id], [Code], [Desc1], [CreatedAt], [ModifiedAt], [CreatedById], [ModifiedById], [IsDeleted], [LayerId])
--VALUES ((SELECT NEWID()), 'SourceLayer', 'L983-A-IW_M7-2024/04-202403301123',
--GETDATE(), GETDATE(), '117be4f0-b5d1-41a1-a962-39dc30cce368', '117be4f0-b5d1-41a1-a962-39dc30cce368', 0, (SELECT @LayerId));
--
--INSERT INTO [diunabi-morska].[dbo].[Records] 
--([Id], [Code], [Desc1], [CreatedAt], [ModifiedAt], [CreatedById], [ModifiedById], [IsDeleted], [LayerId])
--VALUES ((SELECT NEWID()), 'Type', 'ProcessWorker',
--GETDATE(), GETDATE(), '117be4f0-b5d1-41a1-a962-39dc30cce368', '117be4f0-b5d1-41a1-a962-39dc30cce368', 0, (SELECT @LayerId));
--
--INSERT INTO [diunabi-morska].[dbo].[Records] 
--([Id], [Code], [Desc1], [CreatedAt], [ModifiedAt], [CreatedById], [ModifiedById], [IsDeleted], [LayerId])
--VALUES ((SELECT NEWID()), 'ProcessType', 'T3-SingleSource',
--GETDATE(), GETDATE(), '117be4f0-b5d1-41a1-a962-39dc30cce368', '117be4f0-b5d1-41a1-a962-39dc30cce368', 0, (SELECT @LayerId));
--
--INSERT INTO [diunabi-morska].[dbo].[Records] 
--([Id], [Code], [Desc1], [CreatedAt], [ModifiedAt], [CreatedById], [ModifiedById], [IsDeleted], [LayerId])
--VALUES ((SELECT NEWID()), 'IsEnabled', 'True',
--GETDATE(), GETDATE(), '117be4f0-b5d1-41a1-a962-39dc30cce368', '117be4f0-b5d1-41a1-a962-39dc30cce368', 0, (SELECT @LayerId));
--
--INSERT INTO [diunabi-morska].[dbo].[Records] 
--([Id], [Code], [Desc1], [CreatedAt], [ModifiedAt], [CreatedById], [ModifiedById], [IsDeleted], [LayerId])
--VALUES ((SELECT NEWID()), 'Year', '2024',
--GETDATE(), GETDATE(), '117be4f0-b5d1-41a1-a962-39dc30cce368', '117be4f0-b5d1-41a1-a962-39dc30cce368', 0, (SELECT @LayerId));
--
--INSERT INTO [diunabi-morska].[dbo].[Records] 
--([Id], [Code], [Desc1], [CreatedAt], [ModifiedAt], [CreatedById], [ModifiedById], [IsDeleted], [LayerId])
--VALUES ((SELECT NEWID()), 'Month', '04',
--GETDATE(), GETDATE(), '117be4f0-b5d1-41a1-a962-39dc30cce368', '117be4f0-b5d1-41a1-a962-39dc30cce368', 0, (SELECT @LayerId));
--
-- T3-MultiSourceSummary
--DECLARE @LayerId UNIQUEIDENTIFIER;
--SET @LayerId = '5f1e69cb-1e1b-441a-bb6e-26e100d44974';
--
--INSERT INTO [diunabi-morska].[dbo].[Layers] 
--([Id], [Number], [Source], [Name], [CreatedAt], [ModifiedAt], [IsDeleted], 
--[CreatedById], [ModifiedById], [Type])
--VALUES ((SELECT @LayerId), 988, 'Manual', 'L988-A-PW_AA-2024/04-202403301133',
--GETDATE(), GETDATE(), 0, '117be4f0-b5d1-41a1-a962-39dc30cce368', '117be4f0-b5d1-41a1-a962-39dc30cce368', 2);
--
--INSERT INTO [diunabi-morska].[dbo].[Records] 
--([Id], [Code], [Desc1], [CreatedAt], [ModifiedAt], [CreatedById], [ModifiedById], [IsDeleted], [LayerId])
--VALUES ((SELECT NEWID()), 'Source', 'K5',
--GETDATE(), GETDATE(), '117be4f0-b5d1-41a1-a962-39dc30cce368', '117be4f0-b5d1-41a1-a962-39dc30cce368', 0, (SELECT @LayerId));
--
--INSERT INTO [diunabi-morska].[dbo].[Records] 
--([Id], [Code], [Desc1], [CreatedAt], [ModifiedAt], [CreatedById], [ModifiedById], [IsDeleted], [LayerId])
--VALUES ((SELECT NEWID()), 'Source', 'M7',
--GETDATE(), GETDATE(), '117be4f0-b5d1-41a1-a962-39dc30cce368', '117be4f0-b5d1-41a1-a962-39dc30cce368', 0, (SELECT @LayerId));
--
--INSERT INTO [diunabi-morska].[dbo].[Records] 
--([Id], [Code], [Desc1], [CreatedAt], [ModifiedAt], [CreatedById], [ModifiedById], [IsDeleted], [LayerId])
--VALUES ((SELECT NEWID()), 'Source', 'PU',
--GETDATE(), GETDATE(), '117be4f0-b5d1-41a1-a962-39dc30cce368', '117be4f0-b5d1-41a1-a962-39dc30cce368', 0, (SELECT @LayerId));
--
--INSERT INTO [diunabi-morska].[dbo].[Records] 
--([Id], [Code], [Desc1], [CreatedAt], [ModifiedAt], [CreatedById], [ModifiedById], [IsDeleted], [LayerId])
--VALUES ((SELECT NEWID()), 'Source', 'FK',
--GETDATE(), GETDATE(), '117be4f0-b5d1-41a1-a962-39dc30cce368', '117be4f0-b5d1-41a1-a962-39dc30cce368', 0, (SELECT @LayerId));
--
--INSERT INTO [diunabi-morska].[dbo].[Records] 
--([Id], [Code], [Desc1], [CreatedAt], [ModifiedAt], [CreatedById], [ModifiedById], [IsDeleted], [LayerId])
--VALUES ((SELECT NEWID()), 'Type', 'ProcessWorker',
--GETDATE(), GETDATE(), '117be4f0-b5d1-41a1-a962-39dc30cce368', '117be4f0-b5d1-41a1-a962-39dc30cce368', 0, (SELECT @LayerId));
--
--INSERT INTO [diunabi-morska].[dbo].[Records] 
--([Id], [Code], [Desc1], [CreatedAt], [ModifiedAt], [CreatedById], [ModifiedById], [IsDeleted], [LayerId])
--VALUES ((SELECT NEWID()), 'ProcessType', 'T3-MultiSourceSummary',
--GETDATE(), GETDATE(), '117be4f0-b5d1-41a1-a962-39dc30cce368', '117be4f0-b5d1-41a1-a962-39dc30cce368', 0, (SELECT @LayerId));
--
--INSERT INTO [diunabi-morska].[dbo].[Records] 
--([Id], [Code], [Desc1], [CreatedAt], [ModifiedAt], [CreatedById], [ModifiedById], [IsDeleted], [LayerId])
--VALUES ((SELECT NEWID()), 'IsEnabled', 'True',
--GETDATE(), GETDATE(), '117be4f0-b5d1-41a1-a962-39dc30cce368', '117be4f0-b5d1-41a1-a962-39dc30cce368', 0, (SELECT @LayerId));
--
--INSERT INTO [diunabi-morska].[dbo].[Records] 
--([Id], [Code], [Desc1], [CreatedAt], [ModifiedAt], [CreatedById], [ModifiedById], [IsDeleted], [LayerId])
--VALUES ((SELECT NEWID()), 'Year', '2024',
--GETDATE(), GETDATE(), '117be4f0-b5d1-41a1-a962-39dc30cce368', '117be4f0-b5d1-41a1-a962-39dc30cce368', 0, (SELECT @LayerId));
--
--INSERT INTO [diunabi-morska].[dbo].[Records] 
--([Id], [Code], [Desc1], [CreatedAt], [ModifiedAt], [CreatedById], [ModifiedById], [IsDeleted], [LayerId])
--VALUES ((SELECT NEWID()), 'Month', '04',
--GETDATE(), GETDATE(), '117be4f0-b5d1-41a1-a962-39dc30cce368', '117be4f0-b5d1-41a1-a962-39dc30cce368', 0, (SELECT @LayerId));
--
--
-- T3-MultiSourceCopySelectedCodes
--DECLARE @LayerId UNIQUEIDENTIFIER;
--SET @LayerId = 'fca497bb-8bd5-4611-93b0-32dce72e9add';
--
--INSERT INTO [diunabi-morska].[dbo].[Layers] 
--([Id], [Number], [Source], [Name], [CreatedAt], [ModifiedAt], [IsDeleted], 
--[CreatedById], [ModifiedById], [Type])
--VALUES ((SELECT @LayerId), 989, 'Manual', 'L989-A-PW_AB-2024/04-202403311142',
--GETDATE(), GETDATE(), 0, '117be4f0-b5d1-41a1-a962-39dc30cce368', '117be4f0-b5d1-41a1-a962-39dc30cce368', 2);
--
--INSERT INTO [diunabi-morska].[dbo].[Records] 
--([Id], [Code], [Desc1], [CreatedAt], [ModifiedAt], [CreatedById], [ModifiedById], [IsDeleted], [LayerId])
--VALUES ((SELECT NEWID()), 'Source', 'K5',
--GETDATE(), GETDATE(), '117be4f0-b5d1-41a1-a962-39dc30cce368', '117be4f0-b5d1-41a1-a962-39dc30cce368', 0, (SELECT @LayerId));
--
--INSERT INTO [diunabi-morska].[dbo].[Records] 
--([Id], [Code], [Desc1], [CreatedAt], [ModifiedAt], [CreatedById], [ModifiedById], [IsDeleted], [LayerId])
--VALUES ((SELECT NEWID()), 'Source', 'M7',
--GETDATE(), GETDATE(), '117be4f0-b5d1-41a1-a962-39dc30cce368', '117be4f0-b5d1-41a1-a962-39dc30cce368', 0, (SELECT @LayerId));
--
--INSERT INTO [diunabi-morska].[dbo].[Records] 
--([Id], [Code], [Desc1], [CreatedAt], [ModifiedAt], [CreatedById], [ModifiedById], [IsDeleted], [LayerId])
--VALUES ((SELECT NEWID()), 'Source', 'PU',
--GETDATE(), GETDATE(), '117be4f0-b5d1-41a1-a962-39dc30cce368', '117be4f0-b5d1-41a1-a962-39dc30cce368', 0, (SELECT @LayerId));
--
--INSERT INTO [diunabi-morska].[dbo].[Records] 
--([Id], [Code], [Desc1], [CreatedAt], [ModifiedAt], [CreatedById], [ModifiedById], [IsDeleted], [LayerId])
--VALUES ((SELECT NEWID()), 'Source', 'FK',
--GETDATE(), GETDATE(), '117be4f0-b5d1-41a1-a962-39dc30cce368', '117be4f0-b5d1-41a1-a962-39dc30cce368', 0, (SELECT @LayerId));
--
--INSERT INTO [diunabi-morska].[dbo].[Records] 
--([Id], [Code], [Desc1], [CreatedAt], [ModifiedAt], [CreatedById], [ModifiedById], [IsDeleted], [LayerId])
--VALUES ((SELECT NEWID()), 'Type', 'ProcessWorker',
--GETDATE(), GETDATE(), '117be4f0-b5d1-41a1-a962-39dc30cce368', '117be4f0-b5d1-41a1-a962-39dc30cce368', 0, (SELECT @LayerId));
--
--INSERT INTO [diunabi-morska].[dbo].[Records] 
--([Id], [Code], [Desc1], [CreatedAt], [ModifiedAt], [CreatedById], [ModifiedById], [IsDeleted], [LayerId])
--VALUES ((SELECT NEWID()), 'ProcessType', 'T3-MultiSourceCopySelectedCodes',
--GETDATE(), GETDATE(), '117be4f0-b5d1-41a1-a962-39dc30cce368', '117be4f0-b5d1-41a1-a962-39dc30cce368', 0, (SELECT @LayerId));
--
--INSERT INTO [diunabi-morska].[dbo].[Records] 
--([Id], [Code], [Desc1], [CreatedAt], [ModifiedAt], [CreatedById], [ModifiedById], [IsDeleted], [LayerId])
--VALUES ((SELECT NEWID()), 'IsEnabled', 'True',
--GETDATE(), GETDATE(), '117be4f0-b5d1-41a1-a962-39dc30cce368', '117be4f0-b5d1-41a1-a962-39dc30cce368', 0, (SELECT @LayerId));
--
--INSERT INTO [diunabi-morska].[dbo].[Records] 
--([Id], [Code], [Desc1], [CreatedAt], [ModifiedAt], [CreatedById], [ModifiedById], [IsDeleted], [LayerId])
--VALUES ((SELECT NEWID()), 'Year', '2024',
--GETDATE(), GETDATE(), '117be4f0-b5d1-41a1-a962-39dc30cce368', '117be4f0-b5d1-41a1-a962-39dc30cce368', 0, (SELECT @LayerId));
--
--INSERT INTO [diunabi-morska].[dbo].[Records] 
--([Id], [Code], [Desc1], [CreatedAt], [ModifiedAt], [CreatedById], [ModifiedById], [IsDeleted], [LayerId])
--VALUES ((SELECT NEWID()), 'Month', '04',
--GETDATE(), GETDATE(), '117be4f0-b5d1-41a1-a962-39dc30cce368', '117be4f0-b5d1-41a1-a962-39dc30cce368', 0, (SELECT @LayerId));
--
--INSERT INTO [diunabi-morska].[dbo].[Records] 
--([Id], [Code], [Desc1], [CreatedAt], [ModifiedAt], [CreatedById], [ModifiedById], [IsDeleted], [LayerId])
--VALUES ((SELECT NEWID()), 'Codes', '5000-5003;5005;5081-5095;6000-6003;6005;6081-6095;7000-7003;7005;7081-7095;8000-8003;8005;8081-8095',
--GETDATE(), GETDATE(), '117be4f0-b5d1-41a1-a962-39dc30cce368', '117be4f0-b5d1-41a1-a962-39dc30cce368', 0, (SELECT @LayerId));
--