Пример #1
0
        /// <summary>
        /// The commands to run to migrate plugin to the specific version
        /// </summary>
        public override void Up()
        {
            RockMigrationHelper.UpdateFieldType("Label", "Labels that can be printed during check-in", "Rock", "Rock.Field.Types.LabelFieldType", Rock.SystemGuid.FieldType.LABEL);

            Sql($@"
    DECLARE @BinaryFileFieldTypeId int = ( SELECT TOP 1 [Id] FROM [FieldType] WHERE [Guid] = '{Rock.SystemGuid.FieldType.BINARY_FILE}' )
    DECLARE @LabelFieldTypeId int = ( SELECT TOP 1 [Id] FROM [FieldType] WHERE [Guid] = '{Rock.SystemGuid.FieldType.LABEL}' )
    
    UPDATE A SET [FieldTypeId] = @LabelFieldTypeId
    FROM [Attribute] A 
	INNER JOIN [AttributeQualifier] Q 
		ON Q.[AttributeId] = A.[Id]
		AND Q.[Key] = 'binaryFileType'
		AND Q.[Value] = '{Rock.SystemGuid.BinaryFiletype.CHECKIN_LABEL}'
	WHERE A.[FieldTypeId] = @BinaryFileFieldTypeId
");
        }
Пример #2
0
        /// <summary>
        /// JE - Mobile Template Update
        /// </summary>
        private void MobileTemplateUpdate()
        {
            string STANDARD_ICON_SVG = "PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+Cjxzdmcgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDY0MCAyNDAiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSIgeG1sbnM6c2VyaWY9Imh0dHA6Ly93d3cuc2VyaWYuY29tLyIgc3R5bGU9ImZpbGwtcnVsZTpldmVub2RkO2NsaXAtcnVsZTpldmVub2RkO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoyOyI+CiAgICA8ZyB0cmFuc2Zvcm09Im1hdHJpeCgxLjEwMTU1LDAsMCwxLC0zMC44NDM0LC0zMSkiPgogICAgICAgIDxyZWN0IHg9IjI4IiB5PSIzMSIgd2lkdGg9IjU4MSIgaGVpZ2h0PSIxOCIgc3R5bGU9ImZpbGw6cmdiKDIzMSwyMzEsMjMxKTsiLz4KICAgIDwvZz4KICAgIDxnIHRyYW5zZm9ybT0ibWF0cml4KDAuOTY1NTc3LDAsMCwxLC0yNy4wMzYxLDEyKSI+CiAgICAgICAgPHJlY3QgeD0iMjgiIHk9IjMxIiB3aWR0aD0iNTgxIiBoZWlnaHQ9IjE4IiBzdHlsZT0iZmlsbDpyZ2IoMjMxLDIzMSwyMzEpOyIvPgogICAgPC9nPgogICAgPGcgdHJhbnNmb3JtPSJtYXRyaXgoMS4wMjA2NSwwLDAsMSwtMjguNTc4Myw1NSkiPgogICAgICAgIDxyZWN0IHg9IjI4IiB5PSIzMSIgd2lkdGg9IjU4MSIgaGVpZ2h0PSIxOCIgc3R5bGU9ImZpbGw6cmdiKDIzMSwyMzEsMjMxKTsiLz4KICAgIDwvZz4KICAgIDxnIHRyYW5zZm9ybT0ibWF0cml4KDAuOTg0NTA5LDAsMCwxLC0yNy41NjYzLDk4KSI+CiAgICAgICAgPHJlY3QgeD0iMjgiIHk9IjMxIiB3aWR0aD0iNTgxIiBoZWlnaHQ9IjE4IiBzdHlsZT0iZmlsbDpyZ2IoMjMxLDIzMSwyMzEpOyIvPgogICAgPC9nPgogICAgPGcgdHJhbnNmb3JtPSJtYXRyaXgoMS4wNTY4LDAsMCwxLC0yOS41OTA0LDE0MSkiPgogICAgICAgIDxyZWN0IHg9IjI4IiB5PSIzMSIgd2lkdGg9IjU4MSIgaGVpZ2h0PSIxOCIgc3R5bGU9ImZpbGw6cmdiKDIzMSwyMzEsMjMxKTsiLz4KICAgIDwvZz4KICAgIDxnIHRyYW5zZm9ybT0ibWF0cml4KDEuMDc5MTcsMCwwLDEsLTMwLjIxNjksMTg0KSI+CiAgICAgICAgPHJlY3QgeD0iMjgiIHk9IjMxIiB3aWR0aD0iNTgxIiBoZWlnaHQ9IjE4IiBzdHlsZT0iZmlsbDpyZ2IoMjMxLDIzMSwyMzEpOyIvPgogICAgPC9nPgo8L3N2Zz4K";

            RockMigrationHelper.AddOrUpdateTemplateBlockTemplate(
                "674CF1E3-561C-430D-B4A8-39957AC1BCF1",
                Rock.SystemGuid.DefinedValue.BLOCK_TEMPLATE_MOBILE_GROUP_MEMBER_LIST,
                "Default",
                @"<StackLayout>
    {% assign groupMemberCount = Members | Size %}
    
    <Label StyleClass=""h1"" Text=""{{ Title | Escape }}"" />
    <Label StyleClass=""text"" Text=""{{ 'member' | ToQuantity:groupMemberCount }}"" />

    {% if Members != empty %}
        <StackLayout Spacing=""0"" Margin=""0,20,0,0"">
            <Rock:Divider />
            
            {% for member in Members %}
				<StackLayout Orientation=""Horizontal"" Padding=""0,16"" Spacing=""16"">
					<StackLayout.GestureRecognizers>
						<TapGestureRecognizer Command=""{Binding PushPage}"" CommandParameter=""{{ DetailPage }}?GroupMemberGuid={{ member.Guid }}"" />
					</StackLayout.GestureRecognizers>
					
					
					<Rock:Image Source=""{{ member.PhotoUrl | Append:'&width=400' | Escape }}"" HeightRequest=""64"" WidthRequest=""64"" Aspect=""AspectFill"" BackgroundColor=""#ccc"">
						<Rock:RoundedTransformation CornerRadius=""8"" />
					</Rock:Image>
					
		
		            <StackLayout Spacing=""0"" HorizontalOptions=""FillAndExpand"" VerticalOptions=""Center"">
						<Label StyleClass=""h4"" Text=""{{ member.FullName | Escape }}"" />
						<Label StyleClass=""text, o-60"" Text=""{{ member.GroupRole | Escape }}"" />
					</StackLayout>
					<Rock:Icon IconClass=""chevron-right"" Margin=""0,0,20,0"" VerticalOptions=""Center"" />
				</StackLayout>
				<Rock:Divider />	
			{% endfor %}
        </StackLayout>
    {% endif %}
</StackLayout>",
                STANDARD_ICON_SVG,
                "standard-template.svg",
                "image/svg+xml");
        }
Пример #3
0
        public override void Down()
        {
            RockMigrationHelper.DeleteBlock(SystemGuid.Block.REMOTE_DEPOSIT_EXPORT);
            RockMigrationHelper.DeletePage(SystemGuid.Page.REMOTE_DEPOSIT_EXPORT);

            RockMigrationHelper.DeleteBlock(SystemGuid.Block.FILE_FORMAT_DETAIL);
            RockMigrationHelper.DeletePage(SystemGuid.Page.FILE_TYPE_DETAIL);

            RockMigrationHelper.DeleteBlock(SystemGuid.Block.FILE_FORMAT_LIST);
            RockMigrationHelper.DeletePage(SystemGuid.Page.FILE_TYPES);

            RockMigrationHelper.DeleteBlock(SystemGuid.Block.PAGE_MENU);
            RockMigrationHelper.DeletePage(SystemGuid.Page.IMAGE_CASH_LETTER);

            RockMigrationHelper.DeleteBlockType(SystemGuid.BlockType.REMOTE_DEPOSIT_EXPORT);
            RockMigrationHelper.DeleteBlockType(SystemGuid.BlockType.FILE_FORMAT_DETAIL);
            RockMigrationHelper.DeleteBlockType(SystemGuid.BlockType.FILE_FORMAT_LIST);
        }
Пример #4
0
        /// <summary>
        /// Operations to be performed during the downgrade process.
        /// </summary>
        public override void Down()
        {
            //Delete Attributes
            RockMigrationHelper.DeleteAttribute("990275DB-611B-4D2E-94EA-3FFA1186A5E1");

            RockMigrationHelper.DeleteAttribute("3A10ECFB-8CAB-4CCA-8B29-298756CD3251");
            RockMigrationHelper.DeleteAttribute("FA4341B4-28C7-409E-A101-548BB5759BE6");
            RockMigrationHelper.DeleteAttribute("3EFF4FEF-EE4C-40E2-8DBD-80F3276852DA");
            RockMigrationHelper.DeleteAttribute("86670F7D-07BA-4ECE-9BB9-9D94B5FB5F26");

            RockMigrationHelper.DeleteAttribute("4A2E1539-4ECC-40B9-9EBD-C0C84EC8DA36");
            RockMigrationHelper.DeleteAttribute("2512DAC6-BBC4-4D0E-A01D-E92F94C534BD");
            RockMigrationHelper.DeleteAttribute("7F0A1794-0150-413B-9AE1-A6B0D6373DA6");
            RockMigrationHelper.DeleteAttribute("EDE5E199-37BE-424F-A788-5CDCC064157C");

            //Delete Category
            RockMigrationHelper.DeleteCategory("0B187C81-2106-4875-82B6-FBF1277AE23B");
        }
Пример #5
0
        /// <summary>
        /// Operations to be performed during the upgrade process.
        /// </summary>
        public override void Up()
        {
            Sql(String.Format(@"
    UPDATE [Group]
    SET [Name] = 'RSR - Connection Administration',
    [Description] = 'Group of individuals who can administrate the various parts of the connection functionality.'
    WHERE [Guid] = '{0}'
", Rock.SystemGuid.Group.GROUP_CONNECTION_ADMINISTRATORS));

            RockMigrationHelper.RenameBlockType("~/Blocks/Involvement/MyConnectionOpportunities.ascx", "~/Blocks/Connection/MyConnectionOpportunities.ascx", "Connection");
            RockMigrationHelper.RenameBlockType("~/Blocks/Involvement/ConnectionRequestDetail.ascx", "~/Blocks/Connection/ConnectionRequestDetail.ascx", "Connection");
            RockMigrationHelper.RenameBlockType("~/Blocks/Involvement/ConnectionTypeList.ascx", "~/Blocks/Connection/ConnectionTypeList.ascx", "Connection");
            RockMigrationHelper.RenameBlockType("~/Blocks/Involvement/ConnectionOpportunityList.ascx", "~/Blocks/Connection/ConnectionOpportunityList.ascx", "Connection");
            RockMigrationHelper.RenameBlockType("~/Blocks/Involvement/ConnectionTypeDetail.ascx", "~/Blocks/Connection/ConnectionTypeDetail.ascx", "Connection");
            RockMigrationHelper.RenameBlockType("~/Blocks/Involvement/ConnectionOpportunityDetail.ascx", "~/Blocks/Connection/ConnectionOpportunityDetail.ascx", "Connection");
            RockMigrationHelper.RenameBlockType("~/Blocks/Involvement/ExternalOpportunitySearch.ascx", "~/Blocks/Connection/ExternalOpportunitySearch.ascx", "Connection");
            RockMigrationHelper.RenameBlockType("~/Blocks/Involvement/ExternalConnectionOpportunityDetail.ascx", "~/Blocks/Connection/ExternalConnectionOpportunityDetail.ascx", "Connection");
        }
        /// <summary>
        /// Operations to be performed during the downgrade process.
        /// </summary>
        public override void Down()
        {
            DropIndex("dbo.FinancialTransaction", new[] { "CheckMicrHash" });
            DropColumn("dbo.FinancialTransaction", "CheckMicrHash");

            // Attrib for BlockType: Group Member Link:Success Page
            RockMigrationHelper.DeleteAttribute("7CC07346-E82F-42C9-8DDA-5AB22D58B1F7");
            // Attrib for BlockType: Group Member Link:Success Message
            RockMigrationHelper.DeleteAttribute("2C5C3A4A-DD79-47CD-9E30-0531266C7F75");
            // Attrib for BlockType: Group Member Link:Group Member Status
            RockMigrationHelper.DeleteAttribute("DE9E9CA9-8A01-46AB-8A16-CA6967C88626");
            // Attrib for BlockType: Group Member Link:Group
            RockMigrationHelper.DeleteAttribute("24E0AF57-2C84-4625-98E9-BA2241C41E14");
            // Attrib for BlockType: Group Member Link:Error Message
            RockMigrationHelper.DeleteAttribute("5B2DF4FE-4231-43DB-B1E4-CB88F4E81219");

            RockMigrationHelper.DeleteBlockType("9AAA967C-D0B0-4E42-89DE-2AE6AAFC17EF");   // Group Member Link
        }
Пример #7
0
        /// <summary>
        /// Operations to be performed during the downgrade process.
        /// </summary>
        public override void Down()
        {
            // Attrib for BlockType: History Log:Entity Type
            RockMigrationHelper.DeleteAttribute("8FB690EC-5299-46C5-8695-AAD23168E6E1");
            // Attrib for BlockType: Batch Detail:Audit Page
            RockMigrationHelper.DeleteAttribute("66E7C23A-797D-4945-931F-DC7671C79AC1");
            // Remove Block: History Log, from Page: Audit Log, Site: Rock RMS
            RockMigrationHelper.DeleteBlock("39F5EA5A-6F78-4A4F-ABFE-719DD75B445A");
            RockMigrationHelper.DeleteBlockType("C6C2DF41-A50D-4975-B21C-4EFD6FF3E8D0"); // History Log
            RockMigrationHelper.DeletePage("CBE0C5ED-744E-4392-A9D4-0DC57AF11D33");      //  Page: Audit Log, Layout: Full Width, Site: Rock RMS

            // Delete PageContext for Page:Audit Log, Entity: Rock.Model.FinancialBatch, Parameter: BatchId
            RockMigrationHelper.DeletePageContext("307639F5-824A-453C-8650-B393DEC506F1");


            RockMigrationHelper.DeleteCategory("477EE3BE-C68F-48BD-B218-FAFC99AF56B3");
            RockMigrationHelper.DeleteCategory("AF6A8CFF-F24F-4AA8-B126-94B6903961C0");
            RockMigrationHelper.DeleteCategory("E41FC407-B60E-4B85-954D-D27F0762114B");
        }
 /// <summary>
 /// JM: Efs the clean up for file69 migration rollups for v8 7 6.
 /// </summary>
 private void EFCleanUpForFile69_MigrationRollupsForV8_7_6()
 {
     // Attrib for BlockType: Attendance Analytics:Filter Column Count
     RockMigrationHelper.UpdateBlockTypeAttribute("3CD3411C-C076-4344-A9D5-8F3B4F01E31D", "A75DFC58-7A1B-4799-BF31-451B2BBE38FF", "Filter Column Count", "FilterColumnCount", "", @"The number of check boxes for each row.", 14, @"1", "244327E8-01EE-4860-9F12-4CF6144DFD61");
     // Attrib for BlockType: Attendance Analytics:Filter Column Direction
     RockMigrationHelper.UpdateBlockTypeAttribute("3CD3411C-C076-4344-A9D5-8F3B4F01E31D", "7525C4CB-EE6B-41D4-9B64-A08048D5A5C0", "Filter Column Direction", "FilterColumnDirection", "", @"Choose the direction for the checkboxes for filter selections.", 13, @"vertical", "0807FC61-26CE-41A1-9C54-8C4FA0DB6B5C");
     // Attrib for BlockType: Giving Analytics:Filter Column Count
     RockMigrationHelper.UpdateBlockTypeAttribute("48E4225F-8948-4FB0-8F00-1B43D3D9B3C3", "A75DFC58-7A1B-4799-BF31-451B2BBE38FF", "Filter Column Count", "FilterColumnCount", "", @"The number of check boxes for each row.", 4, @"1", "43B7025A-778A-4107-8243-D91A2FA74AA4");
     // Attrib for BlockType: Giving Analytics:Filter Column Direction
     RockMigrationHelper.UpdateBlockTypeAttribute("48E4225F-8948-4FB0-8F00-1B43D3D9B3C3", "7525C4CB-EE6B-41D4-9B64-A08048D5A5C0", "Filter Column Direction", "FilterColumnDirection", "", @"Choose the direction for the checkboxes for filter selections.", 3, @"vertical", "11C6953E-E176-40A2-9BF7-979344BD8FD8");
     // Attrib Value for Block:Attendance Reporting, Attribute:Filter Column Count Page: Attendance Analytics, Site: Rock RMS
     RockMigrationHelper.AddBlockAttributeValue("3EF007F1-6B46-4BCD-A435-345C03EBCA17", "244327E8-01EE-4860-9F12-4CF6144DFD61", @"3");
     // Attrib Value for Block:Attendance Reporting, Attribute:Filter Column Direction Page: Attendance Analytics, Site: Rock RMS
     RockMigrationHelper.AddBlockAttributeValue("3EF007F1-6B46-4BCD-A435-345C03EBCA17", "0807FC61-26CE-41A1-9C54-8C4FA0DB6B5C", @"horizontal");
     // Attrib Value for Block:Giving Analysis, Attribute:Filter Column Count Page: Giving Analytics, Site: Rock RMS
     RockMigrationHelper.AddBlockAttributeValue("784C58EF-B1B8-4237-BF12-E04DE8271A5A", "43B7025A-778A-4107-8243-D91A2FA74AA4", @"3");
     // Attrib Value for Block:Giving Analysis, Attribute:Filter Column Direction Page: Giving Analytics, Site: Rock RMS
     RockMigrationHelper.AddBlockAttributeValue("784C58EF-B1B8-4237-BF12-E04DE8271A5A", "11C6953E-E176-40A2-9BF7-979344BD8FD8", @"horizontal");
 }
        /// <summary>
        /// Operations to be performed during the downgrade process.
        /// </summary>
        public override void Down()
        {
            Sql("DELETE [ServiceJob] WHERE [Guid] = '88674EB2-3ABC-4C1B-94B1-6E2E1EDF9BB9'");

            RockMigrationHelper.DeleteAttribute("069A5B85-75B5-4F5F-86A7-9602B1760FE5");
            RockMigrationHelper.DeleteAttribute("2A9A7991-D1F5-43CB-9566-552F6D2A6D95");
            RockMigrationHelper.DeleteAttribute("F48F7422-E128-48F9-B429-027C573119FB");

            RockMigrationHelper.DeleteSystemEmail("ED567FDE-A3B4-4827-899D-C2740DF3E5DA");

            // Remove Block: Categories, from Page: System Email Categories, Site: Rock RMS
            RockMigrationHelper.DeleteBlock("550D7229-2788-4C0E-BFE6-4AAE95D28267");
            RockMigrationHelper.DeletePage("B55323CD-F494-43E7-97BF-4E13DAB58E0B");   //  Page: System Email Categories, Layout: Full Width, Site: Rock RMS

            DropIndex("dbo.AttributeQualifier", "IX_AttributeIdKey");
            AlterColumn("dbo.Attribute", "Key", c => c.String(nullable: false, maxLength: 50));
            AlterColumn("dbo.AttributeQualifier", "Key", c => c.String(nullable: false, maxLength: 50));
            CreateIndex("dbo.AttributeQualifier", new[] { "AttributeId", "Key" }, unique: true, name: "IX_AttributeIdKey");
        }
Пример #10
0
        /// <summary>
        /// The commands to run to migrate plugin to the specific version
        /// </summary>
        public override void Up()
        {
            // SK: Update group view lava template to display schedule when exist (ISSUE #3188)
            // Update the default template
            Sql(@"		  
		  UPDATE 
	[GroupType]
SET 
	[GroupViewLavaTemplate] = REPLACE([GroupViewLavaTemplate],'{{ Group.Schedule.ToString()','{{ Group.Schedule.FriendlyScheduleText')
WHERE 
	[GroupViewLavaTemplate] Like '%{{ Group.Schedule.ToString()%'
");

            // Update the system setting
            Sql(@"UPDATE 
	[Attribute]
SET 
	[DefaultValue] = REPLACE([DefaultValue],'{{ Group.Schedule.ToString()','{{ Group.Schedule.FriendlyScheduleText')
WHERE 
	[Key]='core_templates_GroupViewTemplate'"    );

            // SK: Added Other to Currency Type Defined Type
            RockMigrationHelper.UpdateDefinedValue(Rock.SystemGuid.DefinedType.FINANCIAL_CURRENCY_TYPE, "Other", "The currency type is other.", SystemGuid.DefinedValue.CURRENCY_TYPE_OTHER, true);

            // NA: Enable AllowGroupSync for Communication List type groups (Fixes #3223).
            Sql(string.Format("UPDATE [GroupType] SET [AllowGroupSync] = 1 WHERE [AllowGroupSync] = 0 AND [Guid] = '{0}'", Rock.SystemGuid.GroupType.GROUPTYPE_COMMUNICATIONLIST));

            // NA: Make Personal Device Platform Defined Values IsSystem=true
            // Fix Personal Device Platform Defined Values to IsSystem=true
            Sql(string.Format("UPDATE [DefinedValue] SET [IsSystem] = 1 WHERE [IsSystem] = 0 AND [Guid] = '{0}'", Rock.SystemGuid.DefinedValue.PERSONAL_DEVICE_PLATFORM_ANDROID));
            Sql(string.Format("UPDATE [DefinedValue] SET [IsSystem] = 1 WHERE [IsSystem] = 0 AND [Guid] = '{0}'", Rock.SystemGuid.DefinedValue.PERSONAL_DEVICE_PLATFORM_IOS));

            // NA: Fix FrontPorch Device Platform Defined Values IsSystem=true
            // Fix FrontPorch Device Platform Defined Values IsSystem=true
            // NOTE: These do not have a well-known GUIDs so we will target them via their value and description.
            Sql(string.Format("UPDATE [DefinedValue] SET [IsSystem] = 1 WHERE [IsSystem] = 0 AND [DefinedTypeId] = ( SELECT [Id] FROM [DefinedType] WHERE [Guid] = '{0}' ) AND [Value] = 'Windows' AND [Description] = 'A Windows device'", Rock.SystemGuid.DefinedType.PERSONAL_DEVICE_PLATFORM));
            Sql(string.Format("UPDATE [DefinedValue] SET [IsSystem] = 1 WHERE [IsSystem] = 0 AND [DefinedTypeId] = ( SELECT [Id] FROM [DefinedType] WHERE [Guid] = '{0}' ) AND [Value] = 'Mac' AND [Description] = 'A Macintosh device'", Rock.SystemGuid.DefinedType.PERSONAL_DEVICE_PLATFORM));

            // Fix for metrics that might have been added without a Created,Modified, or LastRunDateTime
            Sql(@"UPDATE Metric
SET ModifiedDateTime = SysDateTime()
WHERE ModifiedDateTime IS NULL");
        }
        public override void Up()
        {
            // Page: OAuth Configuration
            RockMigrationHelper.AddPage("91CCB1C9-5F9F-44F5-8BE2-9EC3A3CFD46F", "D65F783D-87A9-4CC9-8110-E83466A0EADB", "OAuth Configuration", "", "C2B15044-B63C-43EB-BADC-9730890F4621", "fa fa-cloud");   // Site:Rock RMS
            RockMigrationHelper.UpdateBlockType("OAuth Configuration", "Configuration settings for OAuth.", "~/Plugins/org_secc/OAuth/Configuration.ascx", "SECC > Security", "34680C7A-84DF-413A-A474-3495C65372DA");
            RockMigrationHelper.AddBlock("C2B15044-B63C-43EB-BADC-9730890F4621", "", "34680C7A-84DF-413A-A474-3495C65372DA", "OAuth Configuration", "Main", "", "", 0, "3339F274-F61D-4CAA-AA8D-EC84E3290FC7");

            RockMigrationHelper.AddBlockTypeAttribute("34680C7A-84DF-413A-A474-3495C65372DA", "9C204CD0-1233-41C5-818A-C5DA439445AA", "OAuth Config Attribute Key", "OAuthConfigAttributeKey", "", "The OAuth Configuration Attribute\"s Key", 0, @"OAuthSettings", "3CE5DD1F-C69F-483D-B6BF-57FE0ED4C8AA");

            RockMigrationHelper.AddBlockTypeAttribute("34680C7A-84DF-413A-A474-3495C65372DA", "BB7AB90F-4DE9-4804-A852-F5593A35C8A0", "OAuth Site", "OAuthSite", "", "The OAuth Porta/Site", 0, @"1", "5ED9C998-F7D0-4057-93B6-F4B4FE0837DA");

            RockMigrationHelper.AddBlockAttributeValue("3339F274-F61D-4CAA-AA8D-EC84E3290FC7", "3CE5DD1F-C69F-483D-B6BF-57FE0ED4C8AA", @"OAuthSettings");   // OAuth Config Attribute Key

            // Get the site so we can get its ID
            Rock.Model.SiteService siteService = new Rock.Model.SiteService(new Rock.Data.RockContext());
            Rock.Model.Site        site        = siteService.Get("92A541DB-F88C-4EEA-B015-B67497C5B2A0".AsGuid());

            RockMigrationHelper.AddBlockAttributeValue("3339F274-F61D-4CAA-AA8D-EC84E3290FC7", "5ED9C998-F7D0-4057-93B6-F4B4FE0837DA", site.Id.ToString());   // OAuth Site
        }
        /// <summary>
        /// Operations to be performed during the upgrade process.
        /// </summary>
        public override void Up()
        {
            AlterColumn("dbo.FinancialScheduledTransaction", "LastStatusUpdateDateTime", c => c.DateTime());

            // Add ContextAware attribute for HTML Content Block
            RockMigrationHelper.UpdateBlockTypeAttribute("19B61D65-37E3-459F-A44F-DEF0089118A3", "3549BAB6-FE1B-4333-AFC4-C5ACA01BB8EB", "Entity Type", "ContextEntityType", "", "The type of entity that will provide context for this block", 0, "", "6783D47D-92F9-4F48-93C0-16111D675A0F");

            // Remove prehtml headers from blocks on person detail pages now that grid blocks have a nice header.
            Sql(@"
    UPDATE [Block] SET [PreHtml] = ''
    WHERE [Guid] IN (
        'B33DF8C4-29B2-4DC5-B182-61FC255B01C0',
        '9382B285-3EF6-47F7-94BB-A47C498196A3',
        '1CBE10C7-5E64-4385-BEE3-81DCA43DC47F',
        '68D34EC2-0A10-4344-89E3-E6DF99951FDB',
        'F98649D7-E522-46CB-8F67-01DB7F59E3AA'
    )
");
        }
        /// <summary>
        /// Operations to be performed during the upgrade process.
        /// </summary>
        public override void Up()
        {
            AddColumn("dbo.WorkflowType", "IconCssClass", c => c.String());
            Sql(@"UPDATE [WorkflowType] SET [IconCssClass] = 'fa fa-list-ol'");

            // Grant Staff and Staff-Like roles edit access to the Known Relationships group type
            RockMigrationHelper.DeleteSecurityAuthForGroupType("E0C5A0E2-B7B3-4EF4-820D-BBF7F9A374EF");
            RockMigrationHelper.AddSecurityAuthForGroupType("E0C5A0E2-B7B3-4EF4-820D-BBF7F9A374EF", 0, "Edit", true, "2C112948-FF4C-46E7-981A-0257681EADF4", Model.SpecialRole.None, "C463D46C-DE81-4B78-828F-D219198DCB94");
            RockMigrationHelper.AddSecurityAuthForGroupType("E0C5A0E2-B7B3-4EF4-820D-BBF7F9A374EF", 1, "Edit", true, "300BA2C8-49A3-44BA-A82A-82E3FD8C3745", Model.SpecialRole.None, "2F714BE7-FC9C-4DE6-9F3B-C5616F77ED71");

            Sql(@"
    IF OBJECT_ID('[dbo].[ufnUtility_GetPersonIdFromPersonAlias]', 'FN') IS NOT NULL
      DROP FUNCTION [dbo].[ufnUtility_GetPersonIdFromPersonAlias]
");
            Sql(@"
    /*
    <doc>
	    <summary>
            This function returns the person id for the person alias given.
	    </summary>

	    <returns>
		    Int of the person id
	    </returns>
	    <remarks>
		
	    </remarks>
	    <code>
		    SELECT [dbo].[ufnUtility_GetPersonIdFromPersonAlias](1)
	    </code>
    </doc>
    */

    CREATE FUNCTION [dbo].[ufnUtility_GetPersonIdFromPersonAlias](@PersonAlias int) 

    RETURNS int AS

    BEGIN

	    RETURN (SELECT [PersonId] FROM PersonAlias WHERE [Id] = @PersonAlias)
    END
");
        }
        /// <summary>
        /// Operations to be performed during the downgrade process.
        /// </summary>
        public override void Down()
        {
            RockMigrationHelper.DeleteAttribute("3B234A62-B87D-47CD-A33F-32CC6C840A02");
            RockMigrationHelper.DeleteAttribute("B6EF4138-C488-4043-A628-D35F91503843");
            RockMigrationHelper.DeleteAttribute("A4E00B14-8CFF-4719-A43F-462851C7BBEF");
            RockMigrationHelper.DeleteAttribute("DA46DC37-5398-4520-B6A5-6E57C9C46F7A");
            RockMigrationHelper.DeleteAttribute("7D785A5D-53CA-4FEC-BC88-DFBD7439B547");
            RockMigrationHelper.DeleteAttribute("6FF59F53-28EA-4BFE-AFE1-A459CC588495");

            RockMigrationHelper.DeleteDefinedType("407A3A73-A3EF-4970-B856-2A33F62AC72E");
            RockMigrationHelper.DeleteDefinedType("D7979EA1-44E9-46E2-BF37-DDAF7F741378");

            DropForeignKey("dbo.WorkflowActivity", "AssignedPersonAliasId", "dbo.PersonAlias");
            DropForeignKey("dbo.WorkflowActivity", "AssignedGroupId", "dbo.Group");
            DropIndex("dbo.WorkflowActivity", new[] { "AssignedGroupId" });
            DropIndex("dbo.WorkflowActivity", new[] { "AssignedPersonAliasId" });
            DropColumn("dbo.WorkflowActivity", "AssignedGroupId");
            DropColumn("dbo.WorkflowActivity", "AssignedPersonAliasId");
        }
Пример #15
0
 /// <summary>
 /// Script generated "Up" migrations for pages, blocks, and block attributes.
 /// </summary>
 private void CodeGenMigrationsUp()
 {
     RockMigrationHelper.UpdateMobileBlockType("Structured Content View", "Displays a structured content channel item for the user to view and fill out.", "Rock.Blocks.Types.Mobile.Cms.StructuredContentView", "Mobile > Cms", "EA048472-D4BD-4966-83B7-00695D458685");
     RockMigrationHelper.UpdateMobileBlockType("Calendar Event Item Occurrence View", "Displays a particular calendar event item occurrence.", "Rock.Blocks.Types.Mobile.Events.CalendarEventItemOccurrenceView", "Mobile > Events", "F6131B1A-3464-4E8A-BB14-C558FF2D63EC");
     // Attrib for BlockType: Calendar Event Item Occurrence View:Registration Url
     RockMigrationHelper.AddOrUpdateBlockTypeAttribute("F6131B1A-3464-4E8A-BB14-C558FF2D63EC", "9C204CD0-1233-41C5-818A-C5DA439445AA", "Registration Url", "RegistrationUrl", "Registration Url", @"The base URL to use when linking to the registration page.", 0, @"", "CD802FC7-448E-4DAF-854F-DFBC3F812C83");
     // Attrib for BlockType: Calendar Event Item Occurrence View:Template
     RockMigrationHelper.AddOrUpdateBlockTypeAttribute("F6131B1A-3464-4E8A-BB14-C558FF2D63EC", "CCD73456-C83B-4D6E-BD69-8133D2EB996D", "Template", "Template", "Template", @"The template to use when rendering the event.", 1, @"6593D4EB-2B7A-4C24-8D30-A02991D26BC0", "88FB2AD3-2120-4E82-A11A-61DB448B77C2");
     // Attrib for BlockType: Group Edit:Show Header
     RockMigrationHelper.AddOrUpdateBlockTypeAttribute("FEC66374-E38F-4651-BAA6-AC658409D9BD", "1EDAFDED-DFE6-4334-B019-6EECBA89E05A", "Show Header", "EnableHeader", "Show Header", @"If enabled, a 'Group Details' header will be displayed.", 0, @"True", "E5000EFA-D3A4-48C3-AB7D-7161AFA18FC7");
     // Attrib for BlockType: Group Member Edit:Show Header
     RockMigrationHelper.AddOrUpdateBlockTypeAttribute("514B533A-8970-4628-A4C8-35388CD869BC", "1EDAFDED-DFE6-4334-B019-6EECBA89E05A", "Show Header", "EnableHeader", "Show Header", @"If enabled, a 'Group Member Edit' header will be displayed.", 0, @"True", "096EB064-699C-492E-A4A6-8DB5B4F288B1");
     // Attrib for BlockType: Prayer Request Details:Show Header
     RockMigrationHelper.AddOrUpdateBlockTypeAttribute("EBB91B46-292E-4784-9E37-38781C714008", "1EDAFDED-DFE6-4334-B019-6EECBA89E05A", "Show Header", "EnableHeader", "Show Header", @"If enabled, a 'Add/Edit Prayer Request' header will be displayed.", 2, @"True", "D847C303-4FF4-4A84-A1EB-4734DCA3F886");
     // Attrib for BlockType: Service Metrics Entry:Insert 0 for Blank Items
     RockMigrationHelper.AddOrUpdateBlockTypeAttribute("535E1879-CD4C-432B-9312-B27B3A668D88", "1EDAFDED-DFE6-4334-B019-6EECBA89E05A", "Insert 0 for Blank Items", "DefaultToZero", "Insert 0 for Blank Items", @"If enabled, a zero will be added to any metrics that are left empty when entering data.", 5, @"false", "2E147365-0BB3-4B1B-B18F-12CB262F8D24");
     // Attrib for BlockType: Service Metrics Entry:Metric Date Determined By
     RockMigrationHelper.AddOrUpdateBlockTypeAttribute("535E1879-CD4C-432B-9312-B27B3A668D88", "7525C4CB-EE6B-41D4-9B64-A08048D5A5C0", "Metric Date Determined By", "MetricDateDeterminedBy", "Metric Date Determined By", @"This setting determines what date to use when entering the metric. 'Sunday Date' would use the selected Sunday date. 'Day from Schedule' will use the first day configured from the selected schedule.", 6, @"0", "62BA1A48-EEE3-4569-8F56-717087CB1B88");
 }
Пример #16
0
        /// <summary>
        /// Operations to be performed during the upgrade process.
        /// </summary>
        public override void Up()
        {
            // Rename blocktypes
            RockMigrationHelper.RenameBlockType("~/Blocks/Event/CalendarItemDetail.ascx", "~/Blocks/Event/EventItemDetail.ascx", null, "Calendar Event Item Detail", "Displays the details of the given calendar event item.");
            RockMigrationHelper.RenameBlockType("~/Blocks/Event/CalendarItemList.ascx", "~/Blocks/Event/EventItemList.ascx", null, "Calendar Event Item List", "Lists all the event items in the given calendar.");
            RockMigrationHelper.RenameBlockType("~/Blocks/Event/CalendarItemOccurrenceDetail.ascx", "~/Blocks/Event/EventItemOccurrenceDetail.ascx", null, "Calendar Event Item Occurrence Detail", "Displays the details of a given calendar event item occurrence.");
            RockMigrationHelper.RenameBlockType("~/Blocks/Event/CalendarItemLava.ascx", "~/Blocks/Event/EventItemOccurrenceLava.ascx", null, "Calendar Event Item Occurrence Lava", "Renders a particular calendar event item occurrence using Lava.");
            RockMigrationHelper.RenameBlockType("~/Blocks/Event/CalendarItemOccurrenceList.ascx", "~/Blocks/Event/EventItemOccurrenceList.ascx", null, "Calendar Event Item Occurrence List", "Displays the occurrence details for a given calendar event item.");

            // Attrib for BlockType: Group Detail:Event Item Occurrence Page
            RockMigrationHelper.AddBlockTypeAttribute("582BEEA1-5B27-444D-BC0A-F60CEB053981", "BD53F9C9-EBA9-4D3F-82EA-DE5DD34A8108", "Event Item Occurrence Page", "EventItemOccurrencePage", "", "The page to display event item occurrence details.", 8, @"", "6114CE99-C97F-4394-93F5-B34D479AB54E");
            // Attrib for BlockType: Group Detail:Content Item Page
            RockMigrationHelper.AddBlockTypeAttribute("582BEEA1-5B27-444D-BC0A-F60CEB053981", "BD53F9C9-EBA9-4D3F-82EA-DE5DD34A8108", "Content Item Page", "ContentItemPage", "", "The page to display registration details.", 9, @"", "45897721-F38C-4B4B-BCF9-A81D27DBB731");

            // Attrib Value for Block:GroupDetailRight, Attribute:Event Item Occurrence Page Page: Group Viewer, Site: Rock RMS
            RockMigrationHelper.AddBlockAttributeValue("88344FE3-737E-4741-A38D-D2D3A1653818", "6114CE99-C97F-4394-93F5-B34D479AB54E", @"4b0c44ee-28e3-4753-a95b-8c57cd958fd1");
            // Attrib Value for Block:GroupDetailRight, Attribute:Content Item Page Page: Group Viewer, Site: Rock RMS
            RockMigrationHelper.AddBlockAttributeValue("88344FE3-737E-4741-A38D-D2D3A1653818", "45897721-F38C-4B4B-BCF9-A81D27DBB731", @"d18e837c-9e65-4a38-8647-dff04a595d97");
        }
Пример #17
0
 /// <summary>
 /// Script generated "Down" migrations for pages, blocks, and block attributes.
 /// </summary>
 private void CodeGenMigrationsDown()
 {
     // Attrib for BlockType: Service Metrics Entry:Metric Date Determined By
     RockMigrationHelper.DeleteAttribute("62BA1A48-EEE3-4569-8F56-717087CB1B88");
     // Attrib for BlockType: Service Metrics Entry:Insert 0 for Blank Items
     RockMigrationHelper.DeleteAttribute("2E147365-0BB3-4B1B-B18F-12CB262F8D24");
     // Attrib for BlockType: Prayer Request Details:Show Header
     RockMigrationHelper.DeleteAttribute("D847C303-4FF4-4A84-A1EB-4734DCA3F886");
     // Attrib for BlockType: Group Member Edit:Show Header
     RockMigrationHelper.DeleteAttribute("096EB064-699C-492E-A4A6-8DB5B4F288B1");
     // Attrib for BlockType: Group Edit:Show Header
     RockMigrationHelper.DeleteAttribute("E5000EFA-D3A4-48C3-AB7D-7161AFA18FC7");
     // Attrib for BlockType: Calendar Event Item Occurrence View:Template
     RockMigrationHelper.DeleteAttribute("88FB2AD3-2120-4E82-A11A-61DB448B77C2");
     // Attrib for BlockType: Calendar Event Item Occurrence View:Registration Url
     RockMigrationHelper.DeleteAttribute("CD802FC7-448E-4DAF-854F-DFBC3F812C83");
     RockMigrationHelper.DeleteBlockType("F6131B1A-3464-4E8A-BB14-C558FF2D63EC"); // Calendar Event Item Occurrence View
     RockMigrationHelper.DeleteBlockType("EA048472-D4BD-4966-83B7-00695D458685"); // Structured Content View
 }
 /// <summary>
 /// Operations to be performed during the downgrade process.
 /// </summary>
 public override void Down()
 {
     // Attrib for BlockType: Workflow Entry:Block Title Template
     RockMigrationHelper.DeleteAttribute("6E7AC3BE-50D0-4219-BC6A-703821DC785F");
     // Attrib for BlockType: Workflow Entry:Block Title Icon CSS Class
     RockMigrationHelper.DeleteAttribute("A5A2897F-6448-45C2-BC9D-44F0E35E9192");
     // Attrib for BlockType: Attempt Detail:Achievement Type Page
     RockMigrationHelper.DeleteAttribute("4B405599-63FB-4704-8CB6-4A4CCA4F3EA5");
     // Attrib for BlockType: Attempt Detail:Streak Page
     RockMigrationHelper.DeleteAttribute("888C0B9A-CB02-4EF9-822E-F4BE36117395");
     // Attrib for BlockType: Achievement Attempt List:Detail Page
     RockMigrationHelper.DeleteAttribute("9C433A89-4D86-4E44-8B5E-03E4B00AEB9D");
     // Attrib for BlockType: Streak Detail:Achievement Attempts Page
     RockMigrationHelper.DeleteAttribute("B718AC3A-BD27-49EF-86CB-73DEF7A57E28");
     // Attrib for BlockType: Achievement Type List:Detail Page
     RockMigrationHelper.DeleteAttribute("6B9C55E0-8F30-4A17-BB6C-248208AD6CA6");
     // Attrib for BlockType: Streak Type Detail:Achievements Page
     RockMigrationHelper.DeleteAttribute("6D4C96F2-8FDC-4A6D-AC35-CCD6EF180694");
     // Remove Block: Attempt Detail, from Page: Attempt, Site: Rock RMS
     RockMigrationHelper.DeleteBlock("09AA3694-A9C7-485D-9F1E-A14ADCDA5161");
     // Remove Block: Attempt Detail, from Page: Attempt, Site: Rock RMS
     RockMigrationHelper.DeleteBlock("E9FAD400-E681-491D-9183-B719F78B5A49");
     // Remove Block: Streak Map Editor, from Page: Exclusion, Site: Rock RMS
     RockMigrationHelper.DeleteBlock("03F9510D-4E40-4ED4-8727-5AC0D62E4A78");
     // Remove Block: Achievement Attempt List, from Page: Achievement Attempts, Site: Rock RMS
     RockMigrationHelper.DeleteBlock("88079A6C-F2E8-4BC9-8C7F-DA7BBB5CEE70");
     // Remove Block: Achievement Attempt List, from Page: Achievement Type, Site: Rock RMS
     RockMigrationHelper.DeleteBlock("D3E699FC-2D8E-4698-90D6-CA351C886AEC");
     // Remove Block: Achievement Type Detail, from Page: Achievement Type, Site: Rock RMS
     RockMigrationHelper.DeleteBlock("169078DD-3255-4E84-A4C1-01C0440C1922");
     // Remove Block: Achievement Type List, from Page: Achievement Types, Site: Rock RMS
     RockMigrationHelper.DeleteBlock("B131FE34-E236-4044-B5D0-22AD3F71A471");
     RockMigrationHelper.DeleteBlockType("7E4663CD-2176-48D6-9CC2-2DBC9B880C23"); // Attempt Detail
     RockMigrationHelper.DeleteBlockType("9C1236AE-4FF0-480C-A7DF-0E5277CA75FB"); // Achievement Attempt List
     RockMigrationHelper.DeleteBlockType("4C4A46CD-1622-4642-A655-11585C5D3D31"); // Achievement Type Detail
     RockMigrationHelper.DeleteBlockType("D2F918CF-F63C-4643-A02A-FD3DE7C5CFFD"); // Achievement Type List
     RockMigrationHelper.DeletePage("D3BE86DE-7237-4FE9-9F5D-3C08BD7F9F97");      //  Page: Attempt, Layout: Full Width, Site: Rock RMS
     RockMigrationHelper.DeletePage("75CDD408-3E1B-4EF3-9A6F-4DC76B92A80F");      //  Page: Attempt, Layout: Full Width, Site: Rock RMS
     RockMigrationHelper.DeletePage("4AC3D8B7-1A8A-40F9-8F51-8E09B863BA40");      //  Page: Achievement Attempts, Layout: Full Width, Site: Rock RMS
     RockMigrationHelper.DeletePage("1C378B3C-9721-4A9B-857A-E3C5188C5BF8");      //  Page: Achievement Type, Layout: Full Width, Site: Rock RMS
     RockMigrationHelper.DeletePage("FCE0D006-F854-4107-9298-667563FA8D77");      //  Page: Achievement Types, Layout: Full Width, Site: Rock RMS
 }
        /// <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");
        }
        private void PagesBlocks_Down()
        {
            // Remove Block
            //  Name: Rock Security Settings, from Page: Security Settings, Site: Rock RMS
            //  from Page: Security Settings, Site: Rock RMS
            RockMigrationHelper.DeleteBlock("CC957809-5DA9-47A2-A55D-63F612478722");

            // Delete BlockType
            //   Name: Rock Security Settings
            //   Category: Security
            //   Path: ~/Blocks/Security/RockSecuritySettings.ascx
            //   EntityType: -
            RockMigrationHelper.DeleteBlockType("186490CD-4132-43BD-9BDF-DD04C6CD2432");

            // Delete Page
            //  Internal Name: Security Settings
            //  Site: Rock RMS
            //  Layout: Full Width
            RockMigrationHelper.DeletePage("0EF3DE1C-CB97-431E-A066-DDF8BD2D8283");
        }
Пример #21
0
        /// <summary>
        /// Operations to be performed during the downgrade process.
        /// </summary>
        public override void Down()
        {
            //
            // Note Types
            //
            RockMigrationHelper.DeleteDefinedValue("EBB52236-B29A-4E00-B176-15B351679F99");
            RockMigrationHelper.DeleteDefinedValue("68221BAB-13E6-43BB-9CEA-81507C5E4BAF");
            RockMigrationHelper.DeleteDefinedValue("643FC41E-AF5C-4FD1-8118-8DAAE254DAA5");
            RockMigrationHelper.DeleteDefinedValue("128C609C-1601-4247-8BA2-6CB60AB2562C");
            RockMigrationHelper.DeleteDefinedValue("A52CEA75-CD49-43F7-82FF-D781835EB73F");
            RockMigrationHelper.DeleteDefinedValue("EF911C5F-A922-4B21-B601-FD306538B0E2");
            RockMigrationHelper.DeleteDefinedValue("B6B4ACE8-6B7E-4A67-AFFF-2CBEFC6C1BBF");
            RockMigrationHelper.DeleteDefinedValue("9304261A-2369-4830-B5EE-77BE3C42E9BF");

            //
            // Delete security settings for content channels
            //

            Sql(@"DELETE FROM [Auth] WHERE [Guid] in ( 'E7874EFF-F507-44EB-9405-D8A6FBA2F21C', 'D154C7B3-EC9F-4C93-BBE9-CE943712939E', '9FB9F2DA-04FF-49C3-A0E3-C09C2E130F6E' )");
        }
Пример #22
0
 /// <summary>
 /// Codes the gen migrations down.
 /// </summary>
 private void CodeGenMigrationsDown()
 {
     // Attrib for BlockType: Workflow Type Detail:Export Workflows Page
     RockMigrationHelper.DeleteAttribute("4C602FC8-6E80-4E5A-90E4-7F54DFB5A98F");
     // Attrib for BlockType: SMS Conversations:Enable SMS Send
     RockMigrationHelper.DeleteAttribute("EE7FD478-70BE-44D7-A40F-02EF4AAFEB71");
     // Attrib for BlockType: SMS Conversations:Hide personal SMS numbers
     RockMigrationHelper.DeleteAttribute("09A89FDD-D3E4-43F3-95AE-D080F959FF0A");
     // Attrib for BlockType: SMS Conversations:Show only personal SMS number
     RockMigrationHelper.DeleteAttribute("CEBF759C-1B83-48BE-82E1-9E6B7C491333");
     // Attrib for BlockType: SMS Conversations:Allowed SMS Numbers
     RockMigrationHelper.DeleteAttribute("2F486671-07C6-448E-B647-A15C16C5B3A2");
     // Attrib for BlockType: SMS Conversations:Person Info Lava Template
     RockMigrationHelper.DeleteAttribute("A9AF883A-152E-44D8-AD5E-FD96CAF3A67E");
     // Attrib for BlockType: Person Profile:Child Attribute Category
     RockMigrationHelper.DeleteAttribute("62D60C22-EE97-4422-A9C7-155E157B0B2A");
     // Attrib for BlockType: Person Profile:Adult Attribute Category
     RockMigrationHelper.DeleteAttribute("0D34EADF-22B0-4DA7-91EC-1F29A217D943");
     RockMigrationHelper.DeleteBlockType("5A074483-2845-4569-B277-3B030DA61111"); // Share Workflow
 }
Пример #23
0
 /// <summary>
 /// Codes the gen migrations up.
 /// </summary>
 private void CodeGenMigrationsUp()
 {
     RockMigrationHelper.UpdateBlockType("Share Workflow", "Export and import workflows from Rock.", "~/Blocks/WorkFlow/ShareWorkflow.ascx", "WorkFlow", "5A074483-2845-4569-B277-3B030DA61111");
     // Attrib for BlockType: Workflow Type Detail:Export Workflows Page
     RockMigrationHelper.UpdateBlockTypeAttribute("E1FF677D-5E52-4259-90C7-5560ECBBD82B", "BD53F9C9-EBA9-4D3F-82EA-DE5DD34A8108", "Export Workflows Page", "ExportWorkflowsPage", "", @"Page used to export workflows.", 4, @"", "4C602FC8-6E80-4E5A-90E4-7F54DFB5A98F");
     // Attrib for BlockType: Person Profile:Adult Attribute Category
     RockMigrationHelper.UpdateBlockTypeAttribute("48BBB7A7-1E1D-461E-9B64-E9CAD815E9E1", "309460EF-0CC5-41C6-9161-B3837BA3D374", "Adult Attribute Category", "AdultAttributeCategory", "", @"The adult Attribute Category to display attributes from.", 4, @"", "0D34EADF-22B0-4DA7-91EC-1F29A217D943");
     // Attrib for BlockType: Person Profile:Child Attribute Category
     RockMigrationHelper.UpdateBlockTypeAttribute("48BBB7A7-1E1D-461E-9B64-E9CAD815E9E1", "309460EF-0CC5-41C6-9161-B3837BA3D374", "Child Attribute Category", "ChildAttributeCategory", "", @"The children Attribute Category to display attributes from.", 3, @"", "62D60C22-EE97-4422-A9C7-155E157B0B2A");
     // Attrib for BlockType: SMS Conversations:Person Info Lava Template
     RockMigrationHelper.UpdateBlockTypeAttribute("3497603B-3BE6-4262-B7E9-EC01FC7140EB", "1D0D3794-C210-48A8-8C68-3FBEC08A6BA5", "Person Info Lava Template", "PersonInfoLavaTemplate", "", @"A Lava template to display person information about the selected Communication Recipient.", 5, @"", "A9AF883A-152E-44D8-AD5E-FD96CAF3A67E");
     // Attrib for BlockType: SMS Conversations:Allowed SMS Numbers
     RockMigrationHelper.UpdateBlockTypeAttribute("3497603B-3BE6-4262-B7E9-EC01FC7140EB", "59D5A94C-94A0-4630-B80A-BB25697D74C7", "Allowed SMS Numbers", "AllowedSMSNumbers", "", @"Set the allowed FROM numbers to appear when in SMS mode (if none are selected all numbers will be included). ", 1, @"", "2F486671-07C6-448E-B647-A15C16C5B3A2");
     // Attrib for BlockType: SMS Conversations:Show only personal SMS number
     RockMigrationHelper.UpdateBlockTypeAttribute("3497603B-3BE6-4262-B7E9-EC01FC7140EB", "1EDAFDED-DFE6-4334-B019-6EECBA89E05A", "Show only personal SMS number", "ShowOnlyPersonalSmsNumber", "", @"Only SMS Numbers tied to the current individual will be shown. Those with ADMIN rights will see all SMS Numbers.", 2, @"False", "CEBF759C-1B83-48BE-82E1-9E6B7C491333");
     // Attrib for BlockType: SMS Conversations:Hide personal SMS numbers
     RockMigrationHelper.UpdateBlockTypeAttribute("3497603B-3BE6-4262-B7E9-EC01FC7140EB", "1EDAFDED-DFE6-4334-B019-6EECBA89E05A", "Hide personal SMS numbers", "HidePersonalSmsNumbers", "", @"Only SMS Numbers that are not associated with a person. The numbers without a 'ResponseRecipient' attribute value.", 3, @"False", "09A89FDD-D3E4-43F3-95AE-D080F959FF0A");
     // Attrib for BlockType: SMS Conversations:Enable SMS Send
     RockMigrationHelper.UpdateBlockTypeAttribute("3497603B-3BE6-4262-B7E9-EC01FC7140EB", "1EDAFDED-DFE6-4334-B019-6EECBA89E05A", "Enable SMS Send", "EnableSmsSend", "", @"Allow SMS messages to be sent from the block.", 4, @"True", "EE7FD478-70BE-44D7-A40F-02EF4AAFEB71");
 }
Пример #24
0
        private void UpdateGradeTransitionDateFieldType()
        {
            RockMigrationHelper.UpdateFieldType("Month Day", "", "Rock", "Rock.Field.Types.MonthDayFieldType", Rock.SystemGuid.FieldType.MONTH_DAY);
            Sql($@"
DECLARE @FieldTypeIdMonthDay INT = (
 SELECT TOP 1 Id
 FROM FieldType
 WHERE [Guid] = '{Rock.SystemGuid.FieldType.MONTH_DAY}'
 )
UPDATE Attribute
SET FieldTypeId = @FieldTypeIdMonthDay
 ,[Description] = 'The date when kids are moved to the next grade level.'
WHERE [Key] = 'GradeTransitionDate'
 AND [EntityTypeId] IS NULL
 AND (
 FieldTypeId != @FieldTypeIdMonthDay
 OR [Description] != 'The date when kids are moved to the next grade level.'
 )
");
        }
Пример #25
0
        /// <summary>
        /// Operations to be performed during the upgrade process.
        /// </summary>
        public override void Up()
        {
            // Add/Update Obsidian Block Type
            //   Name:Control Gallery
            //   Category:Obsidian > Example
            //   EntityType:Rock.Blocks.Example.ControlGallery
            RockMigrationHelper.UpdateMobileBlockType("Control Gallery", "Allows the user to try out various controls.", "Rock.Blocks.Example.ControlGallery", "Obsidian > Example", "6FAB07FF-D4C6-412B-B13F-7B881ECBFAD0");

            // Add/Update Obsidian Block Type
            //   Name:Field Type Gallery
            //   Category:Obsidian > Example
            //   EntityType:Rock.Blocks.Example.FieldTypeGallery
            RockMigrationHelper.UpdateMobileBlockType("Field Type Gallery", "Allows the user to try out various field types.", "Rock.Blocks.Example.FieldTypeGallery", "Obsidian > Example", "50B7B326-8212-44E6-8CF6-515B1FF75A19");

            // Attribute for BlockType
            //   BlockType: Attendance Analytics
            //   Category: Check-in
            //   Attribute: Database Timeout
            RockMigrationHelper.AddOrUpdateBlockTypeAttribute("3CD3411C-C076-4344-A9D5-8F3B4F01E31D", "A75DFC58-7A1B-4799-BF31-451B2BBE38FF", "Database Timeout", "DatabaseTimeoutSeconds", "Database Timeout", @"The number of seconds to wait before reporting a database timeout.", 15, @"180", "F1DE6A0D-A1BE-494F-BC0E-1CAE42AED897");
        }
Пример #26
0
        private void AddUpdateDefinedValuesFor_COMMUNICATION_SMS_FROM_Down()
        {
            // Edit DT Attribute Response Recipient and make optional
            RockMigrationHelper.UpdateDefinedTypeAttribute(Rock.SystemGuid.DefinedType.COMMUNICATION_SMS_FROM,
                                                           Rock.SystemGuid.FieldType.PERSON,
                                                           "Response Recipient",
                                                           "ResponseRecipient",
                                                           "The person who should receive responses to the SMS number. This person must have a phone number with SMS enabled or no response will be sent.",
                                                           24,
                                                           true,
                                                           string.Empty,
                                                           false,
                                                           true,
                                                           "E9E82709-5506-4339-8F6A-C2259329A71F");

            // Add DT Attribute Enable Mobile Conversations and set to true
            RockMigrationHelper.DeleteAttribute("60E05E00-E1A3-46A2-A56D-FE208D91FE4F");

            // Add DT Attribute LaunchWorkflowOnResponseReceived
            RockMigrationHelper.DeleteAttribute("49C7A5A3-D711-4E41-86E4-06408ED6C1BD");
        }
Пример #27
0
        /// <summary>
        /// MP: Update CheckinManagerBackButtons
        /// </summary>
        private void UpdateCheckinManagerBackButtons()
        {
            // Update javascript so that it works on iOS CheckinClient app
            // Add/Update HtmlContent for Block: Back Button (Checkin Manager Roster)
            RockMigrationHelper.UpdateHtmlContentBlock("B62CBF17-7FD1-42C8-9E98-00270A34400D",
                                                       @"<a href=""javascript:goBack();"" class=""btn btn-nav-zone""><i class=""fa fa-chevron-left""></i></a>
<script>
    function goBack() {   
        window.location = document.referrer;
    }
</script>", "26988382-5547-41E4-B737-99F0C079A788");


            // Add/Update HtmlContent for Block: Back Button  (Checkin Manager Attendance Detail)
            RockMigrationHelper.UpdateHtmlContentBlock("A9A5FF01-2263-4CE3-82EB-326528BAAD98", @"<a href=""javascript:goBack();"" class=""btn btn-nav-zone""><i class=""fa fa-chevron-left""></i></a>
<script>
    function goBack() {   
        window.location = document.referrer;
    }
</script>", "89A52AED-0245-40DF-87D5-C692761B7E5E");
        }
        private void PagesBlocks_Up()
        {
            // Add Page
            //  Internal Name: Security Settings
            //  Site: Rock RMS
            RockMigrationHelper.AddPage(true, "91CCB1C9-5F9F-44F5-8BE2-9EC3A3CFD46F", "D65F783D-87A9-4CC9-8110-E83466A0EADB", "Security Settings", "", "0EF3DE1C-CB97-431E-A066-DDF8BD2D8283", "fa fa-shield-alt");

            // Add/Update BlockType
            //   Name: Rock Security Settings
            //   Category: Security
            //   Path: ~/Blocks/Security/RockSecuritySettings.ascx
            //   EntityType: -
            RockMigrationHelper.UpdateBlockType("Rock Security Settings", "Block for displaying and editing Rock's security settings.", "~/Blocks/Security/RockSecuritySettings.ascx", "Security", "186490CD-4132-43BD-9BDF-DD04C6CD2432");

            // Add Block
            //  Block Name: Rock Security Settings
            //  Page Name: Security Settings
            //  Layout: -
            //  Site: Rock RMS
            RockMigrationHelper.AddBlock(true, "0EF3DE1C-CB97-431E-A066-DDF8BD2D8283".AsGuid(), null, "C2D29296-6A87-47A9-A753-EE4E9159C4C4".AsGuid(), "186490CD-4132-43BD-9BDF-DD04C6CD2432".AsGuid(), "Rock Security Settings", "Main", @"", @"", 0, "CC957809-5DA9-47A2-A55D-63F612478722");
        }
        private void UpAddBusinessConversion()
        {
            // Page: Business Conversion
            RockMigrationHelper.AddPage(true, "F4DF4899-2D44-4997-BA9B-9D2C64958A20", "D65F783D-87A9-4CC9-8110-E83466A0EADB", "Business Conversion", "", "94B07FB1-41C1-4755-87E4-0892406D1F3D", ""); // Site:Rock RMS
            RockMigrationHelper.AddPageRoute("94B07FB1-41C1-4755-87E4-0892406D1F3D", "convertbusiness");
            RockMigrationHelper.UpdateBlockType("Convert Business", "Allows you to convert a Person record into a Business and vice-versa.", "~/Blocks/Finance/ConvertBusiness.ascx", "Finance", "155BC217-1B29-4EFA-A7EA-29C075AE96B3");
            // Add Block to Page: Business Conversion, Site: Rock RMS
            RockMigrationHelper.AddBlock(true, "94B07FB1-41C1-4755-87E4-0892406D1F3D", "", "155BC217-1B29-4EFA-A7EA-29C075AE96B3", "Convert Business", "Main", "", "", 0, "A4C78D56-34F7-4E8B-A8D2-A2CB66CDA515");
            // Attrib for BlockType: Convert Business:Default Connection Status
            RockMigrationHelper.UpdateBlockTypeAttribute("155BC217-1B29-4EFA-A7EA-29C075AE96B3", "59D5A94C-94A0-4630-B80A-BB25697D74C7", "Default Connection Status", "DefaultConnectionStatus", "", "The default connection status to use when converting a business to a person.", 0, @"", "D5A83572-EA10-4951-A860-B2E26017EF6D");
            // Attrib Value for Block:Convert Business, Attribute:Default Connection Status Page: Business Conversion, Site: Rock RMS
            RockMigrationHelper.AddBlockAttributeValue("A4C78D56-34F7-4E8B-A8D2-A2CB66CDA515", "D5A83572-EA10-4951-A860-B2E26017EF6D", @"39f491c5-d6ac-4a9b-8ac0-c431cb17d588");

            // Add Block to Page: Businesses, Site: Rock RMS
            RockMigrationHelper.AddBlock(true, "F4DF4899-2D44-4997-BA9B-9D2C64958A20", "", "19B61D65-37E3-459F-A44F-DEF0089118A3", "Action Links", "Main", @"", @"", 0, "D9B9E00F-399E-4A13-84FF-643E1C90118A");

            Sql(@"UPDATE [Block] SET [Order] = 0 WHERE [Guid] = 'D9B9E00F-399E-4A13-84FF-643E1C90118A'");    // Page: Businesses,  Zone: Main,  Block: Action Links
            Sql(@"UPDATE [Block] SET [Order] = 1 WHERE [Guid] = '04E68378-E2F6-465B-925A-D8B124858C44'");    // Page: Businesses,  Zone: Main,  Block: Business List
            // Add/Update HtmlContent for Block: Action Links
            RockMigrationHelper.UpdateHtmlContentBlock("D9B9E00F-399E-4A13-84FF-643E1C90118A", @"<div class=""clearfix margin-b-sm"">     <a href=""/convertbusiness"" class=""btn btn-default btn-xs pull-right""><i class=""fa fa-exchange""></i> Convert Person/Business</a> </div>", "19496B8B-84BB-4C90-BD75-E4D5DE8DBE48");
        }
        /// <summary>
        /// Operations to be performed during the downgrade process.
        /// </summary>
        public override void Down()
        {
            // Attrib for BlockType: Gateway List:Detail Page
            RockMigrationHelper.DeleteAttribute("CBDD5D38-07EE-4ED5-8904-AF18F4161037");
            // Remove Block: Gateway Detail, from Page: Gateway Detail, Site: Rock RMS
            RockMigrationHelper.DeleteBlock("CB7AF6BA-4A89-4653-B4A2-A73999BC7236");
            // Remove Block: Gateway List, from Page: Financial Gateways, Site: Rock RMS
            RockMigrationHelper.DeleteBlock("80D93241-AB5D-46EC-BC12-0E32C3CA784C");
            RockMigrationHelper.DeleteBlockType("32E89BAE-C085-40B3-B872-B62E25A62BDB"); // Gateway List
            RockMigrationHelper.DeleteBlockType("B4D8CBCA-00F6-4D81-B8B6-170373D28128"); // Gateway Detail
            RockMigrationHelper.DeletePage("24DE6092-CE91-468C-8E49-94DB3875B9B7");      //  Page: Gateway Detail, Layout: Full Width, Site: Rock RMS
            RockMigrationHelper.DeletePage("F65AA215-8B46-4E34-B709-FA956BF62C30");      //  Page: Financial Gateways, Layout: Full Width, Site: Rock RMS

            AddColumn("dbo.FinancialPersonSavedAccount", "GatewayEntityTypeId", c => c.Int());
            AddColumn("dbo.FinancialScheduledTransaction", "GatewayEntityTypeId", c => c.Int());
            AddColumn("dbo.FinancialTransaction", "GatewayEntityTypeId", c => c.Int());
            DropForeignKey("dbo.FinancialPersonSavedAccount", "FinancialGatewayId", "dbo.FinancialGateway");
            DropForeignKey("dbo.FinancialScheduledTransaction", "FinancialGatewayId", "dbo.FinancialGateway");
            DropForeignKey("dbo.FinancialTransaction", "FinancialGatewayId", "dbo.FinancialGateway");
            DropForeignKey("dbo.FinancialGateway", "ModifiedByPersonAliasId", "dbo.PersonAlias");
            DropForeignKey("dbo.FinancialGateway", "EntityTypeId", "dbo.EntityType");
            DropForeignKey("dbo.FinancialGateway", "CreatedByPersonAliasId", "dbo.PersonAlias");
            DropIndex("dbo.FinancialPersonSavedAccount", new[] { "FinancialGatewayId" });
            DropIndex("dbo.FinancialScheduledTransaction", new[] { "FinancialGatewayId" });
            DropIndex("dbo.FinancialGateway", new[] { "Guid" });
            DropIndex("dbo.FinancialGateway", new[] { "ModifiedByPersonAliasId" });
            DropIndex("dbo.FinancialGateway", new[] { "CreatedByPersonAliasId" });
            DropIndex("dbo.FinancialGateway", new[] { "EntityTypeId" });
            DropIndex("dbo.FinancialTransaction", new[] { "FinancialGatewayId" });
            DropColumn("dbo.FinancialPersonSavedAccount", "FinancialGatewayId");
            DropColumn("dbo.FinancialScheduledTransaction", "FinancialGatewayId");
            DropColumn("dbo.FinancialTransaction", "FinancialGatewayId");
            DropTable("dbo.FinancialGateway");
            CreateIndex("dbo.FinancialPersonSavedAccount", "GatewayEntityTypeId");
            CreateIndex("dbo.FinancialScheduledTransaction", "GatewayEntityTypeId");
            CreateIndex("dbo.FinancialTransaction", "GatewayEntityTypeId");
            AddForeignKey("dbo.FinancialPersonSavedAccount", "GatewayEntityTypeId", "dbo.EntityType", "Id");
            AddForeignKey("dbo.FinancialScheduledTransaction", "GatewayEntityTypeId", "dbo.EntityType", "Id");
            AddForeignKey("dbo.FinancialTransaction", "GatewayEntityTypeId", "dbo.EntityType", "Id");
        }