-------------
-- ROLES
-------------
	
	USE [IHBoxSystem]
	GO
	CREATE ROLE mes_linesproduction_readWrite AUTHORIZATION dbo 
	GO  

	USE [IHBoxSystem]
	GO
	EXEC sp_addrolemember 'mes_linesproduction_readWrite', 'admin'
	GO

	USE [IHBoxSystem]
	GO
	EXEC sp_addrolemember 'mes_linesproduction_readWrite', 'SDI/australtek'
	GO	



-------------------
--	Profiles
-------------------
	USE [IHBoxSystem]
	GO

	DECLARE @ModuleId INT = (select [Id] from [SECURITY].[Modules] where [Name] = 'Meltshop Production')
	
	INSERT INTO [SECURITY].[ModuleActions]([ModuleId],[Code],[Name],[Role])
	VALUES(@ModuleId,'readWrite','Read/Write','mes_linesproduction_readWrite')



GO
