Exemplo 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");
        }
Exemplo n.º 2
0
        public override void Up()
        {
            //
            // Update the defined value attributes to show on grid.
            //
            Sql("UPDATE [Attribute] SET [IsGridColumn] = 1 WHERE [Guid] IN ('BF344704-6228-4467-AE4C-42B5EDF6954F', 'B92A5ECF-E819-43C3-8949-EC9BD0F59AAC')");

            RockMigrationHelper.AddBlockType("Digital Sign Rotator",
                                             "Displays a full-screen interface for displaying images and videos in a rotator.",
                                             "~/Plugins/com_shepherdchurch/DigitalSignage/Digital Sign Rotator.ascx",
                                             "Shepherd Church > Digital Signage", SystemGuid.BlockType.DIGITAL_SIGN_ROTATOR);

            RockMigrationHelper.AddPage("5B6DBC42-8B03-4D15-8D92-AAFA28FD8616", "2E169330-D7D7-4ECA-B417-72C64BE150F0",
                                        "Digital Sign", "Default page for displaying digital sign material on a kiosk device",
                                        SystemGuid.Page.DIGITAL_SIGN);

            Sql("UPDATE [Page] SET [DisplayInNavWhen] = 2 WHERE [Guid] = @Guid",
                new Dictionary <string, object> {
                { "@Guid", SystemGuid.Page.DIGITAL_SIGN }
            });

            RockMigrationHelper.AddBlock(SystemGuid.Page.DIGITAL_SIGN, string.Empty,
                                         SystemGuid.BlockType.DIGITAL_SIGN_ROTATOR, "Digital Sign Rotator",
                                         "Main", string.Empty, string.Empty, 0, SystemGuid.Block.DIGITAL_SIGN_DIGITAL_SIGN_ROTATOR);

            RockMigrationHelper.AddPageRoute(SystemGuid.Page.DIGITAL_SIGN, "digitalsign");
            RockMigrationHelper.AddPageRoute(SystemGuid.Page.DIGITAL_SIGN, "digitalsign/{deviceId}");
        }
Exemplo n.º 3
0
        /// <summary>
        /// Operations to be performed during the upgrade process.
        /// </summary>
        public override void Up()
        {
            // Add Page: Inspect Security, Parent: Security, Layout: FullWidth, Site: Internal Website
            RockMigrationHelper.AddPage("91CCB1C9-5F9F-44F5-8BE2-9EC3A3CFD46F", "D65F783D-87A9-4CC9-8110-E83466A0EADB", "Inspect Security", string.Empty, "B8CACE4E-1B10-46F4-B147-31F32B442915", "fa fa-search");

            // Add Block Type: Verify Security
            RockMigrationHelper.AddBlockType("Verify Security", "Verify the security of an entity and how it applies to a specified user.", "~/Blocks/Security/VerifySecurity.ascx", "Security", "65F18F6C-AD97-42A7-958D-20359E804965");

            // Add Block: Verify Security, to Page: Inspect Security, Site: Internal Website
            RockMigrationHelper.AddBlock("B8CACE4E-1B10-46F4-B147-31F32B442915", string.Empty, "65F18F6C-AD97-42A7-958D-20359E804965", "Verify Security", "Main", string.Empty, string.Empty, 0, "E7A8210C-C29E-4EA3-AA9D-3006B6B676DF");
        }
Exemplo n.º 4
0
        /// <summary>
        /// Operations to be performed during the upgrade process.
        /// </summary>
        public override void Up()
        {
            Sql(@"DELETE FROM [BlockType] WHERE [Path] = '~/Blocks/Utility/IdleRedirect.ascx'");
            RockMigrationHelper.AddBlockType("Idle Redirect", "Redirects user to a new url after a specific number of idle seconds.", "~/Blocks/Utility/IdleRedirect.ascx", "Utility", "49fc4b38-741e-4b0b-b395-7c1929340d88");
            // Attrib for BlockType: Idle Redirect:Idle Seconds
            RockMigrationHelper.AddBlockTypeAttribute("49FC4B38-741E-4B0B-B395-7C1929340D88", "A75DFC58-7A1B-4799-BF31-451B2BBE38FF", "Idle Seconds", "IdleSeconds", "", "How many seconds of idle time to wait before redirecting user", 0, @"20", "1CAC7B16-041A-4F40-8AEE-A39DFA076C14");
            // Attrib for BlockType: Idle Redirect:New Location
            RockMigrationHelper.AddBlockTypeAttribute("49FC4B38-741E-4B0B-B395-7C1929340D88", "9C204CD0-1233-41C5-818A-C5DA439445AA", "New Location", "NewLocation", "", "The new location URL to send user to after idle time", 0, @"", "2254B67B-9CB1-47DE-A63D-D0B56051ECD4");


            RockMigrationHelper.AddBlock("d47858c0-0e6e-46dc-ae99-8ec84ba5f45f", null, "49fc4b38-741e-4b0b-b395-7c1929340d88", "Idle Timeout", "Main", "", "", 1, "c864b0ad-7242-4bf2-a23d-bc915ddf3e6e");
            RockMigrationHelper.AddBlockAttributeValue("c864b0ad-7242-4bf2-a23d-bc915ddf3e6e", "2254B67B-9CB1-47DE-A63D-D0B56051ECD4", @"/checkin/welcome");
            RockMigrationHelper.AddBlockAttributeValue("c864b0ad-7242-4bf2-a23d-bc915ddf3e6e", "1CAC7B16-041A-4F40-8AEE-A39DFA076C14", @"20");

            RockMigrationHelper.AddBlock("10c97379-f719-4acb-b8c6-651957b660a4", null, "49fc4b38-741e-4b0b-b395-7c1929340d88", "Idle Timeout", "Main", "", "", 1, "7791585a-75d0-4d41-9cdc-e3346cd8c723");
            RockMigrationHelper.AddBlockAttributeValue("7791585a-75d0-4d41-9cdc-e3346cd8c723", "2254B67B-9CB1-47DE-A63D-D0B56051ECD4", @"/checkin/welcome");
            RockMigrationHelper.AddBlockAttributeValue("7791585a-75d0-4d41-9cdc-e3346cd8c723", "1CAC7B16-041A-4F40-8AEE-A39DFA076C14", @"20");

            RockMigrationHelper.AddBlock("bb8cf87f-680f-48f9-9147-f4951e033d17", null, "49fc4b38-741e-4b0b-b395-7c1929340d88", "Idle Timeout", "Main", "", "", 1, "dd1eb2e3-7532-4e2b-a924-f41ddcd98d8f");
            RockMigrationHelper.AddBlockAttributeValue("dd1eb2e3-7532-4e2b-a924-f41ddcd98d8f", "2254B67B-9CB1-47DE-A63D-D0B56051ECD4", @"/checkin/welcome");
            RockMigrationHelper.AddBlockAttributeValue("dd1eb2e3-7532-4e2b-a924-f41ddcd98d8f", "1CAC7B16-041A-4F40-8AEE-A39DFA076C14", @"20");

            RockMigrationHelper.AddBlock("60e3ea1f-fd6b-4f0e-9c72-a9960e13427c", null, "49fc4b38-741e-4b0b-b395-7c1929340d88", "Idle Timeout", "Main", "", "", 1, "922a6a94-ce74-48ef-8935-0e04321167d6");
            RockMigrationHelper.AddBlockAttributeValue("922a6a94-ce74-48ef-8935-0e04321167d6", "2254B67B-9CB1-47DE-A63D-D0B56051ECD4", @"/checkin/welcome");
            RockMigrationHelper.AddBlockAttributeValue("922a6a94-ce74-48ef-8935-0e04321167d6", "1CAC7B16-041A-4F40-8AEE-A39DFA076C14", @"20");

            RockMigrationHelper.AddBlock("043bb717-5799-446f-b8da-30e575110b0c", null, "49fc4b38-741e-4b0b-b395-7c1929340d88", "Idle Timeout", "Main", "", "", 1, "5d5f33a8-3299-4e1e-ad06-075fa2dcfcf6");
            RockMigrationHelper.AddBlockAttributeValue("5d5f33a8-3299-4e1e-ad06-075fa2dcfcf6", "2254B67B-9CB1-47DE-A63D-D0B56051ECD4", @"/checkin/welcome");
            RockMigrationHelper.AddBlockAttributeValue("5d5f33a8-3299-4e1e-ad06-075fa2dcfcf6", "1CAC7B16-041A-4F40-8AEE-A39DFA076C14", @"20");

            RockMigrationHelper.AddBlock("6f0cb22b-e05b-42f1-a329-9219e81f6c34", null, "49fc4b38-741e-4b0b-b395-7c1929340d88", "Idle Timeout", "Main", "", "", 1, "cb45fe1d-c99b-4cb9-9e0b-becfe233512b");
            RockMigrationHelper.AddBlockAttributeValue("cb45fe1d-c99b-4cb9-9e0b-becfe233512b", "2254B67B-9CB1-47DE-A63D-D0B56051ECD4", @"/checkin/welcome");
            RockMigrationHelper.AddBlockAttributeValue("cb45fe1d-c99b-4cb9-9e0b-becfe233512b", "1CAC7B16-041A-4F40-8AEE-A39DFA076C14", @"20");

            RockMigrationHelper.AddBlock("c0afa081-b64e-4006-bffc-a350a51ae4cc", null, "49fc4b38-741e-4b0b-b395-7c1929340d88", "Idle Timeout", "Main", "", "", 1, "d9ee24ab-df49-4897-bfc7-b09c3d7d5c40");
            RockMigrationHelper.AddBlockAttributeValue("d9ee24ab-df49-4897-bfc7-b09c3d7d5c40", "2254B67B-9CB1-47DE-A63D-D0B56051ECD4", @"/checkin/welcome");
            RockMigrationHelper.AddBlockAttributeValue("d9ee24ab-df49-4897-bfc7-b09c3d7d5c40", "1CAC7B16-041A-4F40-8AEE-A39DFA076C14", @"20");

            RockMigrationHelper.AddBlock("e08230b8-35a4-40d6-a0bb-521418314da9", null, "49fc4b38-741e-4b0b-b395-7c1929340d88", "Idle Timeout", "Main", "", "", 1, "2ff4cfd8-bbf3-4d27-a47e-76cc75e3969e");
            RockMigrationHelper.AddBlockAttributeValue("2ff4cfd8-bbf3-4d27-a47e-76cc75e3969e", "2254B67B-9CB1-47DE-A63D-D0B56051ECD4", @"/checkin/welcome");
            RockMigrationHelper.AddBlockAttributeValue("2ff4cfd8-bbf3-4d27-a47e-76cc75e3969e", "1CAC7B16-041A-4F40-8AEE-A39DFA076C14", @"20");

            RockMigrationHelper.AddBlock("a1cbdaa4-94dd-4156-8260-5a3781e39fd0", null, "49fc4b38-741e-4b0b-b395-7c1929340d88", "Idle Timeout", "Main", "", "", 1, "8acb3d17-be0a-4196-baa3-6f33cf4d058c");
            RockMigrationHelper.AddBlockAttributeValue("8acb3d17-be0a-4196-baa3-6f33cf4d058c", "2254B67B-9CB1-47DE-A63D-D0B56051ECD4", @"/checkin/welcome");
            RockMigrationHelper.AddBlockAttributeValue("8acb3d17-be0a-4196-baa3-6f33cf4d058c", "1CAC7B16-041A-4F40-8AEE-A39DFA076C14", @"20");

            RockMigrationHelper.AddBlock("af83d0b2-2995-4e46-b0df-1a4763637a68", null, "49fc4b38-741e-4b0b-b395-7c1929340d88", "Idle Timeout", "Main", "", "", 1, "14e5d210-b37c-4c3b-be9b-cc9238688944");
            RockMigrationHelper.AddBlockAttributeValue("14e5d210-b37c-4c3b-be9b-cc9238688944", "2254B67B-9CB1-47DE-A63D-D0B56051ECD4", @"/checkin/welcome");
            RockMigrationHelper.AddBlockAttributeValue("14e5d210-b37c-4c3b-be9b-cc9238688944", "1CAC7B16-041A-4F40-8AEE-A39DFA076C14", @"20");
        }
        /// <summary>
        /// The commands to run to migrate plugin to the specific version
        /// </summary>
        public override void Up()
        {
            // block and page
            RockMigrationHelper.AddBlockType("Shelby GL Export", "Lists all financial batches and provides Shelby GL Export capability", "~/Plugins/rocks_kfs/Finance/ShelbyGLExport.ascx", "KFS > Finance", "4A55A21B-F174-4012-AD6D-00BA9D76B1CA");
            RockMigrationHelper.AddPage(Rock.SystemGuid.Page.FUNCTIONS_FINANCE, "D65F783D-87A9-4CC9-8110-E83466A0EADB", "Shelby GL Export", "", "408AAC12-B303-4565-AB97-0199F9F69A1B", "fa fa-archive", "EF65EFF2-99AC-4081-8E09-32A04518683A");
            RockMigrationHelper.AddBlock("408AAC12-B303-4565-AB97-0199F9F69A1B", "", "4A55A21B-F174-4012-AD6D-00BA9D76B1CA", "Shelby GL Export", "Main", "", "", 0, "7ED41FAE-BEE1-4307-AD4F-DEC77D455553");

            // project defined type
            RockMigrationHelper.AddDefinedType("Financial", "Financial Projects", "Used to designate what Project a Transaction should be associated with.", "1C9E0068-6840-4551-86F0-E12691CEC063");
            RockMigrationHelper.AddDefinedTypeAttribute("1C9E0068-6840-4551-86F0-E12691CEC063", Rock.SystemGuid.FieldType.TEXT, "GL Code", "Code", "", 0, "", "B85AA55C-ED3E-4E67-B022-81A7FC8C1E94");

            // batch export date
            RockMigrationHelper.AddEntityAttribute("Rock.Model.FinancialBatch", Rock.SystemGuid.FieldType.DATE_TIME, "", "", "Batch Exported", "", "Date a batch was exported", 0, "", "ADFC01F7-B446-479F-9BFE-30E3D68BCB83", "GLExport_BatchExported");
            RockMigrationHelper.AddAttributeQualifier("ADFC01F7-B446-479F-9BFE-30E3D68BCB83", "displayDiff", "False", "79D5F0E2-5A5F-46B6-B521-ADD2AB290ADB");
            RockMigrationHelper.AddAttributeQualifier("ADFC01F7-B446-479F-9BFE-30E3D68BCB83", "format", "", "06AC3DE6-BF7B-4DC4-AED4-9AFA5AB0A623");

            // transaction project
            RockMigrationHelper.AddEntityAttribute("Rock.Model.FinancialTransaction", Rock.SystemGuid.FieldType.DEFINED_VALUE, "", "", "Transaction Project", "", "Designates the Project at the Financial Transaction Level", 0, "", "D15927A2-C163-4286-AC8E-5FD081E753FA", "Project");
            RockMigrationHelper.AddAttributeQualifier("D15927A2-C163-4286-AC8E-5FD081E753FA", "allowmultiple", "False", "E537D256-DD39-4324-982D-E9B71C6901F1");
            RockMigrationHelper.AddAttributeQualifier("D15927A2-C163-4286-AC8E-5FD081E753FA", "definedtype", "", "A50F2C57-32D8-4B34-8DFC-F2C47EBBFB4E");

            // transaction detail project
            RockMigrationHelper.AddEntityAttribute("Rock.Model.FinancialTransactionDetail", Rock.SystemGuid.FieldType.DEFINED_VALUE, "", "", "Transaction Detail Project", "", "Designates the Project at the Financial Transaction Detail Level", 0, "", "C02C812E-AEEE-4D22-A13C-796558CD429D", "Project");
            RockMigrationHelper.AddAttributeQualifier("C02C812E-AEEE-4D22-A13C-796558CD429D", "allowmultiple", "False", "C02C812E-AEEE-4D22-A13C-796558CD429D");
            RockMigrationHelper.AddAttributeQualifier("C02C812E-AEEE-4D22-A13C-796558CD429D", "definedtype", "", "C02C812E-AEEE-4D22-A13C-796558CD429D");

            // account default project
            RockMigrationHelper.AddEntityAttribute("Rock.Model.FinancialAccount", Rock.SystemGuid.FieldType.DEFINED_VALUE, "", "", "Default Project", "", "Designates the Project at the Financial Account Level", 0, "", "94E413D7-C6EB-4041-9E86-44269FFB9858", "Project");
            RockMigrationHelper.AddAttributeQualifier("94E413D7-C6EB-4041-9E86-44269FFB9858", "allowmultiple", "False", "518C3573-C2CB-4D10-BFD9-32A5E4D98CC5");
            RockMigrationHelper.AddAttributeQualifier("94E413D7-C6EB-4041-9E86-44269FFB9858", "definedtype", "", "6D84B878-66EC-462F-BC22-D9F2E41A4CF3");

            // set defined type qualifers
            Sql(@"
                DECLARE @ProjectDefinedTypeId int = ( SELECT TOP 1 [Id] FROM [DefinedType] WHERE [Guid] = '1C9E0068-6840-4551-86F0-E12691CEC063' )
                
                UPDATE [AttributeQualifier] SET [Value] = CAST( @ProjectDefinedTypeId AS varchar )
                WHERE [Guid] = 'A50F2C57-32D8-4B34-8DFC-F2C47EBBFB4E'

                UPDATE [AttributeQualifier] SET [Value] = CAST( @ProjectDefinedTypeId AS varchar )
                WHERE [Guid] = 'C02C812E-AEEE-4D22-A13C-796558CD429D'

                UPDATE [AttributeQualifier] SET [Value] = CAST( @ProjectDefinedTypeId AS varchar )
                WHERE [Guid] = '6D84B878-66EC-462F-BC22-D9F2E41A4CF3'

                UPDATE [Attribute] SET [IsGridColumn] = 1
                WHERE [Guid] = 'B85AA55C-ED3E-4E67-B022-81A7FC8C1E94'
            ");

            // account gl attributes
            RockMigrationHelper.AddEntityAttribute("Rock.Model.FinancialAccount", Rock.SystemGuid.FieldType.TEXT, "", "", "Company", "", "", 1, "", "A6FBC708-AD97-4638-95B5-11E49B8277AF", "GeneralLedgerExport_Company");
            RockMigrationHelper.AddEntityAttribute("Rock.Model.FinancialAccount", Rock.SystemGuid.FieldType.TEXT, "", "", "Fund", "", "", 2, "", "4F0D43CC-0EA7-4972-9ACA-F0849E892A16", "GeneralLedgerExport_Fund");
            RockMigrationHelper.AddEntityAttribute("Rock.Model.FinancialAccount", Rock.SystemGuid.FieldType.TEXT, "", "", "Bank Account", "", "", 3, "", "C4B71AE6-6621-4A6C-9A8D-3F23CEA1EBF5", "GeneralLedgerExport_BankAccount");
            RockMigrationHelper.AddEntityAttribute("Rock.Model.FinancialAccount", Rock.SystemGuid.FieldType.TEXT, "", "", "Revenue Department", "", "", 4, "", "1DB4ED40-7F7A-4A2C-A140-93B2909EB437", "GeneralLedgerExport_RevenueDepartment");
            RockMigrationHelper.AddEntityAttribute("Rock.Model.FinancialAccount", Rock.SystemGuid.FieldType.TEXT, "", "", "Revenue Account", "", "", 5, "", "FF7119BC-8387-4F76-865A-2CA10C3BE308", "GeneralLedgerExport_RevenueAccount");

            RockMigrationHelper.UpdateCategory("5997C8D3-8840-4591-99A5-552919F90CBD", "GL Export", "fa fa-calculator", "", "7D825118-C581-41EA-933E-1FE194E0FC46");   // batch
            RockMigrationHelper.UpdateCategory("5997C8D3-8840-4591-99A5-552919F90CBD", "GL Export", "fa fa-calculator", "", "37CF80DC-1F95-4109-9359-30C424B62051");   // transaction
            RockMigrationHelper.UpdateCategory("5997C8D3-8840-4591-99A5-552919F90CBD", "GL Export", "fa fa-calculator", "", "E2885276-7F8B-4283-B8A4-933EBB4BD083");   // transaction detail
            RockMigrationHelper.UpdateCategory("5997C8D3-8840-4591-99A5-552919F90CBD", "GL Export", "fa fa-calculator", "", "8E7631B3-987E-4374-8697-EDEEC53B1AC4");   // account

            Sql(@"
                DECLARE @BatchEntityTypeId int = ( SELECT TOP 1 [Id] FROM [EntityType] WHERE [Guid] = 'BDD09C8E-2C52-4D08-9062-BE7D52D190C2' )
                DECLARE @BatchCategoryId int = ( SELECT TOP 1 [Id] FROM [Category] WHERE [Guid] = '7D825118-C581-41EA-933E-1FE194E0FC46' )

                UPDATE [Category]
                SET [EntityTypeQualifierColumn] = 'EntityTypeId',  [EntityTypeQualifierValue] = @BatchEntityTypeId
                WHERE [Id] = @BatchCategoryId
                
                INSERT INTO [AttributeCategory]
                SELECT [Id], @BatchCategoryId
                FROM [Attribute]
                WHERE [Guid] = 'ADFC01F7-B446-479F-9BFE-30E3D68BCB83'


                DECLARE @TransactionEntityTypeId int = ( SELECT TOP 1 [Id] FROM [EntityType] WHERE [Guid] = '2C1CB26B-AB22-42D0-8164-AEDEE0DAE667' )
                DECLARE @TransactionCategoryId int = ( SELECT TOP 1 [Id] FROM [Category] WHERE [Guid] = '37CF80DC-1F95-4109-9359-30C424B62051' )

                UPDATE [Category]
                SET [EntityTypeQualifierColumn] = 'EntityTypeId',  [EntityTypeQualifierValue] = @TransactionEntityTypeId
                WHERE [Id] = @TransactionCategoryId
                
                INSERT INTO [AttributeCategory]
                SELECT [Id], @TransactionCategoryId
                FROM [Attribute]
                WHERE [Guid] = 'D15927A2-C163-4286-AC8E-5FD081E753FA'


                DECLARE @TransactionDetailEntityTypeId int = ( SELECT TOP 1 [Id] FROM [EntityType] WHERE [Guid] = 'AC4AC28B-8E7E-4D7E-85DB-DFFB4F3ADCCE' )
                DECLARE @TransactionDetailCategoryId int = ( SELECT TOP 1 [Id] FROM [Category] WHERE [Guid] = 'E2885276-7F8B-4283-B8A4-933EBB4BD083' )

                UPDATE [Category]
                SET [EntityTypeQualifierColumn] = 'EntityTypeId',  [EntityTypeQualifierValue] = @TransactionDetailEntityTypeId
                WHERE [Id] = @TransactionDetailCategoryId

                INSERT INTO [AttributeCategory]
                SELECT [Id], @TransactionDetailCategoryId
                FROM [Attribute]
                WHERE [Guid] = 'C02C812E-AEEE-4D22-A13C-796558CD429D'

                
                DECLARE @AccountEntityTypeId int = ( SELECT TOP 1 [Id] FROM [EntityType] WHERE [Guid] = '798BCE48-6AA7-4983-9214-F9BCEFB4521D' )
                DECLARE @AccountCategoryId int = ( SELECT TOP 1 [Id] FROM [Category] WHERE [Guid] = '8E7631B3-987E-4374-8697-EDEEC53B1AC4' )

                UPDATE [Category]
                SET [EntityTypeQualifierColumn] = 'EntityTypeId',  [EntityTypeQualifierValue] = @AccountEntityTypeId
                WHERE [Id] = @AccountCategoryId

                INSERT INTO [AttributeCategory]
                SELECT [Id], @AccountCategoryId
                FROM [Attribute]
                WHERE [Guid] = '94E413D7-C6EB-4041-9E86-44269FFB9858'
                   OR [Guid] = 'A6FBC708-AD97-4638-95B5-11E49B8277AF'
                   OR [Guid] = '4F0D43CC-0EA7-4972-9ACA-F0849E892A16'
                   OR [Guid] = 'C4B71AE6-6621-4A6C-9A8D-3F23CEA1EBF5'
                   OR [Guid] = '1DB4ED40-7F7A-4A2C-A140-93B2909EB437'
                   OR [Guid] = 'FF7119BC-8387-4F76-865A-2CA10C3BE308'
            ");
        }
Exemplo n.º 6
0
        /// <summary>
        /// Operations to be performed during the upgrade process.
        /// </summary>
        public override void Up()
        {
            #region Add ContentChannelViewDetail blocktype
            // Attrib Value for BlockType: Content Channel View Detail
            RockMigrationHelper.AddBlockType("Content Channel View Detail", "Block to display a specific content channel item.", "~/Blocks/Cms/ContentChannelViewDetail.ascx", "CMS", "63659EBE-C5AF-4157-804A-55C7D565110E");

            // Attrib Value for BlockType: Content Channel View Detail
            RockMigrationHelper.AddBlockTypeAttribute("63659EBE-C5AF-4157-804A-55C7D565110E", FieldType.WORKFLOW_TYPE, "Workflow Type", "WorkflowType", "", @"The workflow type to launch when the content is viewed.", 0, @"", "61361765-4762-4017-A58D-6CFCDD3CADC1", false);
            // Attrib Value for BlockType: Content Channel View Detail
            RockMigrationHelper.AddBlockTypeAttribute("63659EBE-C5AF-4157-804A-55C7D565110E", FieldType.TEXT, "Twitter Title Attribute", "TwitterTitleAttribute", "", @"", 0, @"", "CE43C275-44CA-4DA6-92CB-FAAFB1F886CF", false);
            // Attrib Value for BlockType: Content Channel View Detail
            RockMigrationHelper.AddBlockTypeAttribute("63659EBE-C5AF-4157-804A-55C7D565110E", FieldType.TEXT, "Twitter Description Attribute", "TwitterDescriptionAttribute", "", @"", 0, @"", "32DE419C-062E-45FE-9BBE-CAE104A11491", false);
            // Attrib Value for BlockType: Content Channel View Detail
            RockMigrationHelper.AddBlockTypeAttribute("63659EBE-C5AF-4157-804A-55C7D565110E", FieldType.TEXT, "Twitter Card", "TwitterCard", "", @"", 0, @"none", "D0C4618E-1F92-4107-A22F-8D638FD73E19", false);
            // Attrib Value for BlockType: Content Channel View Detail
            RockMigrationHelper.AddBlockTypeAttribute("63659EBE-C5AF-4157-804A-55C7D565110E", FieldType.TEXT, "Twitter Image Attribute", "TwitterImageAttribute", "", @"", 0, @"", "4CEFDE01-A056-4DBE-BEC2-979DCE0F4D39", false);
            // Attrib Value for BlockType: Content Channel View Detail
            RockMigrationHelper.AddBlockTypeAttribute("63659EBE-C5AF-4157-804A-55C7D565110E", FieldType.LAVA_COMMANDS, "Enabled Lava Commands", "EnabledLavaCommands", "", @"The Lava commands that should be enabled for this content channel item block.", 0, @"", "8E741F29-A5D1-433B-A520-25C65B349216", false);
            // Attrib Value for BlockType: Content Channel View Detail
            RockMigrationHelper.AddBlockTypeAttribute("63659EBE-C5AF-4157-804A-55C7D565110E", FieldType.CONTENT_CHANNEL, "Content Channel", "ContentChannel", "", @"Limits content channel items to a specific channel, or leave blank to leave unrestricted.", 0, @"", "E8921151-6392-4FFD-A1F4-67A6AAD69776", false);
            // Attrib Value for BlockType: Content Channel View Detail
            RockMigrationHelper.AddBlockTypeAttribute("63659EBE-C5AF-4157-804A-55C7D565110E", FieldType.TEXT, "Content Channel Query Parameter", "ContentChannelQueryParameter", "", @"
Specify the URL parameter to use to determine which Content Channel Item to show, or leave blank to use whatever the first parameter is. 
The type of the value will determine how the content channel item will be determined as follows:

Integer - ContentChannelItem Id
String - ContentChannelItem Slug
Guid - ContentChannelItem Guid

", 0, @"", "39CC148D-B905-4560-96DD-C5151DC344DE", false);
            // Attrib Value for BlockType: Content Channel View Detail
            RockMigrationHelper.AddBlockTypeAttribute("63659EBE-C5AF-4157-804A-55C7D565110E", FieldType.CODE_EDITOR, "Lava Template", "LavaTemplate", "", @"The template to use when formatting the content channel item.", 0, @"
<h1>{{ Item.Title }}</h1>
{{ Item.Content }}", "47C56661-FB70-4703-9781-8651B8B49485", false);
            // Attrib Value for BlockType: Content Channel View Detail
            RockMigrationHelper.AddBlockTypeAttribute("63659EBE-C5AF-4157-804A-55C7D565110E", FieldType.INTEGER, "Output Cache Duration", "OutputCacheDuration", "", @"Number of seconds to cache the resolved output. Only cache the output if you are not personalizing the output based on current user, current page, or any other merge field value.", 0, @"", "7A9CBC44-FF60-464D-983A-61BD009F9C95", false);
            // Attrib Value for BlockType: Content Channel View Detail
            RockMigrationHelper.AddBlockTypeAttribute("63659EBE-C5AF-4157-804A-55C7D565110E", FieldType.BOOLEAN, "Set Page Title", "SetPageTitle", "", @"Determines if the block should set the page title with the channel name or content item.", 0, @"False", "406D4BB0-9BE3-4047-99C9-EAB5592B0942", false);
            // Attrib Value for BlockType: Content Channel View Detail
            RockMigrationHelper.AddBlockTypeAttribute("63659EBE-C5AF-4157-804A-55C7D565110E", FieldType.BOOLEAN, "Log Interactions", "LogInteractions", "", @"", 0, @"False", "3503170E-DD5E-4F51-9699-DCEA80C8C64C", false);
            // Attrib Value for BlockType: Content Channel View Detail
            RockMigrationHelper.AddBlockTypeAttribute("63659EBE-C5AF-4157-804A-55C7D565110E", FieldType.BOOLEAN, "Write Interaction Only If Individual Logged In", "WriteInteractionOnlyIfIndividualLoggedIn", "", @"Set to true to only write interactions for logged in users, or set to false to write interactions for both logged in and anonymous users.", 0, @"False", "63B254F7-E19C-48FD-A93F-AFEE19C1ED21", false);
            // Attrib Value for BlockType: Content Channel View Detail
            RockMigrationHelper.AddBlockTypeAttribute("63659EBE-C5AF-4157-804A-55C7D565110E", FieldType.BOOLEAN, "Launch Workflow Only If Individual Logged In", "LaunchWorkflowOnlyIfIndividualLoggedIn", "", @"Set to true to only launch a workflow for logged in users, or set to false to launch for both logged in and anonymous users.", 0, @"False", "EB298724-07D5-42AF-B4BF-82420AF6A657", false);
            // Attrib Value for BlockType: Content Channel View Detail
            RockMigrationHelper.AddBlockTypeAttribute("63659EBE-C5AF-4157-804A-55C7D565110E", FieldType.SINGLE_SELECT, "Launch Workflow Condition", "LaunchWorkflowCondition", "", @"", 0, @"1", "E5EFC23D-E030-496C-A9A4-D2BF4181CB49", false);
            // Attrib Value for BlockType: Content Channel View Detail
            RockMigrationHelper.AddBlockTypeAttribute("63659EBE-C5AF-4157-804A-55C7D565110E", FieldType.TEXT, "Meta Description Attribute", "MetaDescriptionAttribute", "", @"", 0, @"", "DEECC65E-97B6-42B9-A1EF-9FD0CCD25CC0", false);
            // Attrib Value for BlockType: Content Channel View Detail
            RockMigrationHelper.AddBlockTypeAttribute("63659EBE-C5AF-4157-804A-55C7D565110E", FieldType.TEXT, "Open Graph Type", "OpenGraphType", "", @"", 0, @"", "07C9EB02-98CF-4BB5-9C0A-6D616E35C8F0", false);
            // Attrib Value for BlockType: Content Channel View Detail
            RockMigrationHelper.AddBlockTypeAttribute("63659EBE-C5AF-4157-804A-55C7D565110E", FieldType.TEXT, "Open Graph Title Attribute", "OpenGraphTitleAttribute", "", @"", 0, @"", "BF87BEEA-B1FB-40F1-AA29-1F214057BCE3", false);
            // Attrib Value for BlockType: Content Channel View Detail
            RockMigrationHelper.AddBlockTypeAttribute("63659EBE-C5AF-4157-804A-55C7D565110E", FieldType.TEXT, "Open Graph Description Attribute", "OpenGraphDescriptionAttribute", "", @"", 0, @"", "7690BF49-E522-4A30-947A-0C410C4A7B42", false);
            // Attrib Value for BlockType: Content Channel View Detail
            RockMigrationHelper.AddBlockTypeAttribute("63659EBE-C5AF-4157-804A-55C7D565110E", FieldType.TEXT, "Open Graph Image Attribute", "OpenGraphImageAttribute", "", @"", 0, @"", "EC5EFDA3-5F6D-46F9-830B-D1D0B3577AB0", false);

            #endregion

            Sql(MigrationSQL._201806111950515_ContentChannelViewDetail);
        }
Exemplo n.º 7
0
        public override void Up()
        {
            #region Block Type Terminal

            // BlockType: Terminal
            RockMigrationHelper.AddBlockType("Terminal",
                                             "Acts as a POS terminal in Rock for selling items.",
                                             "~/Plugins/com_shepherdchurch/CubeDown/Terminal.ascx",
                                             "Shepherd Church > Cube Down",
                                             SystemGuid.BlockType.TERMINAL);

            #endregion

            #region Block Type View Receipt Lava

            // BlockType: View Receipt Lava
            RockMigrationHelper.AddBlockType("View Receipt Lava",
                                             "Shows a user their receipt from a previous purchase.",
                                             "~/Plugins/com_shepherdchurch/CubeDown/ViewReceiptLava.ascx",
                                             "Shepherd Church > Cube Down",
                                             SystemGuid.BlockType.VIEW_RECEIPT_LAVA);

            #endregion

            #region Page Terminal

            // Page: Terminal
            RockMigrationHelper.AddPage("5b6dbc42-8b03-4d15-8d92-aafa28fd8616",
                                        "2e169330-d7d7-4eca-b417-72c64be150f0", // Blank
                                        "Terminal",
                                        @"",
                                        SystemGuid.Page.TERMINAL,
                                        "fa fa-hand-holding-usd");

            // Block for Page Terminal: Terminal
            RockMigrationHelper.AddBlock(SystemGuid.Page.TERMINAL,
                                         "",
                                         SystemGuid.BlockType.TERMINAL,
                                         "Terminal",
                                         "Main",
                                         @"",
                                         @"",
                                         0,
                                         SystemGuid.Block.TERMINAL__TERMINAL);

            #endregion

            #region Page Terminal > View Receipt

            // Page: View Receipt
            RockMigrationHelper.AddPage(SystemGuid.Page.TERMINAL,
                                        "2e169330-d7d7-4eca-b417-72c64be150f0", // Blank
                                        "View Receipt",
                                        @"",
                                        SystemGuid.Page.VIEW_RECEIPT,
                                        "");

            RockMigrationHelper.AddPageRoute(SystemGuid.Page.VIEW_RECEIPT, "ViewReceipt/{ReceiptCode}");

            // Block for Page View Receipt: View Receipt Lava
            RockMigrationHelper.AddBlock(SystemGuid.Page.VIEW_RECEIPT,
                                         "",
                                         SystemGuid.BlockType.VIEW_RECEIPT_LAVA,
                                         "View Receipt Lava",
                                         "Main",
                                         @"",
                                         @"",
                                         0,
                                         SystemGuid.Block.VIEW_RECEIPT__VIEW_RECEIPT_LAVA);

            RockMigrationHelper.AddSecurityAuthForPage(SystemGuid.Page.VIEW_RECEIPT,
                                                       0,
                                                       Rock.Security.Authorization.VIEW,
                                                       true,
                                                       string.Empty,
                                                       (int)Rock.Model.SpecialRole.AllUsers,
                                                       "EEFAFCD6-13F4-4918-BB68-4633FA48A922");

            #endregion
        }
        public override void Up()
        {
            RockMigrationHelper.AddGroupType("Acme Certificates",
                                             "Contains information on Acme SSL Certificates that are installed and will be renewed.",
                                             "Certificate", "Member", false, false, false, "fa fa-certificate", 999,
                                             null, 0, null, SystemGuid.GroupType.ACME_CERTIFICATES);
            int groupTypeId = ( int )SqlScalar("SELECT [Id] FROM [GroupType] WHERE [Guid] = @Guid", "@Guid", SystemGuid.GroupType.ACME_CERTIFICATES);

            RockMigrationHelper.AddEntityAttribute("Rock.Model.GroupType",
                                                   Rock.SystemGuid.FieldType.TEXT, "Id", groupTypeId.ToString(),
                                                   "Account", string.Empty, string.Empty, 0,
                                                   string.Empty, SystemGuid.Attribute.ACCOUNT);

            RockMigrationHelper.AddGroupTypeGroupAttribute(SystemGuid.GroupType.ACME_CERTIFICATES,
                                                           Rock.SystemGuid.FieldType.TEXT, "Domains", string.Empty,
                                                           0, string.Empty, SystemGuid.Attribute.DOMAINS);

            RockMigrationHelper.AddGroupTypeGroupAttribute(SystemGuid.GroupType.ACME_CERTIFICATES,
                                                           Rock.SystemGuid.FieldType.DATE_TIME, "Last Renewed", string.Empty,
                                                           1, string.Empty, SystemGuid.Attribute.LAST_RENEWED);

            RockMigrationHelper.AddGroupTypeGroupAttribute(SystemGuid.GroupType.ACME_CERTIFICATES,
                                                           Rock.SystemGuid.FieldType.TEXT, "Certificate Hash", string.Empty,
                                                           2, string.Empty, SystemGuid.Attribute.CERTIFICATE_HASH);

            RockMigrationHelper.AddGroupTypeGroupAttribute(SystemGuid.GroupType.ACME_CERTIFICATES,
                                                           Rock.SystemGuid.FieldType.TEXT, "Bindings", string.Empty,
                                                           3, string.Empty, SystemGuid.Attribute.BINDINGS);

            RockMigrationHelper.AddGroupTypeGroupAttribute(SystemGuid.GroupType.ACME_CERTIFICATES,
                                                           Rock.SystemGuid.FieldType.TEXT, "Remove Old Certificate", string.Empty,
                                                           4, string.Empty, SystemGuid.Attribute.REMOVE_OLD_CERTIFICATE);

            RockMigrationHelper.AddBlockType("Acme Config",
                                             "Configures the Acme certification system.",
                                             "~/Plugins/com_blueboxmoon/AcmeCertificate/AcmeConfig.ascx",
                                             "Blue Box Moon > Acme Certificate",
                                             SystemGuid.BlockType.ACME_CONFIG);

            RockMigrationHelper.AddBlockType("Acme Certificates",
                                             "Lists the certificate configuration.",
                                             "~/Plugins/com_blueboxmoon/AcmeCertificate/AcmeCertificates.ascx",
                                             "Blue Box Moon > Acme Certificate",
                                             SystemGuid.BlockType.ACME_CERTIFICATES);

            RockMigrationHelper.AddBlockType("Acme Certificate Detail",
                                             "Configures a certificate.",
                                             "~/Plugins/com_blueboxmoon/AcmeCertificate/AcmeCertificateDetail.ascx",
                                             "Blue Box Moon > Acme Certificate",
                                             SystemGuid.BlockType.ACME_CERTIFICATE_DETAIL);

            RockMigrationHelper.AddBlockType("Acme Challenge",
                                             "Responds to challenges for the Acme certification system.",
                                             "~/Plugins/com_blueboxmoon/AcmeCertificate/AcmeChallenge.ascx",
                                             "Blue Box Moon > Acme Certificate",
                                             SystemGuid.BlockType.ACME_CHALLENGE);

            RockMigrationHelper.AddBlockTypeAttribute(SystemGuid.BlockType.ACME_CERTIFICATES,
                                                      Rock.SystemGuid.FieldType.PAGE_REFERENCE,
                                                      "Detail Page", "DetailPage", string.Empty, string.Empty,
                                                      0, string.Empty, SystemGuid.Attribute.DETAIL_PAGE);

            RockMigrationHelper.AddPage(SystemGuid.Page.ROCK_INSTALLED_PLUGINS,
                                        "D65F783D-87A9-4CC9-8110-E83466A0EADB",
                                        "Acme Certificates",
                                        string.Empty,
                                        SystemGuid.Page.ACME_CERTIFICATES,
                                        "fa fa-certificate");

            RockMigrationHelper.AddPage(SystemGuid.Page.ACME_CERTIFICATES,
                                        "D65F783D-87A9-4CC9-8110-E83466A0EADB",
                                        "Acme Certificate Detail",
                                        string.Empty,
                                        SystemGuid.Page.ACME_CERTIFICATE_DETAIL,
                                        "fa fa-certificate");

            RockMigrationHelper.AddPage(SystemGuid.Page.ACME_CERTIFICATES,
                                        "D65F783D-87A9-4CC9-8110-E83466A0EADB",
                                        "Acme Challenge",
                                        string.Empty,
                                        SystemGuid.Page.ACME_CERTIFICATE_CHALLENGE);
            RockMigrationHelper.AddPageRoute(SystemGuid.Page.ACME_CERTIFICATE_CHALLENGE, ".well-known/acme-challenge/{Token}");

            RockMigrationHelper.AddBlock(SystemGuid.Page.ACME_CERTIFICATES,
                                         string.Empty, SystemGuid.BlockType.ACME_CONFIG,
                                         "Acme Config", "Main", string.Empty, string.Empty, 0, SystemGuid.Block.ACME_CONFIG);

            RockMigrationHelper.AddBlock(SystemGuid.Page.ACME_CERTIFICATES,
                                         string.Empty, SystemGuid.BlockType.ACME_CERTIFICATES,
                                         "Acme Certificates", "Main", string.Empty, string.Empty, 1, SystemGuid.Block.ACME_CERTIFICATES);

            RockMigrationHelper.AddBlock(SystemGuid.Page.ACME_CERTIFICATE_DETAIL,
                                         string.Empty, SystemGuid.BlockType.ACME_CERTIFICATE_DETAIL,
                                         "Acme Certificate Details", "Main", string.Empty, string.Empty, 0, SystemGuid.Block.ACME_CERTIFICATE_DETAIL);

            RockMigrationHelper.AddBlock(SystemGuid.Page.ACME_CERTIFICATE_CHALLENGE,
                                         string.Empty, SystemGuid.BlockType.ACME_CHALLENGE,
                                         "Acme Challenge", "Main", string.Empty, string.Empty, 0, SystemGuid.Block.ACME_CHALLENGE);

            RockMigrationHelper.AddBlockAttributeValue(SystemGuid.Block.ACME_CERTIFICATES,
                                                       SystemGuid.Attribute.DETAIL_PAGE, SystemGuid.Page.ACME_CERTIFICATE_DETAIL);
        }