56 lines
3.7 KiB
Transact-SQL
56 lines
3.7 KiB
Transact-SQL
USE [envisage]
|
|
GO
|
|
|
|
if exists (select 1 from dbo.SecurityObject so where so.Name = 'Units of Measure' and so.Type = 'Area')
|
|
update dbo.SecurityObject set Name = 'UnitsOfMeasure' where name = 'Units of Measure'
|
|
else insert into SecurityObject values('cbfa2ea0-303f-4335-85b9-e9f5a581f4e5', 'UnitsOfMeasure', 'Area')
|
|
go
|
|
|
|
if exists (select 1 from dbo.SecurityObject so where so.Name = 'Import actuals' and so.Type = 'Area')
|
|
update dbo.SecurityObject set Name = 'ImportActuals' where name = 'Import actuals'
|
|
else insert into SecurityObject values('e0db8c9d-6997-4738-9157-30a8fc402247', 'ImportActuals', 'Area')
|
|
go
|
|
if exists (select 1 from dbo.SecurityObject so where so.Name = 'Scenario Templates' and so.Type = 'Area')
|
|
update dbo.SecurityObject set Name = 'ScenarioTemplates' where name = 'Scenario Templates'
|
|
else insert into SecurityObject values('8a5eda75-2892-4262-9947-a32b94141b98', 'ScenarioTemplates', 'Area')
|
|
go
|
|
if exists (select 1 from dbo.SecurityObject so where so.Name = 'Fiscal Calendar' and so.Type = 'Area')
|
|
update dbo.SecurityObject set Name = 'FiscalCalendar' where name = 'Fiscal Calendar'
|
|
else insert into SecurityObject values('a1b60582-3551-42b4-b1ea-24f5db5dee63', 'FiscalCalendar', 'Area')
|
|
go
|
|
if exists (select 1 from dbo.SecurityObject so where so.Name = 'Project Statuses' and so.Type = 'Area')
|
|
update dbo.SecurityObject set Name = 'ProjectStatuses' where name = 'Project Statuses'
|
|
else insert into SecurityObject values('077362d6-c162-463f-82c1-9360391a64af', 'ProjectStatuses', 'Area')
|
|
go
|
|
if exists (select 1 from dbo.SecurityObject so where so.Name = 'Project Classifications' and so.Type = 'Area')
|
|
update dbo.SecurityObject set Name = 'ProjectClassifications' where name = 'Project Classifications'
|
|
else insert into SecurityObject values('94f9422f-c0b3-410c-87db-19e49e71a384', 'ProjectClassifications', 'Area')
|
|
go
|
|
if not exists (select 1 from dbo.SecurityObject so where so.Name = 'Expenditures' and so.Type = 'Area')
|
|
insert into SecurityObject values('89fae05f-d6a9-488b-9064-3a6daf92dccd', 'Expenditures', 'Area')
|
|
go
|
|
if exists (select 1 from dbo.SecurityObject so where so.Name = 'GL Departments' and so.Type = 'Area')
|
|
update dbo.SecurityObject set Name = 'GLDepartments' where name = 'GL Departments'
|
|
else insert into SecurityObject values('155c9c6b-0e30-40fe-bef1-510c0271babf', 'GLDepartments', 'Area')
|
|
go
|
|
if exists (select 1 from dbo.SecurityObject so where so.Name = 'Expenditure Categories' and so.Type = 'Area')
|
|
update dbo.SecurityObject set Name = 'ExpenditureCategories' where name = 'Expenditure Categories'
|
|
else insert into SecurityObject values('DDDA59BB-CE2D-47EC-BD63-B9DEBEE9E48D', 'ExpenditureCategories', 'Area')
|
|
go
|
|
if exists (select 1 from dbo.SecurityObject so where so.Name = 'Credit Departments' and so.Type = 'Area')
|
|
update dbo.SecurityObject set Name = 'CreditDepartments' where name = 'Credit Departments'
|
|
else insert into SecurityObject values('aa356254-58db-4726-839e-1397638ad06a', 'CreditDepartments', 'Area')
|
|
go
|
|
if not exists (select 1 from dbo.SecurityObject so where so.Name = 'Clients' and so.Type = 'Area')
|
|
insert into SecurityObject values('c79a4fec-5279-4370-8161-6b08ae0ef433', 'Clients', 'Area')
|
|
go
|
|
if not exists (select 1 from dbo.SecurityObject so where so.Name = 'Company' and so.Type = 'Area')
|
|
insert into SecurityObject values('7ff0d894-060f-401f-99cd-6710dcf3cdf0', 'Company', 'Area')
|
|
go
|
|
if not exists (select 1 from dbo.SecurityObject so where so.Name = 'Users' and so.Type = 'Area')
|
|
insert into SecurityObject values('a1ea9df3-3538-4694-83a4-7312ae87d33d', 'Users', 'Area')
|
|
go
|
|
if not exists (select 1 from dbo.SecurityObject so where so.Name = 'Roles' and so.Type = 'Area')
|
|
insert into SecurityObject values('b34af044-cb70-4d1c-ad2e-5bdd1e0ca502', 'Roles', 'Area')
|
|
go
|