Esempio n. 1
0
        /// <summary>
        /// Operations to be performed during the upgrade process.
        /// </summary>
        public override void Up()
        {
            // Add a defined value for the Rest User record type
            RockMigrationHelper.AddDefinedValue_pre20140819("26BE73A6-A9C5-4E94-AE00-3AFDCF8C9275", "RestUser", "Rest User Record", "E2261A84-831D-4234-9BE0-4D628BBE751E", true);

            // Add the rest key list page
            RockMigrationHelper.AddPage("91CCB1C9-5F9F-44F5-8BE2-9EC3A3CFD46F", "D65F783D-87A9-4CC9-8110-E83466A0EADB", "Rest Keys", "A list of REST API Keys", "881AB1C2-4E00-4A73-80CC-9886B3717A20", "fa fa-key");

            // Add the rest key list block type
            RockMigrationHelper.AddBlockType("Rest Key List", "Lists the REST API Keys", "~/Blocks/Security/RestKeyList.ascx", "Security", "7FAA46B5-C70D-4A77-9BBF-80DA4431AF13");

            // Add the rest key list block
            RockMigrationHelper.AddBlock("881AB1C2-4E00-4A73-80CC-9886B3717A20", "", "7FAA46B5-C70D-4A77-9BBF-80DA4431AF13", "Rest Key List", "Main", "", "", 0, "A8AEA50D-DF92-46D1-8A42-512C0EC5179E");

            // Add the rest key detail page
            RockMigrationHelper.AddPage("881AB1C2-4E00-4A73-80CC-9886B3717A20", "195BCD57-1C10-4969-886F-7324B6287B75", "Rest Key Detail", "Detailed information about this REST API Key", "594692AA-5647-4F9A-9488-AADB990FDE56", "fa fa-key");

            // Add the rest key detail block type
            RockMigrationHelper.AddBlockType("Rest Key Detail", "Used for viewing and editing REST API key information", "~/Blocks/Security/RestKeyDetail.ascx", "Security", "C3989D26-69C4-4E80-B069-60A157D467BB");

            // Add the rest key detail block
            RockMigrationHelper.AddBlock("594692AA-5647-4F9A-9488-AADB990FDE56", "", "C3989D26-69C4-4E80-B069-60A157D467BB", "Rest Key Detail", "Main", "", "", 0, "8457C5EE-C6A4-4DEA-9025-5788A0587C96");

            // Create the Detail Page attribute on the Rest Key List page
            RockMigrationHelper.AddBlockTypeAttribute("7FAA46B5-C70D-4A77-9BBF-80DA4431AF13", "BD53F9C9-EBA9-4D3F-82EA-DE5DD34A8108", "Detail Page", "DetailPage", "", "", 0, "", "8ACB614A-BF2E-44B2-9F37-F7A113D7C9CA");

            // Set "Detail Page" attribute on Rest Key List page to the Rest Key Detail page
            RockMigrationHelper.AddBlockAttributeValue("A8AEA50D-DF92-46D1-8A42-512C0EC5179E", "8ACB614A-BF2E-44B2-9F37-F7A113D7C9CA", "594692AA-5647-4F9A-9488-AADB990FDE56");
        }
        /// <summary>
        /// Operations to be performed during the upgrade process.
        /// </summary>
        public override void Up()
        {
            RockMigrationHelper.AddDefinedValue_pre20140819("1FAC459C-5F62-4E7C-8933-61FF9FE2DFEF", "Rock Windows Check-in Client", "The Windows Check-in Client hosts the Rock check-in screens and allows client based printing to either networked or USB printers.", "C162F21E-7D86-4BB4-A72C-7F4A0E5B02C3");

            Sql(@"
declare
  @attributeIconId int = (select [Id] from [Attribute] where [Guid] = 'C6E82AF0-2128-492B-B5CB-7915630DDA0B'),
  @attributeVendorId int = (select [Id] from [Attribute] where [Guid] = 'E9AAE4D6-B4DC-4AA2-BD86-D63B2B4D26F3'),
  @attributeDownloadUrlId int = (select [Id] from [Attribute] where [Guid] = 'E0AF9B30-15EA-413B-BAC4-25B286D91FD9'),
  @definedValueCheckinClientId int = (select [Id] from [DefinedValue] where [Guid] = 'C162F21E-7D86-4BB4-A72C-7F4A0E5B02C3')

-- SVG Icons
INSERT INTO [dbo].[BinaryFile] ([IsTemporary], [IsSystem], [BinaryFileTypeId], [Url], [FileName], [MimeType], [Description], [StorageEntityTypeId], [Guid]) 
    VALUES 
        (0, 0, 3, N'~/GetFile.ashx?guid=D128A532-A99A-430A-955B-C1444E87C053', N'checkin-client.svg', N'image/svg+xml', null, 51, N'D128A532-A99A-430A-955B-C1444E87C053')

EXEC(N'INSERT INTO [dbo].[BinaryFileData] ([Id], [Content], [Guid]) VALUES ((select [Id] from BinaryFile where [Guid] = N''D128A532-A99A-430A-955B-C1444E87C053''), 0x3C3F786D6C2076657273696F6E3D22312E302220656E636F64696E673D227574662D38223F3E0D0A3C212D2D2047656E657261746F723A2041646F626520496C6C7573747261746F722031362E302E302C20535647204578706F727420506C75672D496E202E205356472056657273696F6E3A20362E3030204275696C6420302920202D2D3E0D0A3C21444F435459504520737667205055424C494320222D2F2F5733432F2F4454442053564720312E312F2F454E222022687474703A2F2F7777772E77332E6F72672F47726170686963732F5356472F312E312F4454442F73766731312E647464223E0D0A3C7376672076657273696F6E3D22312E31222069643D224C617965725F312220786D6C6E733D22687474703A2F2F7777772E77332E6F72672F323030302F7376672220786D6C6E733A786C696E6B3D22687474703A2F2F7777772E77332E6F72672F313939392F786C696E6B2220783D223070782220793D22307078220D0A092077696474683D223230392E35707822206865696768743D223138342E3430367078222076696577426F783D22302030203230392E35203138342E3430362220656E61626C652D6261636B67726F756E643D226E657720302030203230392E35203138342E3430362220786D6C3A73706163653D227072657365727665223E0D0A3C673E0D0A093C636972636C652066696C6C3D2223464646464646222063783D223130372E383233222063793D2239342E3835312220723D2236352E353431222F3E0D0A093C706174682066696C6C3D22233235323532352220643D224D3130362E3732312C3137322E373636632D34342E3236382C302D38302E3138342D33352E3931362D38302E3138342D38302E31383363302D34342E3236382C33352E3931362D38302E3138342C38302E3138342D38302E3138340D0A09096334342E3236372C302C38302E3138332C33352E3931362C38302E3138332C38302E313834433138362E3930332C3133362E38352C3135302E3938372C3137322E3736362C3130362E3732312C3137322E3736367A204D3130362E3732312C33352E3738370D0A0909632D33312E3332322C302D35362E3739372C32352E3437352D35362E3739372C35362E37393763302C33312E33322C32352E3437352C35362E3739352C35362E3739372C35362E3739356333312E33322C302C35362E3739352D32352E3437352C35362E3739352D35362E3739350D0A0909433136332E3531362C36312E3236322C3133382E3034312C33352E3738372C3130362E3732312C33352E3738377A222F3E0D0A093C706174682066696C6C3D22233742433336342220643D224D3130362E3837372C3132392E303436632D322E36312C322E3630392D362E3738372C322E3630392D392E3339372C304C36362E3738352C39382E333531632D322E36312D322E3630392D322E36312D362E3738372C302D392E3339360D0A09096C31302E36352D31302E36343963322E36312D322E3630392C362E3738362D322E3630392C392E3339362C306C31352E3334382C31352E3334376C32382E3731312D32382E37313163322E3630392D322E36312C362E3738372D322E36312C392E3339362C306C31302E3634392C31302E3634390D0A090963322E3630392C322E3630392C322E3630392C362E3738372C302C392E3339364C3130362E3837372C3132392E3034367A222F3E0D0A3C2F673E0D0A3C2F7376673E0D0A, N''F9533ACE-CD63-407E-8877-CA9B98E724FF'')')

INSERT INTO [dbo].[AttributeValue] ([IsSystem],[AttributeId],[EntityId],[Order],[Value],[Guid])
     VALUES 
        (1, @attributeIconId, @definedValueCheckinClientId, 0, (select Id from BinaryFile where Guid = 'D128A532-A99A-430A-955B-C1444E87C053'), 'AE028EAA-E366-4602-AC79-517A5F0D5CA9')

-- Vendor
INSERT INTO [dbo].[AttributeValue] ([IsSystem],[AttributeId],[EntityId],[Order],[Value],[Guid])
     VALUES 
        (1, @attributeVendorId, @definedValueCheckinClientId, 0, 'Spark Development Network', '553E580E-B37D-4503-A845-55B8244E80B7')

-- DownloadUrl
INSERT INTO [dbo].[AttributeValue] ([IsSystem],[AttributeId],[EntityId],[Order],[Value],[Guid])
     VALUES 
        (1, @attributeDownloadUrlId, @definedValueCheckinClientId, 0, 'http://storage.rockrms.com/externalapplications/sparkdevnetwork/windowscheckin/1.0.10/checkinclient.exe', '7ADC1B5B-D374-4B77-9DE1-4D788B572A10')
");

            // update new location of statementgenerator installer
            Sql("UPDATE [AttributeValue] set [Value] = 'http://storage.rockrms.com/externalapplications/sparkdevnetwork/statementgenerator/1.0.10/statementgenerator.exe' where [Guid] = '10BE2E03-7827-41B5-8CB2-DEB473EA107A'");

            // Attrib for BlockType: Business Detail:Person Profile Page
            RockMigrationHelper.AddBlockTypeAttribute("3CB1F9F0-11B2-4A46-B9D1-464811E5015C", "BD53F9C9-EBA9-4D3F-82EA-DE5DD34A8108", "Person Profile Page", "PersonProfilePage", "", "The page used to view the details of a business contact", 0, @"", "19BA2FF7-09ED-4CD3-9B13-006650EC6C67");

            // Attrib Value for Block:Business Detail, Attribute:Person Profile Page Page: Business Detail, Site: Rock RMS
            RockMigrationHelper.AddBlockAttributeValue("77AB2D30-FCBE-45E9-9757-401AE2676A7F", "19BA2FF7-09ED-4CD3-9B13-006650EC6C67", @"08dbd8a5-2c35-4146-b4a8-0f7652348b25");
        }
Esempio n. 3
0
        /// <summary>
        /// Operations to be performed during the upgrade process.
        /// </summary>
        public override void Up()
        {
            AddColumn("dbo.WorkflowActivity", "AssignedPersonAliasId", c => c.Int());
            AddColumn("dbo.WorkflowActivity", "AssignedGroupId", c => c.Int());
            CreateIndex("dbo.WorkflowActivity", "AssignedPersonAliasId");
            CreateIndex("dbo.WorkflowActivity", "AssignedGroupId");
            AddForeignKey("dbo.WorkflowActivity", "AssignedGroupId", "dbo.Group", "Id");
            AddForeignKey("dbo.WorkflowActivity", "AssignedPersonAliasId", "dbo.PersonAlias", "Id");

            RockMigrationHelper.AddDefinedType_pre201409101843015("Global", "CSS Classes", "Contain common css class definitions", "407A3A73-A3EF-4970-B856-2A33F62AC72E", @"");
            RockMigrationHelper.AddDefinedTypeAttribute("407A3A73-A3EF-4970-B856-2A33F62AC72E", "9C204CD0-1233-41C5-818A-C5DA439445AA", "CSS Class", "CSSClass", "The css class", 28, "", "6FF59F53-28EA-4BFE-AFE1-A459CC588495");
            RockMigrationHelper.AddDefinedValue_pre20140819("407A3A73-A3EF-4970-B856-2A33F62AC72E", "Primary Button", "", "FDC397CD-8B4A-436E-BEA1-BCE2E6717C03", false);
            RockMigrationHelper.AddDefinedValueAttributeValue("FDC397CD-8B4A-436E-BEA1-BCE2E6717C03", "6FF59F53-28EA-4BFE-AFE1-A459CC588495", @"btn btn-primary");
            RockMigrationHelper.AddDefinedValue_pre20140819("407A3A73-A3EF-4970-B856-2A33F62AC72E", "Red Button", "", "FDEB8E6C-70C3-4033-B307-7D0DEE1AC29D", false);
            RockMigrationHelper.AddDefinedValueAttributeValue("FDEB8E6C-70C3-4033-B307-7D0DEE1AC29D", "6FF59F53-28EA-4BFE-AFE1-A459CC588495", @"btn btn-danger");

            RockMigrationHelper.AddDefinedType_pre201409101843015("Location", "Countries", "Defines how addresses are displayed and formatted for each country", "D7979EA1-44E9-46E2-BF37-DDAF7F741378", @"");
            RockMigrationHelper.AddDefinedTypeAttribute("D7979EA1-44E9-46E2-BF37-DDAF7F741378", "9C204CD0-1233-41C5-818A-C5DA439445AA", "Abbreviation", "Abbreviation", "The abbreviation for the country", 0, "", "DA46DC37-5398-4520-B6A5-6E57C9C46F7A");
            RockMigrationHelper.AddDefinedTypeAttribute("D7979EA1-44E9-46E2-BF37-DDAF7F741378", "9C204CD0-1233-41C5-818A-C5DA439445AA", "Postal Code Label", "PostalCodeLabel", "The label to use for the Postal Code (Zip) field", 2, "Zip", "7D785A5D-53CA-4FEC-BC88-DFBD7439B547");
            RockMigrationHelper.AddDefinedTypeAttribute("D7979EA1-44E9-46E2-BF37-DDAF7F741378", "9C204CD0-1233-41C5-818A-C5DA439445AA", "State Label", "StateLabel", "The label to use for the 'state' field", 1, "State", "A4E00B14-8CFF-4719-A43F-462851C7BBEF");
            RockMigrationHelper.AddDefinedTypeAttribute("D7979EA1-44E9-46E2-BF37-DDAF7F741378", "C28C7BF3-A552-4D77-9408-DEDCF760CED0", "Address Format", "AddressFormat", "The Liquid syntax to use for formatting addresses", 3, @"
{{ Street1 }} 
{{ Street2 }}
{{ City }}, {{ State }} {{ Zip }}
", "B6EF4138-C488-4043-A628-D35F91503843");
            RockMigrationHelper.AddDefinedValue_pre20140819("D7979EA1-44E9-46E2-BF37-DDAF7F741378", "United States", "United States", "F4DAEB01-A0E5-426A-A425-7F6D21DF1CE7", false);
            RockMigrationHelper.AddDefinedValueAttributeValue("F4DAEB01-A0E5-426A-A425-7F6D21DF1CE7", "DA46DC37-5398-4520-B6A5-6E57C9C46F7A", @"US");
            RockMigrationHelper.AddDefinedValueAttributeValue("F4DAEB01-A0E5-426A-A425-7F6D21DF1CE7", "A4E00B14-8CFF-4719-A43F-462851C7BBEF", @"State");
            RockMigrationHelper.AddDefinedValueAttributeValue("F4DAEB01-A0E5-426A-A425-7F6D21DF1CE7", "7D785A5D-53CA-4FEC-BC88-DFBD7439B547", @"Zip");
            RockMigrationHelper.AddDefinedValueAttributeValue("F4DAEB01-A0E5-426A-A425-7F6D21DF1CE7", "B6EF4138-C488-4043-A628-D35F91503843", @"{{ Street1 }} 
{{ Street2 }}
{{ City }}, {{ State }} {{ Zip }}");

            RockMigrationHelper.AddDefinedValue_pre20140819("D7979EA1-44E9-46E2-BF37-DDAF7F741378", "Canada", "Canada", "60D86635-8E4A-4F4B-8052-26048DAE0335", false);
            RockMigrationHelper.AddDefinedValueAttributeValue("60D86635-8E4A-4F4B-8052-26048DAE0335", "DA46DC37-5398-4520-B6A5-6E57C9C46F7A", @"CA");
            RockMigrationHelper.AddDefinedValueAttributeValue("60D86635-8E4A-4F4B-8052-26048DAE0335", "A4E00B14-8CFF-4719-A43F-462851C7BBEF", @"Province");
            RockMigrationHelper.AddDefinedValueAttributeValue("60D86635-8E4A-4F4B-8052-26048DAE0335", "7D785A5D-53CA-4FEC-BC88-DFBD7439B547", @"Postal Code");
            RockMigrationHelper.AddDefinedValueAttributeValue("60D86635-8E4A-4F4B-8052-26048DAE0335", "B6EF4138-C488-4043-A628-D35F91503843", @"{{ Street1 }} 
{{ Street2 }}
{{ City }}, {{ State }} {{ Zip }}
{{ Country }}");

            RockMigrationHelper.AddDefinedTypeAttribute("C3A20D2D-AEAF-4E2B-A1D9-2E072CEFC2BB", "59D5A94C-94A0-4630-B80A-BB25697D74C7", "Country", "Country", "The country that the 'state' belongs to", 29, "f4daeb01-a0e5-426a-a425-7f6d21df1ce7", "3B234A62-B87D-47CD-A33F-32CC6C840A02");
            RockMigrationHelper.AddAttributeQualifier("3B234A62-B87D-47CD-A33F-32CC6C840A02", "allowmultiple", "False", "0177244E-D113-4752-8C89-2DD05BA5FAE0");
            RockMigrationHelper.AddAttributeQualifier("3B234A62-B87D-47CD-A33F-32CC6C840A02", "definedtype", "46", "50019CC0-BBD9-4CE8-B04D-15DD9698F8BD");

            RockMigrationHelper.AddDefinedValue_pre20140819("C3A20D2D-AEAF-4E2B-A1D9-2E072CEFC2BB", "AB", "Alberta", "50ABDD73-C7BF-4439-994F-EE3ADD60910B");
            RockMigrationHelper.AddDefinedValue_pre20140819("C3A20D2D-AEAF-4E2B-A1D9-2E072CEFC2BB", "BC", "British Columbia", "2651DEE8-30D6-477D-88CA-48EBA769683E");
            RockMigrationHelper.AddDefinedValue_pre20140819("C3A20D2D-AEAF-4E2B-A1D9-2E072CEFC2BB", "MB", "Manitoba", "5A59DC0E-97E0-45EA-83CD-586EB9D4BD49");
            RockMigrationHelper.AddDefinedValue_pre20140819("C3A20D2D-AEAF-4E2B-A1D9-2E072CEFC2BB", "NB", "New Brunswick", "C975FD3B-2A25-473A-8CD4-ABBCD0757CA0");
            RockMigrationHelper.AddDefinedValue_pre20140819("C3A20D2D-AEAF-4E2B-A1D9-2E072CEFC2BB", "NL", "Newfoundland and Labrador", "C8ABE4D8-6B88-47ED-80DB-CDF8EEF47A7F");
            RockMigrationHelper.AddDefinedValue_pre20140819("C3A20D2D-AEAF-4E2B-A1D9-2E072CEFC2BB", "NT", "Northwest Territories", "67E0BC8B-BE23-40B0-ADB1-ACA50CEF8825");
            RockMigrationHelper.AddDefinedValue_pre20140819("C3A20D2D-AEAF-4E2B-A1D9-2E072CEFC2BB", "NS", "Nova Scotia", "F91359C1-D6F9-495E-A475-9D7DEF7AA67B");
            RockMigrationHelper.AddDefinedValue_pre20140819("C3A20D2D-AEAF-4E2B-A1D9-2E072CEFC2BB", "NU", "Nunavut", "B6AC22E5-676E-4FB9-909D-4E047A21B703");
            RockMigrationHelper.AddDefinedValue_pre20140819("C3A20D2D-AEAF-4E2B-A1D9-2E072CEFC2BB", "ON", "Ontario", "0EF0F132-69C3-480F-801A-59145F417277");
            RockMigrationHelper.AddDefinedValue_pre20140819("C3A20D2D-AEAF-4E2B-A1D9-2E072CEFC2BB", "PE", "Prince Edward Island", "25DE8C9B-9F69-4B4E-A21F-D976FE1D0D41");
            RockMigrationHelper.AddDefinedValue_pre20140819("C3A20D2D-AEAF-4E2B-A1D9-2E072CEFC2BB", "QC", "Quebec", "BE1A052A-ABCD-48C2-AA04-BDE4F394D001");
            RockMigrationHelper.AddDefinedValue_pre20140819("C3A20D2D-AEAF-4E2B-A1D9-2E072CEFC2BB", "SK", "Saskatchewan", "63B48AA0-8904-4415-9F5E-7218454D3D0F");
            RockMigrationHelper.AddDefinedValue_pre20140819("C3A20D2D-AEAF-4E2B-A1D9-2E072CEFC2BB", "YT", "Yukon", "91D87671-F309-4908-ABE1-57FA27B2C7F6");

            RockMigrationHelper.AddDefinedValueAttributeValue("0EF0F132-69C3-480F-801A-59145F417277", "3B234A62-B87D-47CD-A33F-32CC6C840A02", "60D86635-8E4A-4F4B-8052-26048DAE0335");
            RockMigrationHelper.AddDefinedValueAttributeValue("BE1A052A-ABCD-48C2-AA04-BDE4F394D001", "3B234A62-B87D-47CD-A33F-32CC6C840A02", "60D86635-8E4A-4F4B-8052-26048DAE0335");
            RockMigrationHelper.AddDefinedValueAttributeValue("F91359C1-D6F9-495E-A475-9D7DEF7AA67B", "3B234A62-B87D-47CD-A33F-32CC6C840A02", "60D86635-8E4A-4F4B-8052-26048DAE0335");
            RockMigrationHelper.AddDefinedValueAttributeValue("C975FD3B-2A25-473A-8CD4-ABBCD0757CA0", "3B234A62-B87D-47CD-A33F-32CC6C840A02", "60D86635-8E4A-4F4B-8052-26048DAE0335");
            RockMigrationHelper.AddDefinedValueAttributeValue("5A59DC0E-97E0-45EA-83CD-586EB9D4BD49", "3B234A62-B87D-47CD-A33F-32CC6C840A02", "60D86635-8E4A-4F4B-8052-26048DAE0335");
            RockMigrationHelper.AddDefinedValueAttributeValue("2651DEE8-30D6-477D-88CA-48EBA769683E", "3B234A62-B87D-47CD-A33F-32CC6C840A02", "60D86635-8E4A-4F4B-8052-26048DAE0335");
            RockMigrationHelper.AddDefinedValueAttributeValue("25DE8C9B-9F69-4B4E-A21F-D976FE1D0D41", "3B234A62-B87D-47CD-A33F-32CC6C840A02", "60D86635-8E4A-4F4B-8052-26048DAE0335");
            RockMigrationHelper.AddDefinedValueAttributeValue("63B48AA0-8904-4415-9F5E-7218454D3D0F", "3B234A62-B87D-47CD-A33F-32CC6C840A02", "60D86635-8E4A-4F4B-8052-26048DAE0335");
            RockMigrationHelper.AddDefinedValueAttributeValue("50ABDD73-C7BF-4439-994F-EE3ADD60910B", "3B234A62-B87D-47CD-A33F-32CC6C840A02", "60D86635-8E4A-4F4B-8052-26048DAE0335");
            RockMigrationHelper.AddDefinedValueAttributeValue("C8ABE4D8-6B88-47ED-80DB-CDF8EEF47A7F", "3B234A62-B87D-47CD-A33F-32CC6C840A02", "60D86635-8E4A-4F4B-8052-26048DAE0335");
            RockMigrationHelper.AddDefinedValueAttributeValue("67E0BC8B-BE23-40B0-ADB1-ACA50CEF8825", "3B234A62-B87D-47CD-A33F-32CC6C840A02", "60D86635-8E4A-4F4B-8052-26048DAE0335");
            RockMigrationHelper.AddDefinedValueAttributeValue("91D87671-F309-4908-ABE1-57FA27B2C7F6", "3B234A62-B87D-47CD-A33F-32CC6C840A02", "60D86635-8E4A-4F4B-8052-26048DAE0335");
            RockMigrationHelper.AddDefinedValueAttributeValue("B6AC22E5-676E-4FB9-909D-4E047A21B703", "3B234A62-B87D-47CD-A33F-32CC6C840A02", "60D86635-8E4A-4F4B-8052-26048DAE0335");

            Sql(@"
    UPDATE [Attribute] SET [IsGridColumn] = 1
    WHERE [Guid] IN ( '6FF59F53-28EA-4BFE-AFE1-A459CC588495', 'DA46DC37-5398-4520-B6A5-6E57C9C46F7A', '7D785A5D-53CA-4FEC-BC88-DFBD7439B547', 'A4E00B14-8CFF-4719-A43F-462851C7BBEF', '3B234A62-B87D-47CD-A33F-32CC6C840A02')
");

            RockMigrationHelper.AddPage("98163C8B-5C91-4A68-BB79-6AD948A604CE", "D65F783D-87A9-4CC9-8110-E83466A0EADB", "Workflow", "", "CDB27DB2-977C-415A-AED5-D0751DFD5DF2", "");         // Site:Rock RMS
            RockMigrationHelper.AddPage("CDB27DB2-977C-415A-AED5-D0751DFD5DF2", "D65F783D-87A9-4CC9-8110-E83466A0EADB", "Workflows", "", "6510AB6B-DFB4-4DBF-9F0F-7EA598E4AC54", "");        // Site:Rock RMS
            RockMigrationHelper.AddPage("6510AB6B-DFB4-4DBF-9F0F-7EA598E4AC54", "D65F783D-87A9-4CC9-8110-E83466A0EADB", "Manage Workflows", "", "61E1B4B6-EACE-42E8-A2FB-37465E6D0004", ""); // Site:Rock RMS
            RockMigrationHelper.AddPage("61E1B4B6-EACE-42E8-A2FB-37465E6D0004", "D65F783D-87A9-4CC9-8110-E83466A0EADB", "Workflow Entry", "", "0550D2AA-A705-4400-81FF-AB124FDF83D7", "");   // Site:Rock RMS
            RockMigrationHelper.AddPage("61E1B4B6-EACE-42E8-A2FB-37465E6D0004", "D65F783D-87A9-4CC9-8110-E83466A0EADB", "Workflow Detail", "", "BA547EED-5537-49CF-BD4E-C583D760788C", "");  // Site:Rock RMS

            RockMigrationHelper.UpdateBlockType("Workflow Entry", "Used to enter information for a workflow form entry action.", "~/Blocks/Core/WorkflowEntry.ascx", "Core", "A8BD05C8-6F89-4628-845B-059E686F089A");
            RockMigrationHelper.UpdateBlockType("Workflow Navigation", "Block for navigating workflow types and launching and/or managing workflows.", "~/Blocks/Core/WorkflowNavigation.ascx", "Core", "DDC6B004-9ED1-470F-ABF5-041250082168");

            // Add Block to Page: Workflow Entry, Site: Rock RMS
            RockMigrationHelper.AddBlock("0550D2AA-A705-4400-81FF-AB124FDF83D7", "", "A8BD05C8-6F89-4628-845B-059E686F089A", "Workflow Entry", "Main", "", "", 0, "29D1A3BC-9D08-4782-8B01-FE5DC6FCF367");
            // Add Block to Page: Manage Workflows, Site: Rock RMS
            RockMigrationHelper.AddBlock("61E1B4B6-EACE-42E8-A2FB-37465E6D0004", "", "C86C80DF-F2FD-47F8-81CF-7C5EA4100C3B", "Workflow List", "Main", "", "", 0, "BCC61035-DA99-47EE-A376-71D430455DB4");
            // Add Block to Page: Workflows, Site: Rock RMS
            RockMigrationHelper.AddBlock("6510AB6B-DFB4-4DBF-9F0F-7EA598E4AC54", "", "DDC6B004-9ED1-470F-ABF5-041250082168", "Workflow Navigation", "Main", "", "", 0, "2D20CEC4-328E-4C2B-8059-78DFC49D8E35");

            // Attrib for BlockType: Workflow Entry:Workflow Type
            RockMigrationHelper.AddBlockTypeAttribute("A8BD05C8-6F89-4628-845B-059E686F089A", "46A03F59-55D3-4ACE-ADD5-B4642225DD20", "Workflow Type", "WorkflowType", "", "Type of workflow to start.", 0, @"", "2F1D98C4-A8EF-4680-9F64-11BFC28D5597");
            // Attrib for BlockType: Workflow Navigation:Manage Page
            RockMigrationHelper.AddBlockTypeAttribute("DDC6B004-9ED1-470F-ABF5-041250082168", "BD53F9C9-EBA9-4D3F-82EA-DE5DD34A8108", "Manage Page", "ManagePage", "", "Page used to manage workflows of the selected type.", 0, @"", "6B8E6B05-87E6-4CA0-9A44-861184E3A34C");
            // Attrib for BlockType: Workflow Navigation:Entry Page
            RockMigrationHelper.AddBlockTypeAttribute("DDC6B004-9ED1-470F-ABF5-041250082168", "BD53F9C9-EBA9-4D3F-82EA-DE5DD34A8108", "Entry Page", "EntryPage", "", "Page used to launch a new workflow of the selected type.", 0, @"", "DABA0448-C967-4E9D-863E-59C95059935A");
            // Attrib for BlockType: Workflow List:Entry Page
            RockMigrationHelper.AddBlockTypeAttribute("C86C80DF-F2FD-47F8-81CF-7C5EA4100C3B", "BD53F9C9-EBA9-4D3F-82EA-DE5DD34A8108", "Entry Page", "EntryPage", "", "Page used to launch a new workflow of the selected type.", 0, @"", "630AF4C8-6DA1-4BC2-8D38-283D7EF3DD43");
            // Attrib Value for Block:Attribute Values, Attribute:Category Page: Extended Attributes, Site: Rock RMS
            RockMigrationHelper.AddBlockAttributeValue("DCA9E640-B5EA-4C73-90BC-4A91330528D5", "EC43CF32-3BDF-4544-8B6A-CE9208DD7C81", @"dd8f467d-b83c-444f-b04c-c681167046a1");
            // Attrib Value for Block:Workflow Entry, Attribute:Workflow Type Page: Workflow Entry, Site: Rock RMS
            RockMigrationHelper.AddBlockAttributeValue("29D1A3BC-9D08-4782-8B01-FE5DC6FCF367", "2F1D98C4-A8EF-4680-9F64-11BFC28D5597", @"");
            // Attrib Value for Block:Workflow List, Attribute:Entry Page Page: Manage Workflows, Site: Rock RMS
            RockMigrationHelper.AddBlockAttributeValue("BCC61035-DA99-47EE-A376-71D430455DB4", "630AF4C8-6DA1-4BC2-8D38-283D7EF3DD43", @"0550d2aa-a705-4400-81ff-ab124fdf83d7");
            // Attrib Value for Block:Workflow List, Attribute:Detail Page Page: Manage Workflows, Site: Rock RMS
            RockMigrationHelper.AddBlockAttributeValue("BCC61035-DA99-47EE-A376-71D430455DB4", "C0BA339B-10C5-4609-B806-D192C733FFF1", @"ba547eed-5537-49cf-bd4e-c583d760788c");
            // Attrib Value for Block:Workflow Navigation, Attribute:Manage Page Page: Workflows, Site: Rock RMS
            RockMigrationHelper.AddBlockAttributeValue("2D20CEC4-328E-4C2B-8059-78DFC49D8E35", "6B8E6B05-87E6-4CA0-9A44-861184E3A34C", @"61e1b4b6-eace-42e8-a2fb-37465e6d0004");
            // Attrib Value for Block:Workflow Navigation, Attribute:Entry Page Page: Workflows, Site: Rock RMS
            RockMigrationHelper.AddBlockAttributeValue("2D20CEC4-328E-4C2B-8059-78DFC49D8E35", "DABA0448-C967-4E9D-863E-59C95059935A", @"0550d2aa-a705-4400-81ff-ab124fdf83d7");
            RockMigrationHelper.UpdateFieldType("Comparison", "", "Rock", "Rock.Field.Types.ComparisonFieldType", "3C742B81-3C55-48B8-A7CD-E7762EA5BB91");
            RockMigrationHelper.UpdateFieldType("Metric Entity", "", "Rock", "Rock.Field.Types.MetricEntityFieldType", "3A7FB32E-1CCD-4F79-B085-BDBADEB56CCF");
            RockMigrationHelper.UpdateFieldType("Workflow Activity", "", "Rock", "Rock.Field.Types.WorkflowActivityFieldType", "739FD425-5B8C-4605-B775-7E4D9D4C11DB");
            RockMigrationHelper.UpdateFieldType("Workflow Attribute", "", "Rock", "Rock.Field.Types.WorkflowAttributeFieldType", "33E6DF69-BDFA-407A-9744-C175B60643AE");
            RockMigrationHelper.UpdateFieldType("Metrics", "", "Rock", "Rock.Field.Types.MetricsFieldType", "3AF9AD35-9F3E-4497-BFDE-60C6C1827653");
            RockMigrationHelper.UpdateFieldType("Entity", "", "Rock", "Rock.Field.Types.EntityFieldType", "B50968BD-7643-4288-9237-6E89D2065363");
            RockMigrationHelper.UpdateFieldType("Metric Categories", "", "Rock", "Rock.Field.Types.MetricCategoriesFieldType", "F5334A8E-B7E2-415C-A6EC-A6D8FA5341C4");
            RockMigrationHelper.UpdateFieldType("Workflow Text Or Attribute", "", "Rock", "Rock.Field.Types.WorkflowTextOrAttributeFieldType", "3B1D93D7-9414-48F9-80E5-6A3FC8F94C20");
            RockMigrationHelper.UpdateFieldType("Sliding Date Range", "", "Rock", "Rock.Field.Types.SlidingDateRangeFieldType", "55810BC5-45EA-4044-B783-0CCE0A445C6F");
        }
Esempio n. 4
0
        /// <summary>
        /// Operations to be performed during the upgrade process.
        /// </summary>
        public override void Up()
        {
            RockMigrationHelper.AddDefinedType_pre201409101843015("Global", "Chart Styles", "Defines a listing of various chart styles to be used as configuration for blocks that render charts", "FC684FD7-FE68-493F-AF38-1656FBF67E6B", @"Chart styles are defined with a JSON object. Click the ''Show/Hide Fields'' button below to view an example with all the available chart style fields.

<p>
    <a data-toggle=""collapse""  href=""#collapseFields"" class=''btn btn-action btn-xs''>Show/Hide  Fields</a>
</p>

<div id=""collapseFields"" class=""panel-collapse collapse"">
<pre>
{
  ""SeriesColors"": [
    ""#00CC00"",
    ""#007A00"",
    ""#005500"",
    ""#4DB84D""
  ],
  ""GoalSeriesColor"": ""blue"",
  ""Grid"": {  
    ""ColorGradient"": null,
    ""Color"": ""black"",
    ""BackgroundColorGradient"": [""RGBA(0, 125, 0, .2)"", ""RGBA(0,255,0,.1)"", ""RGBA(0,125,0,.01)""],
    ""BackgroundColor"": null,
    ""BorderWidth"": {
      ""top"": 0,
      ""right"": 0,
      ""bottom"": 1,
      ""left"": 1
    },
    ""BorderColor"": {
      ""top"": null,
      ""right"": null,
      ""bottom"": ""green"",
      ""left"": ""black""
    }
  },
  ""XAxis"": {
    ""Color"": ""#99C2FF"",
    ""Font"": {
      ""Size"": null,
      ""Family"": null,
      ""Color"": ""#336600""
    }
  },
  ""YAxis"": {
    ""Color"": ""#99C2FF"",
    ""Font"": {
      ""Size"": null,
      ""Family"": null,
      ""Color"": ""#336600""
    }
  },
  ""FillOpacity"": 0.2,
  ""FillColor"": null,
  ""Legend"": {
    ""BackgroundColor"": ""transparent"",
    ""BackgroundOpacity"": null,
    ""LabelBoxBorderColor"": null
  },
  ""Title"": {
    ""Font"": {
      ""Size"": 18,
      ""Family"": ""Terminal"",
      ""Color"": ""#296629""
    },
    ""Align"": ""left""
  },
  ""Subtitle"": {
    ""Font"": {
      ""Size"": 12,
      ""Family"": ""Terminal"",
      ""Color"": ""#00CC66""
    },
    ""Align"": ""right""
  }
}
</pre>
</div>");
            RockMigrationHelper.AddDefinedTypeAttribute("FC684FD7-FE68-493F-AF38-1656FBF67E6B", "1D0D3794-C210-48A8-8C68-3FBEC08A6BA5", "Chart Style", "ChartStyle", "", 26, "{}", "173E1A89-A84E-48EC-BFD5-0C8D65A84276");
            RockMigrationHelper.AddAttributeQualifier("173E1A89-A84E-48EC-BFD5-0C8D65A84276", "editorHeight", "", "AB54A928-73C8-4172-97A5-1A1C0C7F4439");
            RockMigrationHelper.AddAttributeQualifier("173E1A89-A84E-48EC-BFD5-0C8D65A84276", "editorMode", "4", "8DCD60DF-C48C-41FA-A9B0-978855A3FB47");
            RockMigrationHelper.AddAttributeQualifier("173E1A89-A84E-48EC-BFD5-0C8D65A84276", "editorTheme", "0", "7C894CCE-5BC6-4A12-A9F4-BBBC27672A23");
            RockMigrationHelper.AddDefinedValue_pre20140819("FC684FD7-FE68-493F-AF38-1656FBF67E6B", "Flot", "The standard Flot chart style", "B45DA8E1-B9A6-46FD-9A2B-E8440D7D6AAC", false);
            RockMigrationHelper.AddDefinedValue_pre20140819("FC684FD7-FE68-493F-AF38-1656FBF67E6B", "Rock", "The default styling for Rock charts.", "2ABB2EA0-B551-476C-8F6B-478CD08C2227", false);
            RockMigrationHelper.AddDefinedValueAttributeValue("2ABB2EA0-B551-476C-8F6B-478CD08C2227", "173E1A89-A84E-48EC-BFD5-0C8D65A84276", @"{
  ""SeriesColors"": [
    ""#8498ab"",
    ""#a4b4c4"",
    ""#b9c7d5"",
    ""#c6d2df"",
    ""#d8e1ea""
  ],
  ""GoalSeriesColor"": ""red"",
  ""Grid"": {
    ""ColorGradient"": null,
    ""Color"": null,
    ""BackgroundColorGradient"": null,
    ""BackgroundColor"": ""transparent"",
    ""BorderWidth"": {
      ""top"": 0,
      ""right"": 0,
      ""bottom"": 1,
      ""left"": 1
    },
    ""BorderColor"": null
  },
  ""XAxis"": {
    ""Color"": ""rgba(81, 81, 81, 0.2)"",
    ""Font"": {
      ""Size"": 10,
      ""Family"": null,
      ""Color"": ""#515151""
    },
    ""DateTimeFormat"": ""%b %e,<br />%Y""
  },
  ""YAxis"": {
    ""Color"": ""rgba(81, 81, 81, 0.2)"",
    ""Font"": {
      ""Size"": null,
      ""Family"": null,
      ""Color"": ""#515151""
    },
    ""DateTimeFormat"": null
  },
  ""FillOpacity"": 0.2,
  ""FillColor"": null,
  ""Legend"": {
    ""BackgroundColor"": ""transparent"",
    ""BackgroundOpacity"": null,
    ""LabelBoxBorderColor"": null
  },
  ""Title"": {
    ""Font"": {
      ""Size"": 16,
      ""Family"": null,
      ""Color"": null
    },
    ""Align"": ""left""
  },
  ""Subtitle"": {
    ""Font"": {
      ""Size"": 12,
      ""Family"": null,
      ""Color"": null
    },
    ""Align"": ""left""
  }
}");
            RockMigrationHelper.AddDefinedValueAttributeValue("B45DA8E1-B9A6-46FD-9A2B-E8440D7D6AAC", "173E1A89-A84E-48EC-BFD5-0C8D65A84276", @"{
  ""Title"": {
    ""Font"": {
      ""Size"": 16,
      ""Family"": null,
      ""Color"": null
    },
    ""Align"": ""left""
  },
  ""Subtitle"": {
    ""Font"": {
      ""Size"": 12,
      ""Family"": null,
      ""Color"": null
    },
    ""Align"": ""left""
  }
}");
        }