Example #1
0
        /// <summary>
        /// The commands to run to migrate plugin to the specific version
        /// </summary>
        public override void Up()
        {
            RockMigrationHelper.AddDefinedValue(
                "4FACC42E-8783-4805-859F-AAC6D8951CE6",
                "MALE",
                "Male",
                "9A3C3ED4-48AE-4384-B98D-722539319E84"
                );

            RockMigrationHelper.AddDefinedValue(
                "4FACC42E-8783-4805-859F-AAC6D8951CE6",
                "FEMALE",
                "Female",
                "DDB7721A-DFDC-46EE-83BC-8FA70D99EFD5"
                );

            RockMigrationHelper.AddDefinedValue(
                "4FACC42E-8783-4805-859F-AAC6D8951CE6",
                "ANY",
                "Any",
                "58F93CCD-9AB4-4653-A690-168D42ED17CB"
                );

            RockMigrationHelper.AddDefinedValue(
                "4FACC42E-8783-4805-859F-AAC6D8951CE6",
                "CO_ED",
                "Co_ed",
                "24E07D3E-912E-490F-8932-4A2C27B7244B"
                );
        }
 private void UpIcal()
 {
     RockMigrationHelper.AddDefinedValue("C3D44004-6951-44D9-8560-8567D705A48B", "Default iCal Description", "The default iCal description used by the Event Calendar Feed if one is not specified. All iCal templates will use the MIME Type of 'text/calendar'.", "DCBA4862-73E9-49B5-8AD5-08E17BE68025", true);
     RockMigrationHelper.AddDefinedValueAttributeValue("DCBA4862-73E9-49B5-8AD5-08E17BE68025", "1E13E409-B568-45D0-B4B6-556C87D61232", @"{{ EventItem.Description }}
         {{ EventItemOccurrence.Note }}");
     RockMigrationHelper.AddDefinedValueAttributeValue("DCBA4862-73E9-49B5-8AD5-08E17BE68025", "4FBF9D1A-06A4-4941-B9F4-85D2C4C12F2A", @"text/calendar");
 }
        /// <summary>
        /// Operations to be performed during the upgrade process.
        /// </summary>
        public override void Up()
        {
            DropForeignKey("dbo.PersonalDevice", "PersonalDeviceTypeId", "dbo.DefinedValue");
            DropIndex("dbo.PersonalDevice", new[] { "PersonAliasId" });
            DropIndex("dbo.PersonalDevice", new[] { "PersonalDeviceTypeId" });
            AddColumn("dbo.Interaction", "PersonalDeviceId", c => c.Int());
            AddColumn("dbo.PersonalDevice", "PersonalDeviceTypeValueId", c => c.Int());
            AddColumn("dbo.PersonalDevice", "PlatformValueId", c => c.Int());
            AddColumn("dbo.PersonalDevice", "DeviceUniqueIdentifier", c => c.String(maxLength: 20));
            AddColumn("dbo.PersonalDevice", "DeviceVersion", c => c.String(maxLength: 100));
            AddColumn("dbo.PersonalDevice", "MACAddress", c => c.String(maxLength: 12));
            AlterColumn("dbo.PersonalDevice", "PersonAliasId", c => c.Int());
            CreateIndex("dbo.Interaction", "PersonalDeviceId");
            CreateIndex("dbo.PersonalDevice", "PersonAliasId");
            CreateIndex("dbo.PersonalDevice", "PersonalDeviceTypeValueId");
            AddForeignKey("dbo.Interaction", "PersonalDeviceId", "dbo.PersonalDevice", "Id");
            AddForeignKey("dbo.PersonalDevice", "PersonalDeviceTypeValueId", "dbo.DefinedValue", "Id");
            RockMigrationHelper.AddDefinedType("Global", "Mobile Device Platform", "The platform (iOS, Android, etc.) of a mobile device.", SystemGuid.DefinedType.PERSONAL_DEVICE_PLATFORM);
            RockMigrationHelper.AddDefinedValue(Rock.SystemGuid.DefinedType.PERSONAL_DEVICE_PLATFORM, "iOS", "An Apple Device", "F00515E7-4EF3-480D-A45D-372CE3D80E69", false);
            RockMigrationHelper.AddDefinedValue(Rock.SystemGuid.DefinedType.PERSONAL_DEVICE_PLATFORM, "Android", "An Android Device", "63464BB8-83E2-4914-B922-5075311758F9", false);
            RockMigrationHelper.AddDefinedValue(Rock.SystemGuid.DefinedType.PERSONAL_DEVICE_PLATFORM, "Other", "A Device other than Apple or Android", SystemGuid.DefinedValue.PERSONAL_DEVICE_PLATFORM_OTHER);

            RockMigrationHelper.AddDefinedValue(Rock.SystemGuid.DefinedType.INTERACTION_CHANNEL_MEDIUM, "WiFi Presence", "Used for tracking a device's presence on a WiFi zone", Rock.SystemGuid.DefinedValue.INTERACTIONCHANNELTYPE_WIFI_PRESENCE);

            Sql(@"
    DECLARE @MediumValueId INT = ( SELECT TOP 1 [Id] FROM [DefinedValue] WHERE [Guid] = '338CB800-C556-46CD-849D-8AE58FC7CB0E' )
    INSERT INTO [InteractionChannel] ( [Name], [ChannelTypeMediumValueId], [Guid] )
        VALUES ( 'WiFi Presence', @MediumValueId, '23888303-4847-4C80-93E2-4C5EB8029D18' )
");
        }
Example #4
0
        public override void Up()
        {
            RockMigrationHelper.AddDefinedType("Learning Management",
                                               "xAPI Extensions", "A list of extensions from the xAPI extension registry. (https://registry.tincanapi.com/)",
                                               Constants.DEFINED_TYPE_EXTENSIONS);
            RockMigrationHelper.AddDefinedTypeAttribute(Constants.DEFINED_TYPE_EXTENSIONS, Rock.SystemGuid.FieldType.TEXT,
                                                        "Name", Constants.DEFINED_VALUE_EXTENSIONS_ATTRIBUTE_KEY_NAME, "The human readable name for the extension.", 0, true, "",
                                                        false, true, Constants.DEFINED_VALUE_EXTENSIONS_ATTRIBUTE_GUID_NAME);

            var extensionsJson = File.ReadAllText(HostingEnvironment.MapPath("~/Plugins/org_secc/xAPI/extensionList.json"));

            extensionsJson = extensionsJson.Replace("en-us", "en-US").Replace("en-Us", "en-US");
            dynamic dyn = extensionsJson.FromJsonDynamic();

            foreach (var obj in dyn)
            {
                try
                {
                    var uri         = obj.uri as string;
                    var metadata    = obj.metadata.metadata;
                    var name        = ( string )(metadata.name as IDictionary <string, object>)["en-US"];
                    var description = ( string )(metadata.description as IDictionary <string, object>)["en-US"];

                    //use a deterministic guid just in case (this isn't standard)
                    Guid guid = GenerateGuid(uri);
                    RockMigrationHelper.AddDefinedValue(Constants.DEFINED_TYPE_EXTENSIONS, uri, description, guid.ToString());
                    RockMigrationHelper.AddDefinedValueAttributeValue(guid.ToString(), Constants.DEFINED_VALUE_EXTENSIONS_ATTRIBUTE_GUID_NAME, name);
                }
                catch (Exception e)
                {
                }
            }
        }
Example #5
0
        /// <summary>
        /// The commands to run to migrate plugin to the specific version
        /// </summary>
        public override void Up()
        {
            RockMigrationHelper.AddPage("7F2581A1-941E-4D51-8A9D-5BE9B881B003", "D65F783D-87A9-4CC9-8110-E83466A0EADB", "Referral Agencies", "", "223AC4F2-CBED-4733-807A-188CFBBFA0C8", "fa fa-check-square-o");       // Site:Rock RMS
            RockMigrationHelper.AddPage("223AC4F2-CBED-4733-807A-188CFBBFA0C8", "D65F783D-87A9-4CC9-8110-E83466A0EADB", "Referral Agency Details", "", "4BF8FA57-AE86-4103-B07E-80ECE0000AEE", "fa fa-check-square-o"); // Site:Rock RMS

            // Since the Referral Agency Details block handles displaying the breadcrumb for the page, we need to turn off the default breadcrumb rendered by the page
            Sql(@"
    UPDATE [Page] SET [BreadCrumbDisplayName] = 0 WHERE [Guid] = '4BF8FA57-AE86-4103-B07E-80ECE0000AEE'
");

            RockMigrationHelper.UpdateBlockType("Referral Agency Detail", "Displays the details of a Referral Agency.", "~/Plugins/com_schracksolutions/SampleProject/ReferralAgencyDetail.ascx", "com_schracksolutions > Sample Project", "2F130DF6-1EE4-45CE-9410-CBB0517EB33E");
            RockMigrationHelper.UpdateBlockType("Referral Agency List", "Lists all the Referral Agencies.", "~/Plugins/com_schracksolutions/SampleProject/ReferralAgencyList.ascx", "com_schracksolutions > Sample Project", "53F447CE-4B91-470A-A15D-B60DCAAB29CB");

            // Add Block to Page: Referral Agencies, Site: Rock RMS
            RockMigrationHelper.AddBlock("223AC4F2-CBED-4733-807A-188CFBBFA0C8", "", "53F447CE-4B91-470A-A15D-B60DCAAB29CB", "Referral Agency List", "Main", "", "", 0, "A0B53736-4132-4D1B-8300-9F9FB1A5DC21");
            // Add Block to Page: Referral Agency Details, Site: Rock RMS
            RockMigrationHelper.AddBlock("4BF8FA57-AE86-4103-B07E-80ECE0000AEE", "", "2F130DF6-1EE4-45CE-9410-CBB0517EB33E", "Referral Agency Detail", "Main", "", "", 0, "B69EBD0E-A1B4-47C5-AAE7-B40BEA37965F");
            // Attrib for BlockType: Referral Agency List:Detail Page
            RockMigrationHelper.AddBlockTypeAttribute("53F447CE-4B91-470A-A15D-B60DCAAB29CB", "BD53F9C9-EBA9-4D3F-82EA-DE5DD34A8108", "Detail Page", "DetailPage", "", "", 0, @"", "5B480350-663C-4789-BF4D-33EC8DF882E8");
            // Attrib Value for Block:Referral Agency List, Attribute:Detail Page Page: Referral Agencies, Site: Rock RMS
            RockMigrationHelper.AddBlockAttributeValue("A0B53736-4132-4D1B-8300-9F9FB1A5DC21", "5B480350-663C-4789-BF4D-33EC8DF882E8", @"4bf8fa57-ae86-4103-b07e-80ece0000aee");

            RockMigrationHelper.AddDefinedType("Global", "Referral Agency Type", "The type of agency (e.g. Counseling, Food, Financial Assistance, etc.)", "150478D4-3709-4543-906F-1F9496B4E7D0");
            RockMigrationHelper.AddDefinedValue("150478D4-3709-4543-906F-1F9496B4E7D0", "Counseling and Therapy", "", "83F9A59C-DBE5-4E1A-B33C-F701FA8175E1", false);
            RockMigrationHelper.AddDefinedValue("150478D4-3709-4543-906F-1F9496B4E7D0", "Financial Assistance or Counseling", "", "7A30D312-996E-4823-B1FF-AA27C1806521", false);
            RockMigrationHelper.AddDefinedValue("150478D4-3709-4543-906F-1F9496B4E7D0", "24 Hour Crisis Hotlines", "", "EDBE6DCE-313F-4648-8D97-A39520A54BFC", false);
            RockMigrationHelper.AddDefinedValue("150478D4-3709-4543-906F-1F9496B4E7D0", "Youth Resources", "", "BB666FA1-5391-40B1-B334-3A27575AD9D5", false);
            RockMigrationHelper.AddDefinedValue("150478D4-3709-4543-906F-1F9496B4E7D0", "Food and Clothing", "", "E15AE7DE-3555-437B-99B0-B28601C4EA2D", false);
            RockMigrationHelper.AddDefinedValue("150478D4-3709-4543-906F-1F9496B4E7D0", "Homeless Resources/Housing", "", "F6E4D78C-E05A-4AEF-AF8C-09B3B8FDDEBF", false);
            RockMigrationHelper.AddDefinedValue("150478D4-3709-4543-906F-1F9496B4E7D0", "Substance Abuse", "", "AD01D370-7CB6-4261-ACF6-8EE21CB353AA", false);
            RockMigrationHelper.AddDefinedValue("150478D4-3709-4543-906F-1F9496B4E7D0", "Residential Drug Treatment Centers", "", "57F4BCC8-B80F-48E5-93E2-A76E3F572C0C", false);
            RockMigrationHelper.AddDefinedValue("150478D4-3709-4543-906F-1F9496B4E7D0", "Domestic Violence Resources", "", "AE95FD8A-FD9E-4EDD-9689-5491725FEFE6", false);
            RockMigrationHelper.AddDefinedValue("150478D4-3709-4543-906F-1F9496B4E7D0", "Mediation", "", "40C66BE2-CE13-4E7D-980A-A2D66968CE57", false);
            RockMigrationHelper.AddDefinedValue("150478D4-3709-4543-906F-1F9496B4E7D0", "Miscellaneous", "", "62AB4A35-6E72-4BCD-BF6A-5B0D2052BACA", false);
        }
Example #6
0
        /// <summary>
        /// SC: Pushpay Plugin v6.0/Non-Cash Giving Project.
        /// </summary>
        private void CreateNonCashAssetTypes()
        {
            RockMigrationHelper.AddDefinedType(
                category: "Financial",
                name: "Non-Cash Asset Types",
                description: "Asset types that describe various kinds of Non-Cash transactions.",
                guid: Rock.SystemGuid.DefinedType.FINANCIAL_NONCASH_ASSET_TYPE);

            RockMigrationHelper.AddDefinedValue(
                definedTypeGuid: Rock.SystemGuid.DefinedType.FINANCIAL_NONCASH_ASSET_TYPE,
                value: "Property",
                description: "Non-Cash Asset Type: Property.",
                guid: Rock.SystemGuid.DefinedValue.NONCASH_ASSET_PROPERTY);

            RockMigrationHelper.AddDefinedValue(
                definedTypeGuid: Rock.SystemGuid.DefinedType.FINANCIAL_NONCASH_ASSET_TYPE,
                value: "Stocks And Bonds",
                description: "Non-Cash Asset Type: Stocks And Bonds.",
                guid: Rock.SystemGuid.DefinedValue.NONCASH_ASSET_STOCKSANDBONDS);

            RockMigrationHelper.AddDefinedValue(
                definedTypeGuid: Rock.SystemGuid.DefinedType.FINANCIAL_NONCASH_ASSET_TYPE,
                value: "Vehicles",
                description: "Non-Cash Asset Type: Vehicles.",
                guid: Rock.SystemGuid.DefinedValue.NONCASH_ASSET_VEHICLES);

            RockMigrationHelper.AddDefinedValue(
                definedTypeGuid: Rock.SystemGuid.DefinedType.FINANCIAL_NONCASH_ASSET_TYPE,
                value: "Other",
                description: "Non-Cash Asset Type: Other.",
                guid: Rock.SystemGuid.DefinedValue.NONCASH_ASSET_OTHER);
        }
Example #7
0
        /// <summary>
        /// Operations to be performed during the upgrade process.
        /// </summary>
        public override void Up()
        {
            CreateTable(
                "dbo.PersonSearchKey",
                c => new
            {
                Id                      = c.Int(nullable: false, identity: true),
                PersonAliasId           = c.Int(nullable: false),
                SearchTypeValueId       = c.Int(nullable: false),
                SearchValue             = c.String(),
                CreatedDateTime         = c.DateTime(),
                ModifiedDateTime        = c.DateTime(),
                CreatedByPersonAliasId  = c.Int(),
                ModifiedByPersonAliasId = c.Int(),
                Guid                    = c.Guid(nullable: false),
                ForeignId               = c.Int(),
                ForeignGuid             = c.Guid(),
                ForeignKey              = c.String(maxLength: 100),
            })
            .PrimaryKey(t => t.Id)
            .ForeignKey("dbo.PersonAlias", t => t.CreatedByPersonAliasId)
            .ForeignKey("dbo.PersonAlias", t => t.ModifiedByPersonAliasId)
            .ForeignKey("dbo.PersonAlias", t => t.PersonAliasId)
            .ForeignKey("dbo.DefinedValue", t => t.SearchTypeValueId)
            .Index(t => t.PersonAliasId)
            .Index(t => t.SearchTypeValueId)
            .Index(t => t.CreatedByPersonAliasId)
            .Index(t => t.ModifiedByPersonAliasId)
            .Index(t => t.Guid, unique: true);

            RockMigrationHelper.AddDefinedType("Person", "Person Search Keys", "List of Person Keys to search.", Rock.SystemGuid.DefinedType.PERSON_SEARCH_KEYS);
            RockMigrationHelper.AddDefinedValue(Rock.SystemGuid.DefinedType.PERSON_SEARCH_KEYS, "Email", "", Rock.SystemGuid.DefinedValue.PERSON_SEARCH_KEYS_EMAIL);
        }
Example #8
0
        /// <summary>
        /// Operations to be performed during the upgrade process.
        /// </summary>
        public override void Up()
        {
            AddColumn("dbo.ContentChannelType", "IncludeTime", c => c.Boolean(nullable: false));
            Sql("UPDATE [ContentChannelType] SET [IncludeTime] = 1");

            // MP: Bank Checks DefinedValue
            RockMigrationHelper.AddDefinedTypeAttribute("4F02B41E-AB7D-4345-8A97-3904DDD89B01", "1EDAFDED-DFE6-4334-B019-6EECBA89E05A", "Show in Check Scanner", "core.ShowInCheckScanner", "", 37, "False", "B4D4CCD3-94CD-4584-94FD-C677213A1A51");
            RockMigrationHelper.AddAttributeQualifier("B4D4CCD3-94CD-4584-94FD-C677213A1A51", "falsetext", "No", "2CDE5641-4FF8-422B-8607-EFA28550B06A");
            RockMigrationHelper.AddAttributeQualifier("B4D4CCD3-94CD-4584-94FD-C677213A1A51", "truetext", "Yes", "581EE78A-C122-413F-91C2-D30B2D9DA937");
            RockMigrationHelper.AddDefinedValue("4F02B41E-AB7D-4345-8A97-3904DDD89B01", "Bank Checks", "Transactions that originated from a bank's bill pay system", "61E46A46-7399-4817-A6EC-3D8495E2316E", false);
            RockMigrationHelper.AddDefinedValueAttributeValue("61E46A46-7399-4817-A6EC-3D8495E2316E", "B4D4CCD3-94CD-4584-94FD-C677213A1A51", @"True");
            RockMigrationHelper.AddDefinedValueAttributeValue("BE7ECF50-52BC-4774-808D-574BA842DB98", "B4D4CCD3-94CD-4584-94FD-C677213A1A51", @"True");

            // MP: GroupMember PageRoute
            RockMigrationHelper.AddPageRoute(Rock.SystemGuid.Page.GROUP_MEMBER_DETAIL_GROUP_VIEWER, "GroupMember/{GroupMemberId}");

            // DT: New Transaction List Settings
            // Attrib for BlockType: Transaction List:Show Only Active Accounts on Filter
            RockMigrationHelper.AddBlockTypeAttribute("E04320BC-67C3-452D-9EF6-D74D8C177154", "1EDAFDED-DFE6-4334-B019-6EECBA89E05A", "Show Only Active Accounts on Filter", "ActiveAccountsOnlyFilter", "", "If account filter is displayed, only list active accounts", 2, @"False", "81AD58EA-F94B-42A1-AC57-16902B717092");
            // Attrib for BlockType: Transaction List:Transaction Types
            RockMigrationHelper.AddBlockTypeAttribute("E04320BC-67C3-452D-9EF6-D74D8C177154", "59D5A94C-94A0-4630-B80A-BB25697D74C7", "Transaction Types", "TransactionTypes", "", "Optional list of transation types to limit the list to (if none are selected all types will be included).", 3, @"", "293F8A3E-020A-4260-8817-3E368CF31ABB");
            // Attrib Value for Block:Transaction List, Attribute:Transaction Types Page: Contributions, Site: Rock RMS
            RockMigrationHelper.AddBlockAttributeValue("9382B285-3EF6-47F7-94BB-A47C498196A3", "293F8A3E-020A-4260-8817-3E368CF31ABB", @"2d607262-52d6-4724-910d-5c6e8fb89acc");

            // MP: Event Calendar Security Updates
            // add entity APPROVE security for Event Calendar
            RockMigrationHelper.AddSecurityAuthForEntityType("Rock.Model.EventCalendar", 0, Rock.Security.Authorization.APPROVE, true, Rock.SystemGuid.Group.GROUP_CALENDAR_ADMINISTRATORS, 0, "25EB8621-70C5-4467-B161-72A067880560");
            RockMigrationHelper.AddSecurityAuthForEntityType("Rock.Model.EventCalendar", 1, Rock.Security.Authorization.APPROVE, true, Rock.SystemGuid.Group.GROUP_COMMUNICATION_ADMINISTRATORS, 0, "A7B792E5-1367-4966-9795-7566A1E936C3");
            RockMigrationHelper.AddSecurityAuthForEntityType("Rock.Model.EventCalendar", 2, Rock.Security.Authorization.APPROVE, false, null, Rock.Model.SpecialRole.AllUsers.ConvertToInt(), "4F8D78AD-4161-4124-874C-C23F8500474F");
            // add page ADMINISTRATE security for Calendars
            RockMigrationHelper.AddSecurityAuthForPage(Rock.SystemGuid.Page.CALENDARS, 1, Rock.Security.Authorization.ADMINISTRATE, true, Rock.SystemGuid.Group.GROUP_COMMUNICATION_ADMINISTRATORS, Rock.Model.SpecialRole.None.ConvertToInt(), "C76D94F5-96C8-4371-80F5-99C50089D430");
            RockMigrationHelper.AddSecurityAuthForPage(Rock.SystemGuid.Page.CALENDARS, 0, Rock.Security.Authorization.ADMINISTRATE, true, Rock.SystemGuid.Group.GROUP_CALENDAR_ADMINISTRATORS, Rock.Model.SpecialRole.None.ConvertToInt(), "2DEE6ECD-461D-487F-9932-9DDDE08A641D");
            // add page EDIT security for Calendars
            RockMigrationHelper.AddSecurityAuthForPage(Rock.SystemGuid.Page.CALENDARS, 1, Rock.Security.Authorization.EDIT, true, Rock.SystemGuid.Group.GROUP_STAFF_MEMBERS, Rock.Model.SpecialRole.None.ConvertToInt(), "A796B28F-E0A6-4E66-9981-CDB0F8A24565");
            RockMigrationHelper.AddSecurityAuthForPage(Rock.SystemGuid.Page.CALENDARS, 2, Rock.Security.Authorization.EDIT, true, Rock.SystemGuid.Group.GROUP_STAFF_LIKE_MEMBERS, Rock.Model.SpecialRole.None.ConvertToInt(), "32E66F8B-A145-488B-A8CD-D76B334C3FC2");

            // MK: New block attribute/vales
            // Attrib for BlockType: Data View Detail: Data View Page
            RockMigrationHelper.AddBlockTypeAttribute("EB279DF9-D817-4905-B6AC-D9883F0DA2E4", "BD53F9C9-EBA9-4D3F-82EA-DE5DD34A8108", "Data View Detail Page", "DataViewDetailPage", "", "Page used to view a data view.", 0, @"", "11C7EF84-14D5-4CAF-940B-B0A2AAD9DFE9");
            // Attrib for BlockType: Report Detail: Report Page
            RockMigrationHelper.AddBlockTypeAttribute("EB279DF9-D817-4905-B6AC-D9883F0DA2E4", "BD53F9C9-EBA9-4D3F-82EA-DE5DD34A8108", "Report Detail Page", "ReportDetailPage", "", "Page used to view a report.", 1, @"", "2BBE2EF5-9FD7-411D-8C36-8F0DAF5A73C8");
            // Attrib value for Block: Data View Detail, Attribute: Data View Detail Page, Page: Data Views, Site: Rock RMS
            RockMigrationHelper.AddBlockAttributeValue("7868AF5C-6512-4F33-B127-93B159E08A56", "11C7EF84-14D5-4CAF-940B-B0A2AAD9DFE9", "4011CB37-28AA-46C4-99D5-826F4A9CADF5");
            // Attrib value for Block: Data View Detail, Attribute: Report Detail Page, Page: Data Views, Site: Rock RMS
            RockMigrationHelper.AddBlockAttributeValue("7868AF5C-6512-4F33-B127-93B159E08A56", "2BBE2EF5-9FD7-411D-8C36-8F0DAF5A73C8", "0FDF1F63-CFB3-4F8E-AC5D-A5312B522D6D");

            // JE: Add RSR - Family Manager security group
            Sql(@"
    IF NOT EXISTS(SELECT * FROM [Group] WHERE [Guid] = 'D832E933-1972-4482-B24D-6AF0AC6BDF20' )
    BEGIN
	    DECLARE @SecurityGroupTypeId int = (SELECT TOP 1 [Id] FROM [GroupType] WHERE [Guid] = 'AECE949F-704C-483E-A4FB-93D5E4720C4C')
	    INSERT INTO [Group] ([IsSystem], [GroupTypeId], [Name], [Description], [IsSecurityRole], [IsActive], [Order], [Guid], [IsPublic])
	    VALUES (1, @SecurityGroupTypeId, 'RSR - Family Manager', 'Used to grant access for use of the Family Registration application.', 1, 1, 100, 'D832E933-1972-4482-B24D-6AF0AC6BDF20', 0)
    END
");

            // JE: Disable Name Search on Connection Search
            RockMigrationHelper.AddBlockAttributeValue("2B60FE4A-5AD8-4F0A-9205-0744485C3DDD", "4361D6EE-B95F-4DE7-88C5-F53A5494A1F6", @"False");
        }
 /// <summary>
 /// The commands to run to migrate plugin to the specific version
 /// </summary>
 public override void Up()
 {
     RockMigrationHelper.AddDefinedValue(
         Rock.SystemGuid.DefinedType.FINANCIAL_ACCOUNT_TYPE,
         "Service Reef",
         "Transactions that originated from ServiceReef.",
         "51DC439B-2931-47CE-8FA8-C6DA1451B633"
         );
 }
Example #10
0
 /// <summary>
 /// The commands to run to migrate plugin to the specific version
 /// </summary>
 public override void Up()
 {
     RockMigrationHelper.AddDefinedValue(
         Rock.SystemGuid.DefinedType.FINANCIAL_SOURCE_TYPE,
         "Service Reef",
         "Transactions that originated from ServiceReef.",
         "9a3e36fa-634e-45e4-9244-d3d21646dba4"
         );
 }
        /// <summary>
        /// Operations to be performed during the upgrade process.
        /// </summary>
        public override void Up()
        {
            // update the new AllowExternalRegistrationUpdates to reflect current behavior
            Sql(@" UPDATE [RegistrationTemplate] SET [AllowExternalRegistrationUpdates] = 1");

            // update new location of jobscheduler installer
            Sql("UPDATE [AttributeValue] set [Value] = 'http://storage.rockrms.com/externalapplications/sparkdevnetwork/jobscheduler/1.5.0/jobscheduler.exe' where [Guid] = '7FBC4397-6BFD-451D-A6B9-83D7B7265641'");

            // add admin checklist item for Family Analytics
            RockMigrationHelper.AddDefinedValue("4BF34677-37E9-4E71-BD03-252B66C9373D", "Enable Family Analytics", @"<a href='http://www.rockrms.com/Rock/BookContent/5#personfamilyanalytics'>Read up on the Family Analytics features</a> and enable the job that supports them.", "8CCE4657-409D-0998-445A-CA6DC2F43096");
        }
        public override void Up()
        {
            // HARVEST Campus Defined Values

            RockMigrationHelper.AddDefinedValue("2CACB86F-D811-4483-98E1-272F1FF8FF5D", harvestPhone, "HARVEST - harvest####", guidHARVEST.ToString(), false);
            RockMigrationHelper.AddDefinedValue("2CACB86F-D811-4483-98E1-272F1FF8FF5D", harvestPhone, "HARVEST: Text Attendance Option (2) - Prayer Request", guidOption2.ToString(), false);
            RockMigrationHelper.AddDefinedValue("2CACB86F-D811-4483-98E1-272F1FF8FF5D", harvestPhone, "HARVEST - Text Attendance Option (3) - Join a Homegroup", guidOption3.ToString(), false);
            RockMigrationHelper.AddDefinedValue("2CACB86F-D811-4483-98E1-272F1FF8FF5D", harvestPhone, "HARVEST: Text Attendance Option (4) - Review Contact Info", guidOption4.ToString(), false);
            RockMigrationHelper.AddDefinedValue("2CACB86F-D811-4483-98E1-272F1FF8FF5D", harvestPhone, "HARVEST: Text Attendance Option (5) - Remove Last Attendance", guidOption5.ToString(), false);
            RockMigrationHelper.AddDefinedValue("2CACB86F-D811-4483-98E1-272F1FF8FF5D", harvestPhone, "HARVEST: Text Attendance Prayer Request Final", guidOptionPR.ToString(), false);

            RockMigrationHelper.AddDefinedValueAttributeValue(guidHARVEST.ToString(), "0097D00F-1F29-4217-8E67-D37A619A6FA3", @"d8354ea7-7da9-449d-94ee-210c6b9496d8");
            RockMigrationHelper.AddDefinedValueAttributeValue(guidHARVEST.ToString(), "17B0E99E-2D10-442A-9342-1F9F07996C2B", rlmHARVESTAttendanceGroupGuid);
            RockMigrationHelper.AddDefinedValueAttributeValue(guidHARVEST.ToString(), "3A526D6C-06FC-46CD-A447-9A6D9A74BB4F", @"(?i)harvest[0-9]...");
            RockMigrationHelper.AddDefinedValueAttributeValue(guidHARVEST.ToString(), "67E09C64-3558-48B7-9A27-A9499D0826E8", @"HARVEST Message from: {{ FromPerson.FullName }}");
            RockMigrationHelper.AddDefinedValueAttributeValue(guidHARVEST.ToString(), "79E3B97B-A717-45AB-A279-335FCDEA141A", rlmHARVESTCampusGuid);
            RockMigrationHelper.AddDefinedValueAttributeValue(guidHARVEST.ToString(), "836CFC0B-6750-4A93-8309-EAB868B845AF", @"FromPhone^{{ FromPhone }}|ReceivedDateTime^{{ ReceivedDateTime}}|MessageBody^{{ MessageBody }}|ReceivedDate^{{ReceivedDate}}|ReceivedTime^{{ReceivedTime}}|Campus^Post Falls Campus|AttendanceGroup^Harvest Fest 2016|");

            RockMigrationHelper.AddDefinedValueAttributeValue(guidOption2.ToString(), "0097D00F-1F29-4217-8E67-D37A619A6FA3", @"8722ac70-d178-4306-bf91-eb2fbb11dfa2");
            RockMigrationHelper.AddDefinedValueAttributeValue(guidOption2.ToString(), "17B0E99E-2D10-442A-9342-1F9F07996C2B", rlmHARVESTAttendanceGroupGuid);
            RockMigrationHelper.AddDefinedValueAttributeValue(guidOption2.ToString(), "3A526D6C-06FC-46CD-A447-9A6D9A74BB4F", @"^2$");
            RockMigrationHelper.AddDefinedValueAttributeValue(guidOption2.ToString(), "67E09C64-3558-48B7-9A27-A9499D0826E8", @"HARVEST Message From: {{ FromPerson.FullName}}");
            RockMigrationHelper.AddDefinedValueAttributeValue(guidOption2.ToString(), "79E3B97B-A717-45AB-A279-335FCDEA141A", rlmHARVESTCampusGuid);
            RockMigrationHelper.AddDefinedValueAttributeValue(guidOption2.ToString(), "836CFC0B-6750-4A93-8309-EAB868B845AF", @"FromPhone^{{FromPhone}}|ReceivedDateTime^{{ReceivedDateTime}}|MessageBody^{{MessageBody}}|");

            RockMigrationHelper.AddDefinedValueAttributeValue(guidOptionPR.ToString(), "0097D00F-1F29-4217-8E67-D37A619A6FA3", @"88978527-0ca4-4c52-8fda-cf915fafa472");
            RockMigrationHelper.AddDefinedValueAttributeValue(guidOptionPR.ToString(), "17B0E99E-2D10-442A-9342-1F9F07996C2B", rlmHARVESTAttendanceGroupGuid);
            RockMigrationHelper.AddDefinedValueAttributeValue(guidOptionPR.ToString(), "3A526D6C-06FC-46CD-A447-9A6D9A74BB4F", @"^2.+");
            RockMigrationHelper.AddDefinedValueAttributeValue(guidOptionPR.ToString(), "67E09C64-3558-48B7-9A27-A9499D0826E8", @"HARVEST: Prayer Request from {{ FromPerson.FullName }}");
            RockMigrationHelper.AddDefinedValueAttributeValue(guidOptionPR.ToString(), "79E3B97B-A717-45AB-A279-335FCDEA141A", rlmHARVESTCampusGuid);
            RockMigrationHelper.AddDefinedValueAttributeValue(guidOptionPR.ToString(), "836CFC0B-6750-4A93-8309-EAB868B845AF", @"FromPhone^{{FromPhone}}|MessageBody^{{MessageBody}}|");

            RockMigrationHelper.AddDefinedValueAttributeValue(guidOption3.ToString(), "0097D00F-1F29-4217-8E67-D37A619A6FA3", @"ca876138-0461-40ad-ab4f-67678b8baeca");
            RockMigrationHelper.AddDefinedValueAttributeValue(guidOption3.ToString(), "17B0E99E-2D10-442A-9342-1F9F07996C2B", rlmHARVESTAttendanceGroupGuid);
            RockMigrationHelper.AddDefinedValueAttributeValue(guidOption3.ToString(), "3A526D6C-06FC-46CD-A447-9A6D9A74BB4F", @"^3.*");
            RockMigrationHelper.AddDefinedValueAttributeValue(guidOption3.ToString(), "67E09C64-3558-48B7-9A27-A9499D0826E8", @"HARVEST: Message for Joining a homegroup from {{ FromPerson.FullName}}");
            RockMigrationHelper.AddDefinedValueAttributeValue(guidOption3.ToString(), "79E3B97B-A717-45AB-A279-335FCDEA141A", rlmHARVESTCampusGuid);
            RockMigrationHelper.AddDefinedValueAttributeValue(guidOption3.ToString(), "836CFC0B-6750-4A93-8309-EAB868B845AF", @"FromPhone^{{FromPhone}}|ReceivedDateTime^{{ ReceivedDateTime }}|Campus^Post Falls Campus|");

            RockMigrationHelper.AddDefinedValueAttributeValue(guidOption4.ToString(), "0097D00F-1F29-4217-8E67-D37A619A6FA3", @"feb34437-9600-4330-855f-85404ec10018");
            RockMigrationHelper.AddDefinedValueAttributeValue(guidOption4.ToString(), "17B0E99E-2D10-442A-9342-1F9F07996C2B", rlmHARVESTAttendanceGroupGuid);
            RockMigrationHelper.AddDefinedValueAttributeValue(guidOption4.ToString(), "3A526D6C-06FC-46CD-A447-9A6D9A74BB4F", @"^4.*");
            RockMigrationHelper.AddDefinedValueAttributeValue(guidOption4.ToString(), "67E09C64-3558-48B7-9A27-A9499D0826E8", @"HARVEST Message From: {{ FromPerson.FullName}}");
            RockMigrationHelper.AddDefinedValueAttributeValue(guidOption4.ToString(), "79E3B97B-A717-45AB-A279-335FCDEA141A", rlmHARVESTCampusGuid);
            RockMigrationHelper.AddDefinedValueAttributeValue(guidOption4.ToString(), "836CFC0B-6750-4A93-8309-EAB868B845AF", @"FromPhone^{{FromPhone}}|ReceivedDateTime^{{ReceivedDateTime}}|MessageBody^{{MessageBody}}|");

            RockMigrationHelper.AddDefinedValueAttributeValue(guidOption5.ToString(), "0097D00F-1F29-4217-8E67-D37A619A6FA3", @"a74396b8-4723-4be7-9f4a-14506c921fc8");
            RockMigrationHelper.AddDefinedValueAttributeValue(guidOption5.ToString(), "17B0E99E-2D10-442A-9342-1F9F07996C2B", rlmHARVESTAttendanceGroupGuid);
            RockMigrationHelper.AddDefinedValueAttributeValue(guidOption5.ToString(), "3A526D6C-06FC-46CD-A447-9A6D9A74BB4F", @"^5.*");
            RockMigrationHelper.AddDefinedValueAttributeValue(guidOption5.ToString(), "67E09C64-3558-48B7-9A27-A9499D0826E8", @"HARVEST Message From: {{ FromPerson.FullName}}");
            RockMigrationHelper.AddDefinedValueAttributeValue(guidOption5.ToString(), "79E3B97B-A717-45AB-A279-335FCDEA141A", rlmHARVESTCampusGuid);
            RockMigrationHelper.AddDefinedValueAttributeValue(guidOption5.ToString(), "836CFC0B-6750-4A93-8309-EAB868B845AF", @"FromPhone^{{FromPhone}}|ReceivedDateTime^{{ReceivedDateTime}}|MessageBody^{{MessageBody}}|");
        }
 public override void Up()
 {
     RockMigrationHelper.AddDefinedType("Check-in",
                                        "Attendance Qualifiers", "Used to note special properties of an attendance record, such as mobile or with parent.",
                                        Constants.DEFINED_TYPE_ATTENDANCE_QUALIFIERS);
     RockMigrationHelper.AddDefinedValue(Constants.DEFINED_TYPE_ATTENDANCE_QUALIFIERS, "Mobile Check-in - Set Did Attend",
                                         "Qualifies an attendance that it is a mobile check-in and SHOULD be marked DidAtted when scanned.", Constants.DEFINED_VALUE_MOBILE_DID_ATTEND);
     RockMigrationHelper.AddDefinedValue(Constants.DEFINED_TYPE_ATTENDANCE_QUALIFIERS, "Mobile Check-in - Set Did NOT Attend",
                                         "Qualifies an attendance that it is a mobile check-in and should NOT be marked DidAtted when scanned.", Constants.DEFINED_VALUE_MOBILE_NOT_ATTEND);
     RockMigrationHelper.AddDefinedValue(Constants.DEFINED_TYPE_ATTENDANCE_QUALIFIERS, "Attendance Status - With Parent",
                                         "Qualifies an attendance that a child has temporarily left the class room with a parent and is expected to return.", Constants.DEFINED_VALUE_ATTENDANCE_STATUS_WITH_PARENT);
 }
Example #14
0
        /// <summary>
        /// The commands to run to migrate plugin to the specific version
        /// </summary>
        public override void Up()
        {
            RockMigrationHelper.AddDefinedType("Global", "Star Values", "Star values for events", "048C200E-2B8E-4501-8C9B-A87C870C3C0D");
            RockMigrationHelper.AddDefinedValue("048C200E-2B8E-4501-8C9B-A87C870C3C0D", "Check-in", "", "DEE129DE-9516-43C2-AEBB-F510C603007E", false);
            RockMigrationHelper.AddDefinedValue("048C200E-2B8E-4501-8C9B-A87C870C3C0D", "First Time Friend", "", "EEBECE35-7C24-47CD-8340-7CB0BB33C528", false);
            RockMigrationHelper.AddDefinedValue("048C200E-2B8E-4501-8C9B-A87C870C3C0D", "Memory Verse", "", "DF75BB6F-FE37-4CB3-BD13-12B4F2D2D033", false);
            RockMigrationHelper.AddDefinedValue("048C200E-2B8E-4501-8C9B-A87C870C3C0D", "Special Event Attendance", "", "363504F2-F55F-4E0A-923C-6A25275FC34F", false);

            RockMigrationHelper.AddEntityAttribute("Rock.Model.DefinedValue", "C757A554-3009-4214-B05D-CEA2B2EA6B8F", "DefinedTypeId", "76", "Star Value", "", "Number of Stars this event is worth", 1, "", "6A1A06FE-27AA-4D16-9F69-28FDEEAFA54A", "StarValue");
            RockMigrationHelper.AddDefinedValueAttributeValue("DEE129DE-9516-43C2-AEBB-F510C603007E", "6A1A06FE-27AA-4D16-9F69-28FDEEAFA54A", "5");
            RockMigrationHelper.AddDefinedValueAttributeValue("EEBECE35-7C24-47CD-8340-7CB0BB33C528", "6A1A06FE-27AA-4D16-9F69-28FDEEAFA54A", "5");
            RockMigrationHelper.AddDefinedValueAttributeValue("DF75BB6F-FE37-4CB3-BD13-12B4F2D2D033", "6A1A06FE-27AA-4D16-9F69-28FDEEAFA54A", "5");
            RockMigrationHelper.AddDefinedValueAttributeValue("363504F2-F55F-4E0A-923C-6A25275FC34F", "6A1A06FE-27AA-4D16-9F69-28FDEEAFA54A", "5");
        }
        public override void Up()
        {
            // Make sure this is unique
            if (DefinedTypeCache.Read(new Guid("0913F7A9-A2BF-479C-96EC-6CDB56310A83")) == null)
            {
                RockMigrationHelper.AddDefinedType("Global", "Hospitals", "Hospital List", "0913F7A9-A2BF-479C-96EC-6CDB56310A83", @"");
                RockMigrationHelper.AddDefinedTypeAttribute("0913F7A9-A2BF-479C-96EC-6CDB56310A83", "9C204CD0-1233-41C5-818A-C5DA439445AA", "City", "Qualifier2", "", 0, "", "CEDC60C1-0F9E-4FE2-BE62-41716813C968");
                RockMigrationHelper.AddDefinedTypeAttribute("0913F7A9-A2BF-479C-96EC-6CDB56310A83", "9C204CD0-1233-41C5-818A-C5DA439445AA", "Notes", "Qualifier8", "", 0, "", "C47A879E-F737-4156-A1FF-B7C465FDB9BC");
                RockMigrationHelper.AddDefinedTypeAttribute("0913F7A9-A2BF-479C-96EC-6CDB56310A83", "9C204CD0-1233-41C5-818A-C5DA439445AA", "Phone", "Qualifier5", "", 0, "", "A4E41679-2CE6-479F-84D4-6821B25E3648");
                RockMigrationHelper.AddDefinedTypeAttribute("0913F7A9-A2BF-479C-96EC-6CDB56310A83", "9C204CD0-1233-41C5-818A-C5DA439445AA", "Speed Dial", "Qualifier6", "", 0, "", "D97EC9DE-5D6A-42FD-B4CE-0516FD5455F6");
                RockMigrationHelper.AddDefinedTypeAttribute("0913F7A9-A2BF-479C-96EC-6CDB56310A83", "9C204CD0-1233-41C5-818A-C5DA439445AA", "State", "Qualifier3", "", 0, "", "239E507C-7C1B-4B4D-84D4-33C368843F04");
                RockMigrationHelper.AddDefinedTypeAttribute("0913F7A9-A2BF-479C-96EC-6CDB56310A83", "9C204CD0-1233-41C5-818A-C5DA439445AA", "Street Address", "Qualifier1", "", 0, "", "73AC0DCE-CE90-4835-AAE7-E98B08F52E9C");
                RockMigrationHelper.AddDefinedTypeAttribute("0913F7A9-A2BF-479C-96EC-6CDB56310A83", "9C204CD0-1233-41C5-818A-C5DA439445AA", "Zip", "Qualifier4", "", 0, "", "46A83E00-D530-48AD-B935-52C015DCA901");
                RockMigrationHelper.AddDefinedValue("0913F7A9-A2BF-479C-96EC-6CDB56310A83", "Sample Hospital", "", "0997ACB6-A4B4-4766-B573-3C44D14DF342", false);
                RockMigrationHelper.AddDefinedValueAttributeValue("0997ACB6-A4B4-4766-B573-3C44D14DF342", "239E507C-7C1B-4B4D-84D4-33C368843F04", @"KY");
                RockMigrationHelper.AddDefinedValueAttributeValue("0997ACB6-A4B4-4766-B573-3C44D14DF342", "46A83E00-D530-48AD-B935-52C015DCA901", @"40023");
                RockMigrationHelper.AddDefinedValueAttributeValue("0997ACB6-A4B4-4766-B573-3C44D14DF342", "73AC0DCE-CE90-4835-AAE7-E98B08F52E9C", @"1 Main St");
                RockMigrationHelper.AddDefinedValueAttributeValue("0997ACB6-A4B4-4766-B573-3C44D14DF342", "A4E41679-2CE6-479F-84D4-6821B25E3648", @"(502) 111-1111");
                RockMigrationHelper.AddDefinedValueAttributeValue("0997ACB6-A4B4-4766-B573-3C44D14DF342", "C47A879E-F737-4156-A1FF-B7C465FDB9BC", @"");
                RockMigrationHelper.AddDefinedValueAttributeValue("0997ACB6-A4B4-4766-B573-3C44D14DF342", "CEDC60C1-0F9E-4FE2-BE62-41716813C968", @"Louisville");
                RockMigrationHelper.AddDefinedValueAttributeValue("0997ACB6-A4B4-4766-B573-3C44D14DF342", "D97EC9DE-5D6A-42FD-B4CE-0516FD5455F6", @"");
            }

            // Make sure this is unique
            if (DefinedTypeCache.Read(new Guid("4573E600-4E00-4BE9-BA92-D17093C735D6")) == null)
            {
                RockMigrationHelper.AddDefinedType("Global", "Nursing Homes", "Nursing Home List", "4573E600-4E00-4BE9-BA92-D17093C735D6", @"");
                RockMigrationHelper.AddDefinedTypeAttribute("4573E600-4E00-4BE9-BA92-D17093C735D6", "9C204CD0-1233-41C5-818A-C5DA439445AA", "City", "Qualifier2", "", 0, "", "CEDC60C1-0F9E-4FE2-BE62-41716813C969");
                RockMigrationHelper.AddDefinedTypeAttribute("4573E600-4E00-4BE9-BA92-D17093C735D6", "9C204CD0-1233-41C5-818A-C5DA439445AA", "Notes", "Qualifier8", "", 0, "", "C47A879E-F737-4156-A1FF-B7C465FDB9BD");
                RockMigrationHelper.AddDefinedTypeAttribute("4573E600-4E00-4BE9-BA92-D17093C735D6", "9C204CD0-1233-41C5-818A-C5DA439445AA", "Phone", "Qualifier5", "", 0, "", "A4E41679-2CE6-479F-84D4-6821B25E3649");
                RockMigrationHelper.AddDefinedTypeAttribute("4573E600-4E00-4BE9-BA92-D17093C735D6", "9C204CD0-1233-41C5-818A-C5DA439445AA", "Pastoral Minister", "Qualifier6", "", 0, "", "D97EC9DE-5D6A-42FD-B4CE-0516FD5455F7");
                RockMigrationHelper.AddDefinedTypeAttribute("4573E600-4E00-4BE9-BA92-D17093C735D6", "9C204CD0-1233-41C5-818A-C5DA439445AA", "State", "Qualifier3", "", 0, "", "239E507C-7C1B-4B4D-84D4-33C368843F05");
                RockMigrationHelper.AddDefinedTypeAttribute("4573E600-4E00-4BE9-BA92-D17093C735D6", "9C204CD0-1233-41C5-818A-C5DA439445AA", "Street Address", "Qualifier1", "", 0, "", "73AC0DCE-CE90-4835-AAE7-E98B08F52E9D");
                RockMigrationHelper.AddDefinedTypeAttribute("4573E600-4E00-4BE9-BA92-D17093C735D6", "9C204CD0-1233-41C5-818A-C5DA439445AA", "Zip", "Qualifier4", "", 0, "", "46A83E00-D530-48AD-B935-52C015DCA902");
                RockMigrationHelper.AddDefinedValue("4573E600-4E00-4BE9-BA92-D17093C735D6", "Sample Nursing Home", "", "0997ACB6-A4B4-4766-B573-3C44D14DF343", false);
                RockMigrationHelper.AddDefinedValueAttributeValue("0997ACB6-A4B4-4766-B573-3C44D14DF343", "239E507C-7C1B-4B4D-84D4-33C368843F05", @"KY");
                RockMigrationHelper.AddDefinedValueAttributeValue("0997ACB6-A4B4-4766-B573-3C44D14DF343", "46A83E00-D530-48AD-B935-52C015DCA902", @"40023");
                RockMigrationHelper.AddDefinedValueAttributeValue("0997ACB6-A4B4-4766-B573-3C44D14DF343", "73AC0DCE-CE90-4835-AAE7-E98B08F52E9D", @"2 Main St");
                RockMigrationHelper.AddDefinedValueAttributeValue("0997ACB6-A4B4-4766-B573-3C44D14DF343", "A4E41679-2CE6-479F-84D4-6821B25E3649", @"(502) 111-1111");
                RockMigrationHelper.AddDefinedValueAttributeValue("0997ACB6-A4B4-4766-B573-3C44D14DF343", "C47A879E-F737-4156-A1FF-B7C465FDB9BD", @"");
                RockMigrationHelper.AddDefinedValueAttributeValue("0997ACB6-A4B4-4766-B573-3C44D14DF343", "CEDC60C1-0F9E-4FE2-BE62-41716813C969", @"Louisville");
                RockMigrationHelper.AddDefinedValueAttributeValue("0997ACB6-A4B4-4766-B573-3C44D14DF343", "D97EC9DE-5D6A-42FD-B4CE-0516FD5455F7", @"John Adams");
            }
            // Make sure to clear the Rock Cache so the defined type above will be there
            RockMemoryCache.Clear();
        }
Example #16
0
        /// <summary>
        /// Operations to be performed during the upgrade process.
        /// </summary>
        public override void Up()
        {
            RockMigrationHelper.AddDefinedType("Global", "Liquid Templates", "Defined type to store various liquid templates for features in Rock.", "C3D44004-6951-44D9-8560-8567D705A48B");
            RockMigrationHelper.AddDefinedTypeAttribute("C3D44004-6951-44D9-8560-8567D705A48B", "9C204CD0-1233-41C5-818A-C5DA439445AA", "MIME Type", "MimeType", "The MIME type that should be returned when using the template.", 1, "", "4FBF9D1A-06A4-4941-B9F4-85D2C4C12F2A");
            RockMigrationHelper.AddDefinedTypeAttribute("C3D44004-6951-44D9-8560-8567D705A48B", "1D0D3794-C210-48A8-8C68-3FBEC08A6BA5", "Template", "Template", "", 2, "", "1E13E409-B568-45D0-B4B6-556C87D61232");
            RockMigrationHelper.AddAttributeQualifier("1E13E409-B568-45D0-B4B6-556C87D61232", "editorMode", "3", "F28A4FD3-BFEE-4617-88A3-2132E71ADAD5");
            RockMigrationHelper.AddAttributeQualifier("1E13E409-B568-45D0-B4B6-556C87D61232", "editorTheme", "0", "9E9DFC12-81CB-4C71-A7E8-9F74E29CEA46");
            RockMigrationHelper.AddAttributeQualifier("1E13E409-B568-45D0-B4B6-556C87D61232", "editorHeight", "600", "6543D502-A6C5-4754-9755-AC6F88DF6CEA");

            RockMigrationHelper.AddDefinedValue("C3D44004-6951-44D9-8560-8567D705A48B", "Default RSS Channel", "The default RSS channel template used by the RSS provider if one is not provided.", "D6149581-9EFC-40D8-BD38-E92C0717BEDA");
            RockMigrationHelper.AddDefinedValueAttributeValue("D6149581-9EFC-40D8-BD38-E92C0717BEDA", "4FBF9D1A-06A4-4941-B9F4-85D2C4C12F2A", "application/rss+xml");
            RockMigrationHelper.AddDefinedValueAttributeValue("D6149581-9EFC-40D8-BD38-E92C0717BEDA", "1E13E409-B568-45D0-B4B6-556C87D61232", @"{% assign timezone = 'Now' | Date:'zzz' | Replace:':','' -%}
<?xml version=""1.0"" encoding=""utf-8""?>
<rss version=""2.0"" xmlns:atom=""http://www.w3.org/2005/Atom"">

<channel>
    <title>{{ Channel.Name }}</title>
    <link>{{ Channel.ChannelUrl }}</link>
    <description>{{ Channel.Description }}</description>
    <language>en-us</language>
    <ttl>{{ Channel.TimeToLive }}</ttl>
    <lastBuildDate>{{ 'Now' | Date:'ddd, dd MMM yyyy HH:mm:00' }} {{ timezone }}</lastBuildDate>
{% for item in Items -%}
    <item>
        <title>{{ item.Title }}</title>
        <guid>{{ Channel.ItemUrl }}?Item={{ item.Id }}</guid>
        <link>{{ Channel.ItemUrl }}?Item={{ item.Id }}</link>
        <pubDate>{{ item.StartDateTime | Date:'ddd, dd MMM yyyy HH:mm:00' }} {{ timezone }}</pubDate>
        <description>{{ item.Content | Escape }}</description>
    </item>
{% endfor -%}

</channel>
</rss>");

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

            // update to computed column to handle ISO 8601 formatted values
            Sql(@"
    ALTER TABLE [dbo].[AttributeValue] DROP COLUMN [ValueAsDateTime]
    ALTER TABLE [dbo].[AttributeValue] ADD [ValueAsDateTime] AS CASE WHEN [value] LIKE '____-__-__T__:__:__%' THEN CONVERT(datetime, CONVERT(datetimeoffset, [value])) ELSE CASE WHEN (LEN([value]) < 50 AND ISDATE( [value]) = 1) THEN CONVERT(datetime, [value]) ELSE NULL END END
");
        }
        /// <summary>
        /// DH: Add Prayer Interactions Medium Type and Channel
        /// </summary>
        public void PrayerInteractionsUp()
        {
            RockMigrationHelper.AddDefinedValue(SystemGuid.DefinedType.INTERACTION_CHANNEL_MEDIUM,
                                                "System Events",
                                                "Used for tracking general system events where the individual channels will identify the type of event.",
                                                SystemGuid.DefinedValue.INTERACTIONCHANNELTYPE_SYSTEM_EVENTS);

            Sql(@"
DECLARE @ChannelGuid UNIQUEIDENTIFIER = '3D49FB99-94D1-4F63-B1A2-30D4FEDE11E9'

IF NOT EXISTS( SELECT * FROM [InteractionChannel] WHERE [Guid] = @ChannelGuid )
BEGIN
    DECLARE @ChannelTypeMediumValueId INT = (SELECT TOP 1 [Id] FROM [DefinedValue] WHERE [Guid] = '5919214F-9C59-4913-BE4E-0DFB6A05F528')
    DECLARE @ComponentEntityTypeId INT = (SELECT TOP 1 [Id] FROM [EntityType] WHERE [Name] = 'Rock.Model.PrayerRequest')

    INSERT INTO [InteractionChannel]
	    ([Name], [ComponentEntityTypeId], [ChannelTypeMediumValueId], [Guid], [UsesSession], [IsActive])
	    VALUES ('Prayer Events', @ComponentEntityTypeId, @ChannelTypeMediumValueId, @ChannelGuid, 0, 1)
END");
        }
        public override void Up()
        {
            RockMigrationHelper.AddDefinedType("Global", "Mobile ListView Components", "List of components for available for Mobile List Views", AvalancheUtilities.MobileListViewComponent);
            RockMigrationHelper.AddDefinedTypeAttribute(AvalancheUtilities.MobileListViewComponent, Rock.SystemGuid.FieldType.TEXT, "ComponentType", "ComponentType", "Components that can be used to display a list of mobile list view items in Avalanche.", 0, "", "ACAE178E-E804-4F32-9BE3-2F020E7314CF");

            //Thumbnail ListView
            RockMigrationHelper.AddDefinedValue(AvalancheUtilities.MobileListViewComponent, "Thumbnail ListView", "Default list view. Supports images, icons, title and description.", "D9EA2C97-68E1-4D94-B881-F3AC4F2883A3");
            RockMigrationHelper.UpdateDefinedValueAttributeValue("D9EA2C97-68E1-4D94-B881-F3AC4F2883A3", "ACAE178E-E804-4F32-9BE3-2F020E7314CF", "Avalanche.Components.ListView.ThumbnailListView");

            //Column ListView
            RockMigrationHelper.AddDefinedValue(AvalancheUtilities.MobileListViewComponent, "Column ListView", "List view in columns. Supports images, icons, and title.", "1A637B48-35FB-43B2-9822-88AF2FD1D333");
            RockMigrationHelper.UpdateDefinedValueAttributeValue("1A637B48-35FB-43B2-9822-88AF2FD1D333", "ACAE178E-E804-4F32-9BE3-2F020E7314CF", "Avalanche.Components.ListView.ColumnListView");

            //Card ListView
            RockMigrationHelper.AddDefinedValue(AvalancheUtilities.MobileListViewComponent, "Card ListView", "Card based list view. Supports titles, images, icons, and descriptions in Markdown", "A6EFB571-56C8-44C2-8F87-B7F4DB4E1991");
            RockMigrationHelper.UpdateDefinedValueAttributeValue("A6EFB571-56C8-44C2-8F87-B7F4DB4E1991", "ACAE178E-E804-4F32-9BE3-2F020E7314CF", "Avalanche.Components.ListView.CardListView");

            //Horizontal ListView
            RockMigrationHelper.AddDefinedValue(AvalancheUtilities.MobileListViewComponent, "Horizontal ListView", "Horizontal layed out list view. Supports titles, images, icons.", "673B7DB5-2200-41D6-8857-9A7663B56C47");
            RockMigrationHelper.UpdateDefinedValueAttributeValue("673B7DB5-2200-41D6-8857-9A7663B56C47", "ACAE178E-E804-4F32-9BE3-2F020E7314CF", "Avalanche.Components.ListView.HorizontalListView");

            RockMigrationHelper.AddGlobalAttribute(Rock.SystemGuid.FieldType.TEXT, "", "", "Avalanche Home Page", "Page which starts the Avalanche App", 0, "", "5FEFE20F-742E-4204-8A1C-7E400F802288");
        }
Example #19
0
        /// <summary>
        /// Operations to be performed during the upgrade process.
        /// </summary>
        public override void Up()
        {
            CreateTable(
                "dbo.PersonalDevice",
                c => new
            {
                Id                      = c.Int(nullable: false, identity: true),
                PersonAliasId           = c.Int(nullable: false),
                DeviceRegistrationId    = c.String(),
                PersonalDeviceTypeId    = c.Int(nullable: false),
                NotificationsEnabled    = c.Boolean(nullable: false),
                CreatedDateTime         = c.DateTime(),
                ModifiedDateTime        = c.DateTime(),
                CreatedByPersonAliasId  = c.Int(),
                ModifiedByPersonAliasId = c.Int(),
                Guid                    = c.Guid(nullable: false),
                ForeignId               = c.Int(),
                ForeignGuid             = c.Guid(),
                ForeignKey              = c.String(maxLength: 100),
            })
            .PrimaryKey(t => t.Id)
            .ForeignKey("dbo.PersonAlias", t => t.CreatedByPersonAliasId)
            .ForeignKey("dbo.PersonAlias", t => t.ModifiedByPersonAliasId)
            .ForeignKey("dbo.DefinedValue", t => t.PersonalDeviceTypeId)
            .ForeignKey("dbo.PersonAlias", t => t.PersonAliasId)
            .Index(t => t.PersonAliasId)
            .Index(t => t.PersonalDeviceTypeId)
            .Index(t => t.CreatedByPersonAliasId)
            .Index(t => t.ModifiedByPersonAliasId)
            .Index(t => t.Guid, unique: true);

            RockMigrationHelper.AddDefinedType("Global", "Personal Device Type", "Device type for notifications", SystemGuid.DefinedType.PERSONAL_DEVICE_TYPE);
            RockMigrationHelper.AddDefinedTypeAttribute(SystemGuid.DefinedType.PERSONAL_DEVICE_TYPE, "1EDAFDED-DFE6-4334-B019-6EECBA89E05A", "Supports Notifications", "SupportsNotifications", "Does this personal device type support notifications", 0, "true", "D098823B-C6D6-44F4-9248-5F1971EE4009");
            RockMigrationHelper.AddAttributeQualifier("D098823B-C6D6-44F4-9248-5F1971EE4009", "SupportsNotificationsTrueText", "Yes", "51A181F4-9A3A-4356-B466-164BFDE0C5A5");
            RockMigrationHelper.AddAttributeQualifier("D098823B-C6D6-44F4-9248-5F1971EE4009", "SupportsNotificationsFalseText", "No", "B6AD7267-E54D-4660-B1B4-1B6DB0DF3402");
            RockMigrationHelper.AddDefinedValue(SystemGuid.DefinedType.PERSONAL_DEVICE_TYPE, "Mobile", "Personal Device Type Mobile", SystemGuid.DefinedValue.PERSONAL_DEVICE_TYPE_MOBILE);
        }
        /// <summary>
        /// Operations to be performed during the upgrade process.
        /// </summary>
        public override void Up()
        {
            // Add new block types
            RockMigrationHelper.UpdateBlockType("Following By Entity", "Takes a entity type and displays a person's following items for that entity using a Lava template.", "~/Blocks/Core/FollowingByEntityLava.ascx", "Core", "36B56055-7AA2-4169-82DD-CCFBD2C7B4CC");
            RockMigrationHelper.UpdateBlockType("Event Calendar Item Personalized Registration", "Simplifies the registration process for a given person and event calendar item.", "~/Blocks/Event/EventCalendarItemPersonalizedRegistration.ascx", "Event", "1A1FFACC-D74C-4061-B6A7-34150C462DB7");

            // Attrib for BlockType: Following By Entity:Link URL
            RockMigrationHelper.AddBlockTypeAttribute("36B56055-7AA2-4169-82DD-CCFBD2C7B4CC", "9C204CD0-1233-41C5-818A-C5DA439445AA", "Link URL", "LinkUrl", "", "The address to use for the link. The text '[Id]' will be replaced with the Id of the entity '[Guid]' will be replaced with the Guid.", 1, @"/samplepage/[Id]", "9981ABB3-7130-41DB-87AF-973722FBD54E");

            // Attrib for BlockType: Following By Entity:Enable Debug
            RockMigrationHelper.AddBlockTypeAttribute("36B56055-7AA2-4169-82DD-CCFBD2C7B4CC", "1EDAFDED-DFE6-4334-B019-6EECBA89E05A", "Enable Debug", "EnableDebug", "", "Show merge data to help you see what's available to you.", 3, @"False", "D7094B16-B237-4D97-B1FC-F680C0701583");

            // Add My Dashboard Page
            RockMigrationHelper.AddPage("20F97A93-7949-4C2A-8A5E-C756FE8585CA", "22D220B5-0D34-429A-B9E3-59D80AE423E7", "My Dashboard", "", "AE1818D8-581C-4599-97B9-509EA450376A", "fa fa-tachometer"); // Site:Rock RMS
            RockMigrationHelper.AddPageRoute("AE1818D8-581C-4599-97B9-509EA450376A", "MyDashboard");                                                                                                     // for Page:My Dashboard

            // hide page from nav
            Sql(@"  UPDATE [Page]
  SET [DisplayInNavWhen] = 2
  WHERE [Guid] = 'AE1818D8-581C-4599-97B9-509EA450376A'");

            // Add Block to Page: My Dashboard, Site: Rock RMS
            RockMigrationHelper.AddBlock("AE1818D8-581C-4599-97B9-509EA450376A", "", "36B56055-7AA2-4169-82DD-CCFBD2C7B4CC", "Following Groups", "Sidebar1", "", "", 0, "AA11F703-FF26-4DA3-8CAE-E95989013135");

            // Add Block to Page: My Dashboard, Site: Rock RMS
            RockMigrationHelper.AddBlock("AE1818D8-581C-4599-97B9-509EA450376A", "", "4F217A7F-A34E-489E-AE0E-2B7EDCF69CD1", "My  Assigned Workflows", "Main", "", "", 1, "415575C3-70AC-4A7A-8936-B98464C5557F");

            // Add Block to Page: My Dashboard, Site: Rock RMS
            RockMigrationHelper.AddBlock("AE1818D8-581C-4599-97B9-509EA450376A", "", "4F217A7F-A34E-489E-AE0E-2B7EDCF69CD1", "My Open Workflows", "Sidebar1", "", "", 1, "8111124F-8201-4F54-8A2C-CDC9D7CEA1BC");

            // Add Block to Page: My Dashboard, Site: Rock RMS
            RockMigrationHelper.AddBlock("AE1818D8-581C-4599-97B9-509EA450376A", "", "19B61D65-37E3-459F-A44F-DEF0089118A3", "Intro", "Feature", "", "", 0, "6DE44644-65FE-4321-A09D-36B329D6AE04");

            // Add/Update HtmlContent for Block: Intro
            RockMigrationHelper.UpdateHtmlContentBlock("6DE44644-65FE-4321-A09D-36B329D6AE04", @"<h1>{{ CurrentPerson.NickName | Possessive}} Homepage</h1>", "F0BCB32C-CEB0-41CC-B43A-26FC66CCBD36");


            // disable cache on html block
            RockMigrationHelper.AddBlockAttributeValue("6DE44644-65FE-4321-A09D-36B329D6AE04", "4DFDB295-6D0F-40A1-BEF9-7B70C56F66C4", "0");


            // Attrib for BlockType: Group Member List:Require Note on Alternate Placement
            RockMigrationHelper.AddBlockTypeAttribute("88B7EFA9-7419-4D05-9F88-38B936E61EDD", "1EDAFDED-DFE6-4334-B019-6EECBA89E05A", "Require Note on Alternate Placement", "RequireAlternatePlacementNote", "", "Flag that indicates whether a note is required to save the alternate placement.", 3, @"False", "94174D1A-1C58-4456-A931-A07A8FB19154");

            // Attrib for BlockType: Following By Entity:Max Results
            RockMigrationHelper.AddBlockTypeAttribute("36B56055-7AA2-4169-82DD-CCFBD2C7B4CC", "A75DFC58-7A1B-4799-BF31-451B2BBE38FF", "Max Results", "MaxResults", "", "The maximum number of results to display.", 4, @"100", "D2BB9E7D-9DCC-4432-88F5-D5A3058F6DEB");

            // Attrib for BlockType: Following By Entity:Entity Type
            RockMigrationHelper.AddBlockTypeAttribute("36B56055-7AA2-4169-82DD-CCFBD2C7B4CC", "3549BAB6-FE1B-4333-AFC4-C5ACA01BB8EB", "Entity Type", "EntityType", "", "The type of entity to show following for.", 0, @"", "C896AA82-F8D7-4A94-9730-D4030DA3DBFA");

            // Attrib for BlockType: Login Status:Logged In Page List
            RockMigrationHelper.AddBlockTypeAttribute("04712F3D-9667-4901-A49D-4507573EF7AD", "73B02051-0D38-4AD9-BF81-A2D477DE4F70", "Logged In Page List", "LoggedInPageList", "", "List of pages to show in the dropdown when the user is logged in. The link field takes Lava with the CurrentPerson merge fields. Place the text 'divider' in the title field to add a divider.", 0, @"", "1B0E8904-196B-433E-B1CC-937AD3CA5BF2");

            // Attrib for BlockType: Following By Entity:Lava Template
            RockMigrationHelper.AddBlockTypeAttribute("36B56055-7AA2-4169-82DD-CCFBD2C7B4CC", "1D0D3794-C210-48A8-8C68-3FBEC08A6BA5", "Lava Template", "LavaTemplate", "", "Lava template to use to display content", 2, @"<div class=""panel panel-block""> 
    <div class=""panel-heading"">
       <h4 class=""panel-title"">Followed {{ EntityType | Pluralize }}</h4>
    </div>
    <div class=""panel-body"">

        <ul>
        {% for item in FollowingItems %}
            {% if LinkUrl != '' %}
                <li><a href=""{{ LinkUrl | Replace:'[Id]',item.Id }}"">{{ item.Name }}</a></li>
            {% else %}
                <li>{{ item.Name }}</li>
            {% endif %}
        {% endfor %}
        </ul>
        
    </div>
</div>", "58CA8CF4-6C86-4D27-92BE-C687E74D014F");



            // Add My Dashboard to the internal login statuses

            // Attrib Value for Block:Login Status, Attribute:Logged In Page List , Layout: PersonDetail, Site: Rock RMS
            RockMigrationHelper.AddBlockAttributeValue("19C2140D-498A-4675-B8A2-18B281736F6E", "1B0E8904-196B-433E-B1CC-937AD3CA5BF2", @"My Dashboard^~/MyDashboard|");

            // Attrib Value for Block:Login Status, Attribute:Logged In Page List , Layout: Full Width, Site: Rock RMS
            RockMigrationHelper.AddBlockAttributeValue("82AF461F-022D-4ADB-BB12-F220CD605459", "1B0E8904-196B-433E-B1CC-937AD3CA5BF2", @"My Dashboard^~/MyDashboard|");

            // Attrib Value for Block:Login Status, Attribute:Logged In Page List , Layout: Left Sidebar, Site: Rock RMS
            RockMigrationHelper.AddBlockAttributeValue("791A6AA0-D498-4795-BB5F-21609175826F", "1B0E8904-196B-433E-B1CC-937AD3CA5BF2", @"My Dashboard^~/MyDashboard|");

            // Attrib Value for Block:Login Status, Attribute:Logged In Page List , Layout: Right Sidebar, Site: Rock RMS
            RockMigrationHelper.AddBlockAttributeValue("2356DEDC-803F-4782-A8E9-D0D88393EC2E", "1B0E8904-196B-433E-B1CC-937AD3CA5BF2", @"My Dashboard^~/MyDashboard|");

            // Attrib Value for Block:Login Status, Attribute:Logged In Page List , Layout: Homepage, Site: External Website
            RockMigrationHelper.AddBlockAttributeValue("5A5C6063-EA0D-4EDD-A394-4B1B772F2041", "1B0E8904-196B-433E-B1CC-937AD3CA5BF2", @"");

            // Attrib Value for Block:Following Groups, Attribute:Max Results Page: My Dashboard, Site: Rock RMS
            RockMigrationHelper.AddBlockAttributeValue("AA11F703-FF26-4DA3-8CAE-E95989013135", "D2BB9E7D-9DCC-4432-88F5-D5A3058F6DEB", @"100");

            // Attrib Value for Block:Following Groups, Attribute:Entity Type Page: My Dashboard, Site: Rock RMS
            RockMigrationHelper.AddBlockAttributeValue("AA11F703-FF26-4DA3-8CAE-E95989013135", "C896AA82-F8D7-4A94-9730-D4030DA3DBFA", @"9bbfda11-0d22-40d5-902f-60adfbc88987");

            // Attrib Value for Block:Following Groups, Attribute:Link URL Page: My Dashboard, Site: Rock RMS
            RockMigrationHelper.AddBlockAttributeValue("AA11F703-FF26-4DA3-8CAE-E95989013135", "9981ABB3-7130-41DB-87AF-973722FBD54E", @"/page/113?GroupId=[Id]");

            // Attrib Value for Block:Following Groups, Attribute:Lava Template Page: My Dashboard, Site: Rock RMS
            RockMigrationHelper.AddBlockAttributeValue("AA11F703-FF26-4DA3-8CAE-E95989013135", "58CA8CF4-6C86-4D27-92BE-C687E74D014F", @"<div class=""panel panel-block""> 
    <div class=""panel-heading"">
       <h4 class=""panel-title""><i class=""fa fa-users""></i> Followed {{ EntityType | Pluralize }}</h4>
    </div>
    <div class=""panel-body"">

        <ul class=""list-unstyled"">

        {% assign itemsSorted = FollowingItems | Sort:'GroupTypeId' %}
        {% assign currentType = '' %}

        {% for item in itemsSorted %}
            {% if currentType != item.GroupTypeId %}
                {% if currentType != '' %}
                    </ul>
                {% endif %}
                
                <strong>{{ item.GroupType.Name }}</strong>
                <ul class=""list-unstyled margin-b-md"">
                {% assign currentType = item.GroupTypeId %}
            {% endif %}
            
            <li><i class=""{{ item.GroupType.IconCssClass }} icon-fw""></i> <a href=""{{ LinkUrl | Replace:'[Id]',item.Id }}"">{{ item.Name }}</a></li>
        {% endfor %}
        
        {% if currentType != '' %}
            </ul>
        {% endif %}
        
    </div>
</div>");

            // Attrib Value for Block:Following Groups, Attribute:Enable Debug Page: My Dashboard, Site: Rock RMS
            RockMigrationHelper.AddBlockAttributeValue("AA11F703-FF26-4DA3-8CAE-E95989013135", "D7094B16-B237-4D97-B1FC-F680C0701583", @"False");

            // Attrib Value for Block:My  Assigned Workflows, Attribute:Contents Page: My Dashboard, Site: Rock RMS
            RockMigrationHelper.AddBlockAttributeValue("415575C3-70AC-4A7A-8936-B98464C5557F", "D2149BA3-7AE8-4FE8-AF7C-4EF40DBEB4B2", @"{% if Actions.size > 0 %}
    <div class='panel panel-block'> 
        <div class='panel-heading'>
            <h4 class='panel-title'>My Assigned Tasks</h4>
        </div>
        <div class='panel-body'>
            <ul class='fa-ul'>
                {% for action in Actions %}
                    <li>
                        <i class='fa-li {{ action.Activity.Workflow.WorkflowType.IconCssClass }}'></i>
                        <a href='~/{% if Role == '0' %}WorkflowEntry/{{ action.Activity.Workflow.WorkflowTypeId }}{% else %}Workflow{% endif %}/{{ action.Activity.Workflow.Id }}'>{{ action.Activity.Workflow.WorkflowType.Name }}: {{ action.Activity.Workflow.Name }}{% if role == '0' %} ({{ action.Activity.ActivityType.Name }}){% endif %}</a>
                    </li>
                {% endfor %}
            </ul>
        </div>
    </div>
{% endif %}
");

            // Attrib Value for Block:My  Assigned Workflows, Attribute:Include Child Categories Page: My Dashboard, Site: Rock RMS
            RockMigrationHelper.AddBlockAttributeValue("415575C3-70AC-4A7A-8936-B98464C5557F", "5AD3495C-AFBF-4262-BD3D-AC16FD8CF3EC", @"True");

            // Attrib Value for Block:My  Assigned Workflows, Attribute:Categories Page: My Dashboard, Site: Rock RMS
            RockMigrationHelper.AddBlockAttributeValue("415575C3-70AC-4A7A-8936-B98464C5557F", "28DF6F17-AF47-49DF-824F-9E7C8B94AD5D", @"");

            // Attrib Value for Block:My  Assigned Workflows, Attribute:Role Page: My Dashboard, Site: Rock RMS
            RockMigrationHelper.AddBlockAttributeValue("415575C3-70AC-4A7A-8936-B98464C5557F", "C8816900-0772-4E15-8D41-D20874F560BE", @"0");

            // Attrib Value for Block:My Open Workflows, Attribute:Role Page: My Dashboard, Site: Rock RMS
            RockMigrationHelper.AddBlockAttributeValue("8111124F-8201-4F54-8A2C-CDC9D7CEA1BC", "C8816900-0772-4E15-8D41-D20874F560BE", @"1");

            // Attrib Value for Block:My Open Workflows, Attribute:Categories Page: My Dashboard, Site: Rock RMS
            RockMigrationHelper.AddBlockAttributeValue("8111124F-8201-4F54-8A2C-CDC9D7CEA1BC", "28DF6F17-AF47-49DF-824F-9E7C8B94AD5D", @"");

            // Attrib Value for Block:My Open Workflows, Attribute:Include Child Categories Page: My Dashboard, Site: Rock RMS
            RockMigrationHelper.AddBlockAttributeValue("8111124F-8201-4F54-8A2C-CDC9D7CEA1BC", "5AD3495C-AFBF-4262-BD3D-AC16FD8CF3EC", @"True");

            // Attrib Value for Block:My Open Workflows, Attribute:Contents Page: My Dashboard, Site: Rock RMS
            RockMigrationHelper.AddBlockAttributeValue("8111124F-8201-4F54-8A2C-CDC9D7CEA1BC", "D2149BA3-7AE8-4FE8-AF7C-4EF40DBEB4B2", @"{% if Actions.size > 0 %}
    <div class='panel panel-block'> 
        <div class='panel-heading'>
            <h4 class='panel-title'>My Open Requests</h4>
        </div>
        <div class='panel-body'>
            <ul class='fa-ul'>
                {% for action in Actions %}
                    <li>
                        <i class='fa-li {{ action.Activity.Workflow.WorkflowType.IconCssClass }}'></i>
                        <a href='~/{% if Role == '0' %}WorkflowEntry/{{ action.Activity.Workflow.WorkflowTypeId }}{% else %}Workflow{% endif %}/{{ action.Activity.Workflow.Id }}'>{{ action.Activity.Workflow.WorkflowType.Name }}: {{ action.Activity.Workflow.Name }}{% if role == '0' %} ({{ action.Activity.ActivityType.Name }}){% endif %}</a>
                    </li>
                {% endfor %}
            </ul>
        </div>
    </div>
{% endif %}
");

            RockMigrationHelper.AddDefinedType("Check-in", "Family Manager Configuration", "Configuration templates for the Family Manager application.", "251D752B-0595-C3A6-4E2A-AD0264DAFCCD", @"");
            RockMigrationHelper.AddDefinedTypeAttribute("251D752B-0595-C3A6-4E2A-AD0264DAFCCD", "1D0D3794-C210-48A8-8C68-3FBEC08A6BA5", "Configuration Template", "ConfigurationTemplate", "JSON configuration file.", 0, "", "ACC82748-157F-BF8E-4E34-FFD3C05269B3");
            RockMigrationHelper.AddAttributeQualifier("ACC82748-157F-BF8E-4E34-FFD3C05269B3", "editorHeight", "600", "8B8E9AC2-6F82-85B5-4EBF-88F2ACFA0634");
            RockMigrationHelper.AddAttributeQualifier("ACC82748-157F-BF8E-4E34-FFD3C05269B3", "editorMode", "4", "A5D7AA2D-533C-3DB5-4A46-0879A47F9B5E");
            RockMigrationHelper.AddAttributeQualifier("ACC82748-157F-BF8E-4E34-FFD3C05269B3", "editorTheme", "0", "9BD724FA-E098-0F91-4EF4-E6117E808242");
            RockMigrationHelper.AddDefinedValue("251D752B-0595-C3A6-4E2A-AD0264DAFCCD", "Rock Default", "The default theme for the Family Manager application.", "8BB6A099-1592-4E7F-AE8E-7FDEE63E040C", false);
            RockMigrationHelper.AddDefinedValueAttributeValue("8BB6A099-1592-4E7F-AE8E-7FDEE63E040C", "ACC82748-157F-BF8E-4E34-FFD3C05269B3", @"{
	""familyAttributes"": [
	],
	""personAttributes"": [
		{""attributeId"": 2073, ""required"": true },
		{""attributeId"": 174, ""required"": false },
		{""attributeId"": 714, ""required"": true },
		{""attributeId"": 1117, ""required"": false },
		{""attributeId"": 1032, ""required"": true },
		{""attributeId"": 1059, ""required"": false }
	],
	
	""requireFamilyAddress"": false,
	""requireChildBirthdate"": true,
	""requireAdultBirthdate"": false,
	""requireChildGrade"": true,
	""firstVisitPrompt"": false,
	
	""visualSettings"": 
	{
	    ""BackgroundColor"" : ""#dcd5cbff"",
		""LogoURL"" : ""~/Assets/FamilyManagerThemes/RockDefault/rock-logo.png"",
		""AdultMaleNoPhoto"" : ""~/Assets/FamilymanagerThemes/RockDefault/photo-adult-male.png"",
		""AdultFemaleNoPhoto"" : ""~/Assets/FamilyManagerThemes/RockDefault/photo-adult-female.png"",
		""ChildMaleNoPhoto"" : ""~/Assets/FamilyManagerThemes/RockDefault/photo-child-male.png"",
		""ChildFemaleNoPhoto"" : ""~/Assets/FamilyManagerThemes/RockDefault/photo-child-female.png"",
		
		""TopHeaderBGColor"" : ""#282526FF"",
		""TopHeaderTextColor"" : ""#d3cec5FF"",
		
		""FooterBGColor"" : ""#c2b8a7FF"",
		""FooterTextColor"" : ""#847f77FF"",
	
		""SelectedPersonColor"" : ""#ee7624FF"",
		
		""LargeFontSize"" : ""18"",
		""MediumFontSize"" : ""20"",
		""SmallFontSize"" : ""14"",
				
		""DefaultButtonStyle"" :
		{
			""BackgroundColor"" : ""#d6d6d6FF"",
			""TextColor"" : ""#524c43FF"",
			""BorderColor"" : ""#c2b8a7FF"",
			""BorderWidth"" : ""1"",
			""CornerRadius"" : ""4""
		 },
		 ""PrimaryButtonStyle"" : 
		 {
		    ""BackgroundColor"" : ""#ee7624FF"",
			""TextColor"" : ""#FFFFFFFF"",
			""BorderColor"" : ""#ae4f0dff"",
			""BorderWidth"" : ""1"",
			""CornerRadius"" : ""4""
		 },
		 ""FamilyCellStyle"":
		 {
		    ""BackgroundColor"" : ""#00000000"",
			""AddFamilyButtonBGColor"" : ""#c2b8a7FF"",
			""AddFamilyButtonTextColor"" : ""#554e51FF"",
			""EntryBGColor"" : ""#c2b8a7FF"",
			""EntryTextColor"" : ""#554e51FF"",
		 },
		 ""ToggleStyle"" :
		 {
		    ""ActiveColor"" : ""#ee7624FF"",
			 ""InActiveColor"" : ""#777777FF"",
			 ""TextColor"" : ""#FFFFFFFF"",
			 ""CornerRadius"" : ""4""
		 },
		 ""DatePickerStyle"" :
		 {
			""BackgroundColor"" : ""#c2b8a7FF"",
			""TextColor"" : ""#3b3b3bFF"",
			""Size"" : ""22"",
			""Font"" : ""OpenSans-Regular""
		 },
		 ""LabelStyle"" :
		 {
		    ""TextColor"" : ""#6a6a6aFF"",
		 },
		 ""SwitchStyle"" :
		 {
		    ""OnColor"" : ""#FFFFFFFF""
		 },
		 ""TextFieldStyle"" :
		 {
		    ""TextColor"" : ""#555555FF"",
			""PlaceHolderColor"" : ""#AAAAAAFF"",
			""BorderColor"" : ""#ccccccFF"",
			""BorderWidth"" : ""1"",
			""CornerRadius"" : ""4"",
		 },
		 ""SearchResultStyle"":
		 {
		    ""BackgroundColor"" : ""#c2b8a7FF"",
			""TextColor"" : ""#3b3b3bFF""
		 }
	}
}");
        }
Example #21
0
        /// <summary>
        /// Operations to be performed during the upgrade process.
        /// </summary>
        public override void Up()
        {
            CreateTable(
                "dbo.FollowingEventNotification",
                c => new
            {
                Id = c.Int(nullable: false, identity: true),
                FollowingEventTypeId    = c.Int(nullable: false),
                EntityId                = c.Int(nullable: false),
                LastNotified            = c.DateTime(nullable: false),
                CreatedDateTime         = c.DateTime(),
                ModifiedDateTime        = c.DateTime(),
                CreatedByPersonAliasId  = c.Int(),
                ModifiedByPersonAliasId = c.Int(),
                Guid      = c.Guid(nullable: false),
                ForeignId = c.String(maxLength: 100),
            })
            .PrimaryKey(t => t.Id)
            .ForeignKey("dbo.PersonAlias", t => t.CreatedByPersonAliasId)
            .ForeignKey("dbo.FollowingEventType", t => t.FollowingEventTypeId, cascadeDelete: true)
            .ForeignKey("dbo.PersonAlias", t => t.ModifiedByPersonAliasId)
            .Index(t => t.FollowingEventTypeId)
            .Index(t => t.CreatedByPersonAliasId)
            .Index(t => t.ModifiedByPersonAliasId)
            .Index(t => t.Guid, unique: true)
            .Index(t => t.ForeignId);

            // Anniversary event
            RockMigrationHelper.UpdateEntityType("Rock.Follow.Event.PersonAnniversary", "17DFDE21-0C1E-426F-8516-4BBA9ED28385", false, true);
            RockMigrationHelper.UpdateEntityAttribute("Rock.Model.FollowingEventType", "Rock.Follow.Event.PersonAnniversary", "A75DFC58-7A1B-4799-BF31-451B2BBE38FF",
                                                      "Lead Days", "The number of days prior to birthday that notification should be sent.", 0, "5", "4E9F3547-5EF8-471E-A537-25846F26A00F");
            RockMigrationHelper.UpdateEntityAttribute("Rock.Model.FollowingEventType", "Rock.Follow.Event.PersonAnniversary", "A75DFC58-7A1B-4799-BF31-451B2BBE38FF",
                                                      "Nth Year", "Only be notified for anniversaries that are a multiple of this number (i.e. a value of 5 will notify you on the person's 5th, 10th, 15th, etc. anniversary).",
                                                      1, "5", "73A36175-E82E-4315-92FD-A58C1499232E");

            // Baptized event
            RockMigrationHelper.UpdateEntityType("Rock.Follow.Event.PersonBaptized", "A156E5A0-FEE8-4730-8AC7-B3239B35F9F2", false, true);
            RockMigrationHelper.UpdateEntityAttribute("Rock.Model.FollowingEventType", "Rock.Follow.Event.PersonBaptized", "A75DFC58-7A1B-4799-BF31-451B2BBE38FF",
                                                      "Max Days Back", "Maximum number of days back to consider", 0, "30", "F68163EC-73E8-4785-A7E9-A11CAD464D05");

            // First Attended Group Type event
            RockMigrationHelper.UpdateEntityType("Rock.Follow.Event.PersonFirstAttendedGroupType", "F74232DD-62B6-4F04-BF5F-9E5CF159CD8B", false, true);
            RockMigrationHelper.UpdateEntityAttribute("Rock.Model.FollowingEventType", "Rock.Follow.Event.PersonFirstAttendedGroupType", "18E29E23-B43B-4CF7-AE41-C85672C09F50",
                                                      "Group Type", "The group type to evaluate if person has just attended for the first time", 0, "", "5FB3A5E7-519A-4FE0-BCF4-237D94848950");
            RockMigrationHelper.UpdateEntityAttribute("Rock.Model.FollowingEventType", "Rock.Follow.Event.PersonFirstAttendedGroupType", "A75DFC58-7A1B-4799-BF31-451B2BBE38FF",
                                                      "Max Days Back", "Maximum number of days back to consider", 1, "30", "DBB890DA-BD04-4841-8D90-1F5BF8EAD805");

            // First Joined Group Type event
            RockMigrationHelper.UpdateEntityType("Rock.Follow.Event.PersonFirstJoinedGroupType", "4CDE3741-D284-4B32-9F8A-DFB63C600594", false, true);
            RockMigrationHelper.UpdateEntityAttribute("Rock.Model.FollowingEventType", "Rock.Follow.Event.PersonFirstJoinedGroupType", "18E29E23-B43B-4CF7-AE41-C85672C09F50",
                                                      "Group Type", "The group type to evaluate if person has just joined for the first time", 0, "", "BC421FBC-3D0E-4C87-A533-EF678D156516");
            RockMigrationHelper.UpdateEntityAttribute("Rock.Model.FollowingEventType", "Rock.Follow.Event.PersonFirstJoinedGroupType", "A75DFC58-7A1B-4799-BF31-451B2BBE38FF",
                                                      "MaxDaysBack", "Maximum number of days back to consider", 1, "30", "3C024CDE-3481-410E-8392-566B4F78CC4E");

            // In Group Together suggestion
            RockMigrationHelper.UpdateEntityAttribute("Rock.Model.FollowingSuggestionType", "Rock.Follow.Suggestion.InGroupTogether", "18E29E23-B43B-4CF7-AE41-C85672C09F50",
                                                      "Group Type", "The type of group.",
                                                      0, "", "AB754108-EB85-422B-A898-90C47495174A");
            RockMigrationHelper.UpdateEntityAttribute("Rock.Model.FollowingSuggestionType", "Rock.Follow.Suggestion.InGroupTogether", "F4399CEF-827B-48B2-A735-F7806FCFE8E8",
                                                      "Group (optional)", "A specific group to evaluate (Make sure to select group with same group type as above).",
                                                      1, "", "A2E16D4F-C86F-4269-ABEC-8E97AE678101", "Group");
            RockMigrationHelper.UpdateEntityAttribute("Rock.Model.FollowingSuggestionType", "Rock.Follow.Suggestion.InGroupTogether", "7BD25DC9-F34A-478D-BEF9-0C787F5D39B8",
                                                      "Security Role (optional)", "If specified, only people with this role will be be notified (Make sure to select same group type as above).",
                                                      2, "", "FC85D434-8AFF-4302-879B-0AF4AF7D6349", "SecurityRole");
            RockMigrationHelper.UpdateEntityAttribute("Rock.Model.FollowingSuggestionType", "Rock.Follow.Suggestion.InGroupTogether", "3BB25568-E793-4D12-AE80-AC3FDA6FD8A8",
                                                      "Follower Group Type (optional)", "If specified, only people with this role will be be notified (Make sure to select same group type as above).",
                                                      3, "", "4C538BAC-943D-4DBF-BB09-1842C2E40515", "FollowerGroupType");
            RockMigrationHelper.UpdateEntityAttribute("Rock.Model.FollowingSuggestionType", "Rock.Follow.Suggestion.InGroupTogether", "3BB25568-E793-4D12-AE80-AC3FDA6FD8A8",
                                                      "Followed Group Type (optional)", "If specified, only people with this role will be suggested to the follower (Make sure to select same group type as above).",
                                                      4, "", "8BC2A430-86E5-41AE-99CD-AD3586ED59E6", "FollowedGroupType");

            Sql(MigrationSQL._201508171751190_FollowingEventNotification);

            // MP: Admin Checklist Item for External Applications
            // delete the previous 'Update External Applications' checklist item since the v4 one replaces it
            RockMigrationHelper.DeleteDefinedValue("CC9B250C-859D-3899-4730-9C5EFAEC504C");
            RockMigrationHelper.AddDefinedValue("4BF34677-37E9-4E71-BD03-252B66C9373D", "Update External Applications", @"The following external applications have been updated in v4.0. You can download the installers under <span class=""navigation-tip"">Admins Tools > Power Tools > External Applications</span>.
<ul>
<li>Rock Check Scanner</li>
<li>Rock Statement Generator</li>
<li>Rock Job Scheduler Service</li>
<li>Rock Windows Check-in Client</li>
</ul>", "62A45DA7-8C68-4283-B9AA-2E1BE38610AF");
        }
Example #22
0
        /// <summary>
        /// Operations to be performed during the upgrade process.
        /// </summary>
        public override void Up()
        {
            RockMigrationHelper.UpdateEntityAttribute("Rock.Model.BinaryFile", "7525C4CB-EE6B-41D4-9B64-A08048D5A5C0", "BinaryFileTypeId", "1", "Print For Each", "When a family checks in, should this label be printed once per family, person, or location. Note: this only applys if check-in is configured to use Family check-in vs Individual check-in.", 1, "1", "733944B7-A0D5-41B4-94D4-DE007F72B6F0", "core_LabelType");
            RockMigrationHelper.UpdateAttributeQualifier("733944B7-A0D5-41B4-94D4-DE007F72B6F0", "fieldtype", "ddl", "D9313D93-A2AB-4FE9-B743-A376DEB3EE31");
            RockMigrationHelper.UpdateAttributeQualifier("733944B7-A0D5-41B4-94D4-DE007F72B6F0", "values", "0^Family,1^Person,2^Location", "E77DF4E6-A995-4C82-BBB7-DB57739D66F3");

            RockMigrationHelper.AddPage("CDF2C599-D341-42FD-B7DC-CD402EA96050", "66FA0143-F04C-4447-A67A-2A10A6BB1A2B", "Person Select (Family Check-in)", "", "D14154BA-2F2C-41C3-B380-F833252CBB13", "");   // Site:Rock Check-in
            RockMigrationHelper.AddPage("CDF2C599-D341-42FD-B7DC-CD402EA96050", "66FA0143-F04C-4447-A67A-2A10A6BB1A2B", "Time Select (Family Check-in)", "", "67BD09B0-0C6E-44E7-A8EB-0E71551F3E6B", "");     // Site:Rock Check-in
            RockMigrationHelper.AddPage("CDF2C599-D341-42FD-B7DC-CD402EA96050", "66FA0143-F04C-4447-A67A-2A10A6BB1A2B", "Save Attendance (Family Check-in)", "", "4AF7A0E1-E991-4AE5-A2B5-C440F67A2E6A", ""); // Site:Rock Check-in

            RockMigrationHelper.AddPageRoute("7B7207D0-B905-4836-800E-A24DDC6FE445", "checkin/{KioskId}/{CheckinConfigId}/{GroupTypeIds}");
            RockMigrationHelper.AddPageRoute("D14154BA-2F2C-41C3-B380-F833252CBB13", "checkin/people", "FC4747A0-E42B-4F5D-98A4-B94D393461AD");  // for Page:Person Select (Family Check-in)

            RockMigrationHelper.UpdateBlockType("Person Select (Family Check-in)", "Lists people who match the selected family and provides option of selecting multiple.", "~/Blocks/CheckIn/MultiPersonSelect.ascx", "Check-in", "92DCF018-F551-4890-8BA1-511D97BF6B8A");
            RockMigrationHelper.UpdateBlockType("Process Only", "Provides a page for simply launching a check-in workflow action", "~/Blocks/CheckIn/ProcessOnly.ascx", "Check-in", "F7B86942-9BF2-4132-B5EB-C7310952ECFF");

            // Add Block to Page: Person Select (Family Check-in), Site: Rock Check-in
            RockMigrationHelper.AddBlock("D14154BA-2F2C-41C3-B380-F833252CBB13", "", "92DCF018-F551-4890-8BA1-511D97BF6B8A", "Person Select", "Main", "", "", 0, "0F82C7EB-3E71-496F-B5F4-83F32AD5EBB5");
            // Add Block to Page: Time Select (Family Check-in), Site: Rock Check-in
            RockMigrationHelper.AddBlock("67BD09B0-0C6E-44E7-A8EB-0E71551F3E6B", "", "D2348D51-B13A-4069-97AD-369D9615A711", "Time Select", "Main", "", "", 0, "558C15C1-47F7-4232-A069-89463B17924F");
            // Add Block to Page: Save Attendance (Family Check-in), Site: Rock Check-in
            RockMigrationHelper.AddBlock("4AF7A0E1-E991-4AE5-A2B5-C440F67A2E6A", "", "F7B86942-9BF2-4132-B5EB-C7310952ECFF", "Process Only", "Main", "", "", 0, "887E090F-5468-44F0-BE84-9AE21D822987");
            // Add Block to Page: Person Select (Family Check-in), Site: Rock Check-in
            RockMigrationHelper.AddBlock("D14154BA-2F2C-41C3-B380-F833252CBB13", "", "49FC4B38-741E-4B0B-B395-7C1929340D88", "Idle Redirect", "Main", "", "", 1, "619DEBA2-B84A-48CF-95A4-BEEA047E830C");
            // Add Block to Page: Time Select (Family Check-in), Site: Rock Check-in
            RockMigrationHelper.AddBlock("67BD09B0-0C6E-44E7-A8EB-0E71551F3E6B", "", "49FC4B38-741E-4B0B-B395-7C1929340D88", "Idle Redirect", "Main", "", "", 1, "111609E5-EBCC-4B1A-992A-5B61A57327C1");
            // Add Block to Page: Save Attendance (Family Check-in), Site: Rock Check-in
            RockMigrationHelper.AddBlock("4AF7A0E1-E991-4AE5-A2B5-C440F67A2E6A", "", "49FC4B38-741E-4B0B-B395-7C1929340D88", "Idle Redirect", "Main", "", "", 1, "ACA84721-3048-4953-A3DB-34DAA598357C");

            // Attrib for BlockType: Administration:Enable Kiosk Match By Name
            RockMigrationHelper.UpdateBlockTypeAttribute("3B5FBE9A-2904-4220-92F3-47DD16E805C0", "1EDAFDED-DFE6-4334-B019-6EECBA89E05A", "Enable Kiosk Match By Name", "EnableReverseLookup", "", "Enable a kiosk match by computer name by doing reverseIP lookup to get computer name based on IP address", 8, @"False", "0E252443-86E1-4068-8B32-9943E0974C94");

            // Attrib for BlockType: Family Select:Next Page (Family Check-in)
            RockMigrationHelper.UpdateBlockTypeAttribute("6B050E12-A232-41F6-94C5-B190F4520607", "BD53F9C9-EBA9-4D3F-82EA-DE5DD34A8108", "Next Page (Family Check-in)", "FamilyNextPage", "", "", 5, @"", "1C9DAB1C-C2B3-421D-BB53-554C28F33B27");

            // Attrib for BlockType: Person Select (Family Check-in):Workflow Type
            RockMigrationHelper.UpdateBlockTypeAttribute("92DCF018-F551-4890-8BA1-511D97BF6B8A", "46A03F59-55D3-4ACE-ADD5-B4642225DD20", "Workflow Type", "WorkflowType", "", "The workflow type to activate for check-in", 0, @"", "C7ABDF19-09B1-4426-B409-CAA1BBB13A11");
            // Attrib for BlockType: Person Select (Family Check-in):Workflow Activity
            RockMigrationHelper.UpdateBlockTypeAttribute("92DCF018-F551-4890-8BA1-511D97BF6B8A", "9C204CD0-1233-41C5-818A-C5DA439445AA", "Workflow Activity", "WorkflowActivity", "", "The name of the workflow activity to run on selection.", 1, @"", "C1F2BA5A-5FA3-459E-A7C4-965BBCDF501D");
            // Attrib for BlockType: Person Select (Family Check-in):Home Page
            RockMigrationHelper.UpdateBlockTypeAttribute("92DCF018-F551-4890-8BA1-511D97BF6B8A", "BD53F9C9-EBA9-4D3F-82EA-DE5DD34A8108", "Home Page", "HomePage", "", "", 2, @"", "9E1DD40E-62F1-40BA-8BFD-2D2D4D8F00C6");
            // Attrib for BlockType: Person Select (Family Check-in):Previous Page
            RockMigrationHelper.UpdateBlockTypeAttribute("92DCF018-F551-4890-8BA1-511D97BF6B8A", "BD53F9C9-EBA9-4D3F-82EA-DE5DD34A8108", "Previous Page", "PreviousPage", "", "", 3, @"", "E9C55730-B5C4-4640-B8A0-86F10F9F1EE7");
            // Attrib for BlockType: Person Select (Family Check-in):Next Page
            RockMigrationHelper.UpdateBlockTypeAttribute("92DCF018-F551-4890-8BA1-511D97BF6B8A", "BD53F9C9-EBA9-4D3F-82EA-DE5DD34A8108", "Next Page", "NextPage", "", "", 4, @"", "DF2EC9E1-2499-4439-B926-A82CE950837D");

            // Attrib for BlockType: Ability Level Select:Repeat Page (Family Check-in)
            RockMigrationHelper.UpdateBlockTypeAttribute("605389F5-5BC5-438F-8757-110328B0CED3", "BD53F9C9-EBA9-4D3F-82EA-DE5DD34A8108", "Repeat Page (Family Check-in)", "FamilyRepeatPage", "", "The page to navigate back to if there are peopl or schedules already processed.", 3, @"", "B7A328EC-69EE-4472-8D5D-F6B5BEF271EE");
            // Attrib for BlockType: Ability Level Select:Previous Page (Family Check-in)
            RockMigrationHelper.UpdateBlockTypeAttribute("605389F5-5BC5-438F-8757-110328B0CED3", "BD53F9C9-EBA9-4D3F-82EA-DE5DD34A8108", "Previous Page (Family Check-in)", "FamilyPreviousPage", "", "The page to navigate back to if none of the people and schedules have been processed.", 4, @"", "3D24A4D2-90AF-4FDD-8CE2-7D1F9B76104B");

            // Attrib for BlockType: Group Type Select:Select All and Skip
            RockMigrationHelper.UpdateBlockTypeAttribute("7E20E97E-63F2-413D-9C2C-16FF34023F70", "1EDAFDED-DFE6-4334-B019-6EECBA89E05A", "Select All and Skip", "SelectAll", "", "Select this option if end-user should never see screen to select group types, all group types will automatically be selected and all the groups in all types will be available.", 5, @"False", "41AFF704-87A8-4282-80D0-B7C40983B549");

            // Attrib for BlockType: Location Select:Repeat Page (Family Check-in)
            RockMigrationHelper.UpdateBlockTypeAttribute("FFDBBAB5-78E1-4865-8A48-EF70DDC6B3F6", "BD53F9C9-EBA9-4D3F-82EA-DE5DD34A8108", "Repeat Page (Family Check-in)", "FamilyRepeatPage", "", "The page to navigate to if there are still more people or schedules to process.", 5, @"", "FDD6D619-028F-484C-A5FF-CB9B16D596CA");
            // Attrib for BlockType: Location Select:Next Page (Family Check-in)
            RockMigrationHelper.UpdateBlockTypeAttribute("FFDBBAB5-78E1-4865-8A48-EF70DDC6B3F6", "BD53F9C9-EBA9-4D3F-82EA-DE5DD34A8108", "Next Page (Family Check-in)", "FamilyNextPage", "", "The page to navigate to if all people and schedules have been processed.", 6, @"", "BA3A2508-4AEF-44B6-895C-899D5AB2E378");

            // Attrib for BlockType: Location Select:Workflow Type
            RockMigrationHelper.UpdateBlockTypeAttribute("F7B86942-9BF2-4132-B5EB-C7310952ECFF", "46A03F59-55D3-4ACE-ADD5-B4642225DD20", "Workflow Type", "WorkflowType", "", "The workflow type to activate for check-in", 0, @"", "BA9AD11A-DB90-4BF6-ACDA-6FFB56C0358A");
            // Attrib for BlockType: Process Only:Workflow Activity
            RockMigrationHelper.UpdateBlockTypeAttribute("F7B86942-9BF2-4132-B5EB-C7310952ECFF", "9C204CD0-1233-41C5-818A-C5DA439445AA", "Workflow Activity", "WorkflowActivity", "", "The name of the workflow activity to run on selection.", 1, @"", "21715BAA-59CE-41F7-8D7B-925C8DB4F3DD");
            // Attrib for BlockType: Process Only:Home Page
            RockMigrationHelper.UpdateBlockTypeAttribute("F7B86942-9BF2-4132-B5EB-C7310952ECFF", "BD53F9C9-EBA9-4D3F-82EA-DE5DD34A8108", "Home Page", "HomePage", "", "", 2, @"", "44646AA4-0E73-4AE2-B456-B2F7E9C96BAE");
            // Attrib for BlockType: Process Only:Previous Page
            RockMigrationHelper.UpdateBlockTypeAttribute("F7B86942-9BF2-4132-B5EB-C7310952ECFF", "BD53F9C9-EBA9-4D3F-82EA-DE5DD34A8108", "Previous Page", "PreviousPage", "", "", 3, @"", "0320C949-F06B-49FF-A9E1-F686CB14841C");
            // Attrib for BlockType: Process Only:Next Page
            RockMigrationHelper.UpdateBlockTypeAttribute("F7B86942-9BF2-4132-B5EB-C7310952ECFF", "BD53F9C9-EBA9-4D3F-82EA-DE5DD34A8108", "Next Page", "NextPage", "", "", 4, @"", "BA7AB351-CF98-4846-90C2-62F5EE8D799C");

            // Attrib for BlockType: Success:Workflow Activity
            RockMigrationHelper.UpdateBlockTypeAttribute("18911F1B-294E-48D6-9E6B-0F72BF6C9491", "9C204CD0-1233-41C5-818A-C5DA439445AA", "Workflow Activity", "WorkflowActivity", "", "The name of the workflow activity to run on selection.", 1, @"", "185504E0-2E80-434D-8E95-EEA3D38D92F0");

            // Attrib Value for Block:Family Select, Attribute:Next Page (Family Check-in) Page: Family Select, Site: Rock Check-in
            RockMigrationHelper.AddBlockAttributeValue("CD97D61E-7BCE-436B-ACDD-4383EB7490BA", "1C9DAB1C-C2B3-421D-BB53-554C28F33B27", @"d14154ba-2f2c-41c3-b380-f833252cbb13,fc4747a0-e42b-4f5d-98a4-b94d393461ad");

            // Attrib Value for Block:Person Select, Attribute:Workflow Type Page: Person Select (Family Check-in), Site: Rock Check-in
            RockMigrationHelper.AddBlockAttributeValue("0F82C7EB-3E71-496F-B5F4-83F32AD5EBB5", "C7ABDF19-09B1-4426-B409-CAA1BBB13A11", @"011e9f5a-60d4-4ff5-912a-290881e37eaf");
            // Attrib Value for Block:Person Select, Attribute:Workflow Activity Page: Person Select (Family Check-in), Site: Rock Check-in
            RockMigrationHelper.AddBlockAttributeValue("0F82C7EB-3E71-496F-B5F4-83F32AD5EBB5", "C1F2BA5A-5FA3-459E-A7C4-965BBCDF501D", @"Load Schedules");
            // Attrib Value for Block:Person Select, Attribute:Home Page Page: Person Select (Family Check-in), Site: Rock Check-in
            RockMigrationHelper.AddBlockAttributeValue("0F82C7EB-3E71-496F-B5F4-83F32AD5EBB5", "9E1DD40E-62F1-40BA-8BFD-2D2D4D8F00C6", @"432b615a-75ff-4b14-9c99-3e769f866950");
            // Attrib Value for Block:Person Select, Attribute:Previous Page Page: Person Select (Family Check-in), Site: Rock Check-in
            RockMigrationHelper.AddBlockAttributeValue("0F82C7EB-3E71-496F-B5F4-83F32AD5EBB5", "E9C55730-B5C4-4640-B8A0-86F10F9F1EE7", @"10c97379-f719-4acb-b8c6-651957b660a4");
            // Attrib Value for Block:Person Select, Attribute:Next Page Page: Person Select (Family Check-in), Site: Rock Check-in
            RockMigrationHelper.AddBlockAttributeValue("0F82C7EB-3E71-496F-B5F4-83F32AD5EBB5", "DF2EC9E1-2499-4439-B926-A82CE950837D", @"67bd09b0-0c6e-44e7-a8eb-0e71551f3e6b");

            // Attrib Value for Block:Ability Level Select, Attribute:Repeat Page (Family Check-in) Page: Ability Select, Site: Rock Check-in
            RockMigrationHelper.AddBlockAttributeValue("C175A9ED-612E-4B25-BED4-CF713D922179", "B7A328EC-69EE-4472-8D5D-F6B5BEF271EE", @"043bb717-5799-446f-b8da-30e575110b0c");
            // Attrib Value for Block:Ability Level Select, Attribute:Previous Page (Family Check-in) Page: Ability Select, Site: Rock Check-in
            RockMigrationHelper.AddBlockAttributeValue("C175A9ED-612E-4B25-BED4-CF713D922179", "3D24A4D2-90AF-4FDD-8CE2-7D1F9B76104B", @"d14154ba-2f2c-41c3-b380-f833252cbb13");

            // Attrib Value for Block:Location Select, Attribute:Repeat Page (Family Check-in) Page: Location Select, Site: Rock Check-in
            RockMigrationHelper.AddBlockAttributeValue("9D876B07-DF35-4355-85B0-638F65C367C4", "FDD6D619-028F-484C-A5FF-CB9B16D596CA", @"a1cbdaa4-94dd-4156-8260-5a3781e39fd0");
            // Attrib Value for Block:Location Select, Attribute:Next Page (Family Check-in) Page: Location Select, Site: Rock Check-in
            RockMigrationHelper.AddBlockAttributeValue("9D876B07-DF35-4355-85B0-638F65C367C4", "BA3A2508-4AEF-44B6-895C-899D5AB2E378", @"4af7a0e1-e991-4ae5-a2b5-c440f67a2e6a");

            // Attrib Value for Block:Process Only, Attribute:Workflow Type Page: Save Attendance (Family Check-in), Site: Rock Check-in
            RockMigrationHelper.AddBlockAttributeValue("887E090F-5468-44F0-BE84-9AE21D822987", "BA9AD11A-DB90-4BF6-ACDA-6FFB56C0358A", @"011e9f5a-60d4-4ff5-912a-290881e37eaf");
            // Attrib Value for Block:Process Only, Attribute:Workflow Activity Page: Save Attendance (Family Check-in), Site: Rock Check-in
            RockMigrationHelper.AddBlockAttributeValue("887E090F-5468-44F0-BE84-9AE21D822987", "21715BAA-59CE-41F7-8D7B-925C8DB4F3DD", @"Save Attendance");
            // Attrib Value for Block:Process Only, Attribute:Home Page Page: Save Attendance (Family Check-in), Site: Rock Check-in
            RockMigrationHelper.AddBlockAttributeValue("887E090F-5468-44F0-BE84-9AE21D822987", "44646AA4-0E73-4AE2-B456-B2F7E9C96BAE", @"432b615a-75ff-4b14-9c99-3e769f866950");
            // Attrib Value for Block:Process Only, Attribute:Previous Page Page: Save Attendance (Family Check-in), Site: Rock Check-in
            RockMigrationHelper.AddBlockAttributeValue("887E090F-5468-44F0-BE84-9AE21D822987", "0320C949-F06B-49FF-A9E1-F686CB14841C", @"043bb717-5799-446f-b8da-30e575110b0c");
            // Attrib Value for Block:Process Only, Attribute:Next Page Page: Save Attendance (Family Check-in), Site: Rock Check-in
            RockMigrationHelper.AddBlockAttributeValue("887E090F-5468-44F0-BE84-9AE21D822987", "BA7AB351-CF98-4846-90C2-62F5EE8D799C", @"e08230b8-35a4-40d6-a0bb-521418314da9");

            // Attrib Value for Block:Time Select, Attribute:Workflow Type Page: Time Select (Family Check-in), Site: Rock Check-in
            RockMigrationHelper.AddBlockAttributeValue("558C15C1-47F7-4232-A069-89463B17924F", "108E2E9E-DC18-4D5D-80FA-5D4A90FFCE65", @"011e9f5a-60d4-4ff5-912a-290881e37eaf");
            // Attrib Value for Block:Time Select, Attribute:Workflow Activity Page: Time Select (Family Check-in), Site: Rock Check-in
            RockMigrationHelper.AddBlockAttributeValue("558C15C1-47F7-4232-A069-89463B17924F", "12DF930E-6460-4A66-9326-E39BEAFC6F9D", @"Schedule Select");
            // Attrib Value for Block:Time Select, Attribute:Home Page Page: Time Select (Family Check-in), Site: Rock Check-in
            RockMigrationHelper.AddBlockAttributeValue("558C15C1-47F7-4232-A069-89463B17924F", "D5AFB471-3EE2-44D5-BC66-F4EFD26FD394", @"432b615a-75ff-4b14-9c99-3e769f866950");
            // Attrib Value for Block:Time Select, Attribute:Previous Page Page: Time Select (Family Check-in), Site: Rock Check-in
            RockMigrationHelper.AddBlockAttributeValue("558C15C1-47F7-4232-A069-89463B17924F", "DE808D50-0861-4E24-A483-F1C74C1FFDE8", @"d14154ba-2f2c-41c3-b380-f833252cbb13");
            // Attrib Value for Block:Time Select, Attribute:Next Page Page: Time Select (Family Check-in), Site: Rock Check-in
            RockMigrationHelper.AddBlockAttributeValue("558C15C1-47F7-4232-A069-89463B17924F", "840898DB-A9AB-45C9-9894-0A1E816EFC4C", @"a1cbdaa4-94dd-4156-8260-5a3781e39fd0");

            // Attrib Value for Block:Idle Redirect, Attribute:Idle Seconds Page: Person Select (Family Check-in), Site: Rock Check-in
            RockMigrationHelper.AddBlockAttributeValue("619DEBA2-B84A-48CF-95A4-BEEA047E830C", "1CAC7B16-041A-4F40-8AEE-A39DFA076C14", @"20");
            // Attrib Value for Block:Idle Redirect, Attribute:New Location Page: Person Select (Family Check-in), Site: Rock Check-in
            RockMigrationHelper.AddBlockAttributeValue("619DEBA2-B84A-48CF-95A4-BEEA047E830C", "2254B67B-9CB1-47DE-A63D-D0B56051ECD4", @"/checkin/welcome");

            // Attrib Value for Block:Idle Redirect, Attribute:Idle Seconds Page: Time Select (Family Check-in), Site: Rock Check-in
            RockMigrationHelper.AddBlockAttributeValue("111609E5-EBCC-4B1A-992A-5B61A57327C1", "1CAC7B16-041A-4F40-8AEE-A39DFA076C14", @"20");
            // Attrib Value for Block:Idle Redirect, Attribute:New Location Page: Time Select (Family Check-in), Site: Rock Check-in
            RockMigrationHelper.AddBlockAttributeValue("111609E5-EBCC-4B1A-992A-5B61A57327C1", "2254B67B-9CB1-47DE-A63D-D0B56051ECD4", @"/checkin/welcome");

            // Attrib Value for Block:Idle Redirect, Attribute:Idle Seconds Page: Save Attendance (Family Check-in), Site: Rock Check-in
            RockMigrationHelper.AddBlockAttributeValue("ACA84721-3048-4953-A3DB-34DAA598357C", "1CAC7B16-041A-4F40-8AEE-A39DFA076C14", @"20");
            // Attrib Value for Block:Idle Redirect, Attribute:New Location Page: Save Attendance (Family Check-in), Site: Rock Check-in
            RockMigrationHelper.AddBlockAttributeValue("ACA84721-3048-4953-A3DB-34DAA598357C", "2254B67B-9CB1-47DE-A63D-D0B56051ECD4", @"/checkin/welcome");

            //**********************
            //* New Action Types
            //**********************

            // Filter Locations By Schedule
            RockMigrationHelper.UpdateEntityType("Rock.Workflow.Action.CheckIn.FilterLocationsBySchedule", "DC86310C-44CF-44F5-804E-5085A29F5AAE", false, true);
            RockMigrationHelper.UpdateWorkflowActionEntityAttribute("DC86310C-44CF-44F5-804E-5085A29F5AAE", "1EDAFDED-DFE6-4334-B019-6EECBA89E05A", "Active", "Active", "Should Service be used?", 0, @"False", "5E590D32-9101-457D-9296-4FED6EA992F4");                                                                                // Rock.Workflow.Action.CheckIn.FilterLocationsBySchedule:Active
            RockMigrationHelper.UpdateWorkflowActionEntityAttribute("DC86310C-44CF-44F5-804E-5085A29F5AAE", "1EDAFDED-DFE6-4334-B019-6EECBA89E05A", "Remove", "Remove", "Select 'Yes' if schedules should be be removed.  Select 'No' if they should just be marked as excluded.", 0, @"True", "4C6ACFAD-F94B-43F7-AA7C-FEF48EFAA79C"); // Rock.Workflow.Action.CheckIn.FilterLocationsBySchedule:Remove
            RockMigrationHelper.UpdateWorkflowActionEntityAttribute("DC86310C-44CF-44F5-804E-5085A29F5AAE", "A75DFC58-7A1B-4799-BF31-451B2BBE38FF", "Order", "Order", "The order that this service should be used (priority)", 0, @"", "874AC9A3-CA6D-4C1F-8CCA-BCB7BFC74C19");                                                         // Rock.Workflow.Action.CheckIn.FilterLocationsBySchedule:Order

            // Filter Locations By Threshold
            RockMigrationHelper.UpdateEntityType("Rock.Workflow.Action.CheckIn.FilterLocationsByThreshold", "EB9E5114-D86D-49CF-89A1-6EF52428AD2E", false, true);
            RockMigrationHelper.UpdateWorkflowActionEntityAttribute("EB9E5114-D86D-49CF-89A1-6EF52428AD2E", "1EDAFDED-DFE6-4334-B019-6EECBA89E05A", "Active", "Active", "Should Service be used?", 0, @"False", "62AACC4A-E976-43F5-8828-A8D2D1AC5D1B");                                                                                // Rock.Workflow.Action.CheckIn.FilterLocationsByThreshold:Active
            RockMigrationHelper.UpdateWorkflowActionEntityAttribute("EB9E5114-D86D-49CF-89A1-6EF52428AD2E", "1EDAFDED-DFE6-4334-B019-6EECBA89E05A", "Remove", "Remove", "Select 'Yes' if locations should be be removed.  Select 'No' if they should just be marked as excluded.", 0, @"True", "097966C4-8FE0-4464-A340-C3E78B0D3693"); // Rock.Workflow.Action.CheckIn.FilterLocationsByThreshold:Remove
            RockMigrationHelper.UpdateWorkflowActionEntityAttribute("EB9E5114-D86D-49CF-89A1-6EF52428AD2E", "A75DFC58-7A1B-4799-BF31-451B2BBE38FF", "Order", "Order", "The order that this service should be used (priority)", 0, @"", "3C6C2ABA-8705-4674-9BB5-F07AEBC38EDC");                                                         // Rock.Workflow.Action.CheckIn.FilterLocationsByThreshold:Order

            // PreSelect Recent Attendance
            RockMigrationHelper.UpdateEntityType("Rock.Workflow.Action.CheckIn.PreSelectRecentAttendance", "23C1D3FA-4F16-4AF6-9528-04C7C52F5C2A", false, true);
            RockMigrationHelper.UpdateWorkflowActionEntityAttribute("23C1D3FA-4F16-4AF6-9528-04C7C52F5C2A", "1EDAFDED-DFE6-4334-B019-6EECBA89E05A", "Active", "Active", "Should Service be used?", 0, @"False", "6AB918C5-5515-42A9-A54F-160E3C239710");                        // Rock.Workflow.Action.CheckIn.PreSelectRecentAttendance:Active
            RockMigrationHelper.UpdateWorkflowActionEntityAttribute("23C1D3FA-4F16-4AF6-9528-04C7C52F5C2A", "A75DFC58-7A1B-4799-BF31-451B2BBE38FF", "Order", "Order", "The order that this service should be used (priority)", 0, @"", "B3A0641C-65B3-43AF-9BD5-AC62A72C5798"); // Rock.Workflow.Action.CheckIn.PreSelectRecentAttendance:Order

            // Remove Empty Locations
            RockMigrationHelper.UpdateEntityType("Rock.Workflow.Action.CheckIn.RemoveEmptyLocations", "51AE2690-ED00-423D-86AD-6E97054F04A9", false, true);
            RockMigrationHelper.UpdateWorkflowActionEntityAttribute("51AE2690-ED00-423D-86AD-6E97054F04A9", "1EDAFDED-DFE6-4334-B019-6EECBA89E05A", "Active", "Active", "Should Service be used?", 0, @"False", "5E8DBE2C-DD06-43C1-A587-3F3DA4423964");                        // Rock.Workflow.Action.CheckIn.RemoveEmptyLocations:Active
            RockMigrationHelper.UpdateWorkflowActionEntityAttribute("51AE2690-ED00-423D-86AD-6E97054F04A9", "A75DFC58-7A1B-4799-BF31-451B2BBE38FF", "Order", "Order", "The order that this service should be used (priority)", 0, @"", "9CA7DD25-422D-4859-B8B4-C2A44293D485"); // Rock.Workflow.Action.CheckIn.RemoveEmptyLocations:Order

            // Set Available Schedules
            RockMigrationHelper.UpdateEntityType("Rock.Workflow.Action.CheckIn.SetAvailableSchedules", "0F16E0C5-825A-4058-8285-6370DAAC2C19", false, true);
            RockMigrationHelper.UpdateWorkflowActionEntityAttribute("0F16E0C5-825A-4058-8285-6370DAAC2C19", "1EDAFDED-DFE6-4334-B019-6EECBA89E05A", "Active", "Active", "Should Service be used?", 0, @"False", "DE072E28-C3B5-42A0-B12F-A0D8BE8F6975");                        // Rock.Workflow.Action.CheckIn.SetAvailableSchedules:Active
            RockMigrationHelper.UpdateWorkflowActionEntityAttribute("0F16E0C5-825A-4058-8285-6370DAAC2C19", "A75DFC58-7A1B-4799-BF31-451B2BBE38FF", "Order", "Order", "The order that this service should be used (priority)", 0, @"", "B6256274-8971-4DA2-9144-ED732B46EC5B"); // Rock.Workflow.Action.CheckIn.SetAvailableSchedules:Order

            //**********************
            //* Workflow Config
            //**********************

            // Person Search
            RockMigrationHelper.AddActionTypeAttributeValue("BB45E6E1-C39A-42A2-B988-490382DB7977", "0A6737BD-739A-4803-A3B9-5AD23AF70106", @"True");                                                                                                                                       // Unattended Check-in:Person Search:Filter Groups by Age:Remove

            RockMigrationHelper.UpdateWorkflowActionType("EB744DF1-E454-482C-B111-80A54EF8A674", "Filter Locations by Threshold", 99, "EB9E5114-D86D-49CF-89A1-6EF52428AD2E", true, false, "", "66EF6CB1-1A96-2F81-4534-3BCA5C33D4CD", 1, "False", "6A4E09F0-7AAF-441A-AAD7-BFEA7AF08A6A"); // Unattended Check-in:Person Search:Filter Locations by Threshold
            RockMigrationHelper.AddActionTypeAttributeValue("6A4E09F0-7AAF-441A-AAD7-BFEA7AF08A6A", "62AACC4A-E976-43F5-8828-A8D2D1AC5D1B", @"False");                                                                                                                                      // Unattended Check-in:Person Search:Filter Locations by Threshold:Active
            RockMigrationHelper.AddActionTypeAttributeValue("6A4E09F0-7AAF-441A-AAD7-BFEA7AF08A6A", "097966C4-8FE0-4464-A340-C3E78B0D3693", @"True");                                                                                                                                       // Unattended Check-in:Person Search:Filter Locations by Threshold:Remove
            RockMigrationHelper.AddActionTypeAttributeValue("6A4E09F0-7AAF-441A-AAD7-BFEA7AF08A6A", "3C6C2ABA-8705-4674-9BB5-F07AEBC38EDC", @"");                                                                                                                                           // Unattended Check-in:Person Search:Filter Locations by Threshold:Order

            RockMigrationHelper.UpdateWorkflowActionType("EB744DF1-E454-482C-B111-80A54EF8A674", "Set Available Schedules", 99, "0F16E0C5-825A-4058-8285-6370DAAC2C19", true, false, "", "", 1, "", "79CB608D-ED25-4526-A0F5-132D13642CDA");                                                // Unattended Check-in:Person Search:Set Available Schedules
            RockMigrationHelper.AddActionTypeAttributeValue("79CB608D-ED25-4526-A0F5-132D13642CDA", "B6256274-8971-4DA2-9144-ED732B46EC5B", @"");                                                                                                                                           // Unattended Check-in:Person Search:Set Available Schedules:Order
            RockMigrationHelper.AddActionTypeAttributeValue("79CB608D-ED25-4526-A0F5-132D13642CDA", "DE072E28-C3B5-42A0-B12F-A0D8BE8F6975", @"False");                                                                                                                                      // Unattended Check-in:Person Search:Set Available Schedules:Active

            RockMigrationHelper.UpdateWorkflowActionType("EB744DF1-E454-482C-B111-80A54EF8A674", "Preselect Recent Attendees", 99, "23C1D3FA-4F16-4AF6-9528-04C7C52F5C2A", true, false, "", "", 1, "", "08D15C7A-4421-420A-BCA8-D6EE532E659F");                                             // Unattended Check-in:Person Search:Preselect Recent Attendees
            RockMigrationHelper.AddActionTypeAttributeValue("08D15C7A-4421-420A-BCA8-D6EE532E659F", "B3A0641C-65B3-43AF-9BD5-AC62A72C5798", @"");                                                                                                                                           // Unattended Check-in:Person Search:Preselect Recent Attendees:Order
            RockMigrationHelper.AddActionTypeAttributeValue("08D15C7A-4421-420A-BCA8-D6EE532E659F", "6AB918C5-5515-42A9-A54F-160E3C239710", @"False");                                                                                                                                      // Unattended Check-in:Person Search:Preselect Recent Attendees:Active

            // Ability Level Search
            RockMigrationHelper.UpdateWorkflowActionType("0E2F5EBA-2204-4C2F-845A-92C25AB67474", "Set Available Schedules", 99, "0F16E0C5-825A-4058-8285-6370DAAC2C19", true, false, "", "", 1, "", "902931D2-6326-4A6A-967C-C9F65F8C1386"); // Unattended Check-in:Ability Level Search:Set Available Schedules
            RockMigrationHelper.AddActionTypeAttributeValue("902931D2-6326-4A6A-967C-C9F65F8C1386", "B6256274-8971-4DA2-9144-ED732B46EC5B", @"");                                                                                            // Unattended Check-in:Ability Level Search:Set Available Schedules:Order
            RockMigrationHelper.AddActionTypeAttributeValue("902931D2-6326-4A6A-967C-C9F65F8C1386", "DE072E28-C3B5-42A0-B12F-A0D8BE8F6975", @"False");                                                                                       // Unattended Check-in:Ability Level Search:Set Available Schedules:Active

            // Load Schedules
            RockMigrationHelper.UpdateWorkflowActivityType("011E9F5A-60D4-4FF5-912A-290881E37EAF", true, "Load Schedules", "Loads schedules for Family Check-In", false, 6, "118F4E64-BF2D-484C-BB7D-15CF25066173");               // Unattended Check-in:Load Schedules

            RockMigrationHelper.UpdateWorkflowActionType("118F4E64-BF2D-484C-BB7D-15CF25066173", "Load Schedules", 0, "24A7E196-B50B-4BD6-A347-07CFC5ABEF9E", true, false, "", "", 1, "", "992CDCED-02C8-4624-9C69-D7483713BA4A"); // Unattended Check-in:Load Schedules:Load Schedules
            RockMigrationHelper.AddActionTypeAttributeValue("992CDCED-02C8-4624-9C69-D7483713BA4A", "B222CAF2-DF12-433C-B5D4-A8DB95B60207", @"True");                                                                              // Unattended Check-in:Load Schedules:Load Schedules:Load All
            RockMigrationHelper.AddActionTypeAttributeValue("992CDCED-02C8-4624-9C69-D7483713BA4A", "19CB6600-7BEB-43BA-A17E-CA7E8466D93B", @"");                                                                                  // Unattended Check-in:Load Schedules:Load Schedules:Order
            RockMigrationHelper.AddActionTypeAttributeValue("992CDCED-02C8-4624-9C69-D7483713BA4A", "7BFA61E2-2FBB-4ADE-A6B0-38E8C0D1EB61", @"False");                                                                             // Unattended Check-in:Load Schedules:Load Schedules:Active

            // Schedule Select
            RockMigrationHelper.UpdateWorkflowActivityType("011E9F5A-60D4-4FF5-912A-290881E37EAF", true, "Schedule Select", "Filters the locations, groups, and group types by the selected schedule(s) in Family Check-In", false, 7, "5D86DC3F-D56A-49D7-B6CC-5ED2B7E59A93"); // Unattended Check-in:Schedule Select

            RockMigrationHelper.UpdateWorkflowActionType("5D86DC3F-D56A-49D7-B6CC-5ED2B7E59A93", "Filter Locations By Schedule", 0, "DC86310C-44CF-44F5-804E-5085A29F5AAE", true, false, "", "", 1, "", "9C80AED6-23F7-485F-ACCA-DB3F722E6F16");                                // Unattended Check-in:Schedule Select:Filter Locations By Schedule
            RockMigrationHelper.AddActionTypeAttributeValue("9C80AED6-23F7-485F-ACCA-DB3F722E6F16", "4C6ACFAD-F94B-43F7-AA7C-FEF48EFAA79C", @"False");                                                                                                                          // Unattended Check-in:Schedule Select:Filter Locations By Schedule:Remove
            RockMigrationHelper.AddActionTypeAttributeValue("9C80AED6-23F7-485F-ACCA-DB3F722E6F16", "874AC9A3-CA6D-4C1F-8CCA-BCB7BFC74C19", @"");                                                                                                                               // Unattended Check-in:Schedule Select:Filter Locations By Schedule:Order
            RockMigrationHelper.AddActionTypeAttributeValue("9C80AED6-23F7-485F-ACCA-DB3F722E6F16", "5E590D32-9101-457D-9296-4FED6EA992F4", @"False");                                                                                                                          // Unattended Check-in:Schedule Select:Filter Locations By Schedule:Active

            RockMigrationHelper.UpdateWorkflowActionType("5D86DC3F-D56A-49D7-B6CC-5ED2B7E59A93", "Remove Empty Locations", 1, "51AE2690-ED00-423D-86AD-6E97054F04A9", true, false, "", "", 1, "", "0E02BD35-17EA-430E-BA61-A227FC4FC535");                                      // Unattended Check-in:Schedule Select:Remove Empty Locations
            RockMigrationHelper.AddActionTypeAttributeValue("0E02BD35-17EA-430E-BA61-A227FC4FC535", "9CA7DD25-422D-4859-B8B4-C2A44293D485", @"");                                                                                                                               // Unattended Check-in:Schedule Select:Remove Empty Locations:Order
            RockMigrationHelper.AddActionTypeAttributeValue("0E02BD35-17EA-430E-BA61-A227FC4FC535", "5E8DBE2C-DD06-43C1-A587-3F3DA4423964", @"False");                                                                                                                          // Unattended Check-in:Schedule Select:Remove Empty Locations:Active

            RockMigrationHelper.UpdateWorkflowActionType("5D86DC3F-D56A-49D7-B6CC-5ED2B7E59A93", "Remove Empty Groups", 2, "698115D4-7B5E-48F3-BBB0-C53A20193169", true, false, "", "", 1, "", "D335782D-3D07-497D-944D-6CC0414C06A8");                                         // Unattended Check-in:Schedule Select:Remove Empty Groups
            RockMigrationHelper.AddActionTypeAttributeValue("D335782D-3D07-497D-944D-6CC0414C06A8", "88D9EED1-BFDF-4D31-A25E-0C52EBBF55A3", @"");                                                                                                                               // Unattended Check-in:Schedule Select:Remove Empty Groups:Order
            RockMigrationHelper.AddActionTypeAttributeValue("D335782D-3D07-497D-944D-6CC0414C06A8", "2122F250-222A-45A5-8E76-EE9AA3633DC5", @"False");                                                                                                                          // Unattended Check-in:Schedule Select:Remove Empty Groups:Active

            RockMigrationHelper.UpdateWorkflowActionType("5D86DC3F-D56A-49D7-B6CC-5ED2B7E59A93", "Remove Empty Group Types", 3, "E998B9A7-31C9-46F6-B91C-4E5C3F06C82F", true, false, "", "", 1, "", "F6CA869D-732B-4E98-A790-7314756CDF44");                                    // Unattended Check-in:Schedule Select:Remove Empty Group Types
            RockMigrationHelper.AddActionTypeAttributeValue("F6CA869D-732B-4E98-A790-7314756CDF44", "9B76E1C8-D562-4ED9-842B-11ADF06EB70B", @"");                                                                                                                               // Unattended Check-in:Schedule Select:Remove Empty Group Types:Order
            RockMigrationHelper.AddActionTypeAttributeValue("F6CA869D-732B-4E98-A790-7314756CDF44", "7461AAF6-E4DA-4052-BCA5-D25386CA65C5", @"False");                                                                                                                          // Unattended Check-in:Schedule Select:Remove Empty Group Types:Active

            RockMigrationHelper.UpdateWorkflowActionType("5D86DC3F-D56A-49D7-B6CC-5ED2B7E59A93", "Set Available Schedules", 4, "0F16E0C5-825A-4058-8285-6370DAAC2C19", true, false, "", "", 1, "", "83D1D8BB-08FB-480C-AA6E-5C4BD527CA54");                                     // Unattended Check-in:Schedule Select:Set Available Schedules
            RockMigrationHelper.AddActionTypeAttributeValue("83D1D8BB-08FB-480C-AA6E-5C4BD527CA54", "B6256274-8971-4DA2-9144-ED732B46EC5B", @"");                                                                                                                               // Unattended Check-in:Schedule Select:Set Available Schedules:Order
            RockMigrationHelper.AddActionTypeAttributeValue("83D1D8BB-08FB-480C-AA6E-5C4BD527CA54", "DE072E28-C3B5-42A0-B12F-A0D8BE8F6975", @"False");                                                                                                                          // Unattended Check-in:Schedule Select:Set Available Schedules:Active

            RockMigrationHelper.UpdateEntityAttribute("Rock.Model.BinaryFile", "7525C4CB-EE6B-41D4-9B64-A08048D5A5C0", "BinaryFileTypeId", "1", "Print For Each", "When a family checks in, should this label be printed once per family, person, or location. Note: this only applys if check-in is configured to use Family check-in vs Individual check-in.", 1, "1", "733944B7-A0D5-41B4-94D4-DE007F72B6F0", "core_LabelType");
            RockMigrationHelper.UpdateAttributeQualifier("733944B7-A0D5-41B4-94D4-DE007F72B6F0", "fieldtype", "ddl", "D9313D93-A2AB-4FE9-B743-A376DEB3EE31");
            RockMigrationHelper.UpdateAttributeQualifier("733944B7-A0D5-41B4-94D4-DE007F72B6F0", "values", "0^Family,1^Person,2^Location", "E77DF4E6-A995-4C82-BBB7-DB57739D66F3");

            RockMigrationHelper.AddDefinedValue("E4D289A9-70FA-4381-913E-2A757AD11147", "Current Day/Date", "Displays The Current Day and Date", "23502286-D921-4455-BABC-D8D6CB8FFB3D", false);
            RockMigrationHelper.AddDefinedValue("E4D289A9-70FA-4381-913E-2A757AD11147", "Codes And Ages (Even)", "Displays the codes and ages for the second, fourth, etc. person checked in using Family Check-in", "5B11A934-0398-429F-9A91-F727153392E7", false);
            RockMigrationHelper.AddDefinedValue("E4D289A9-70FA-4381-913E-2A757AD11147", "Codes And Ages (Odd)", "Displays the codes and ages for the first, third, etc. person checked in using Family Check-in", "170207B6-9218-4E6E-8ADA-661521E80E5E", false);
            RockMigrationHelper.AddDefinedValue("E4D289A9-70FA-4381-913E-2A757AD11147", "Name and Code (Even)", "Displays the name and security code for the second, fourth, etc. person who checked in during family check-in.", "3DCF76E8-866C-4EC9-B1FB-552691A8B440", false);
            RockMigrationHelper.AddDefinedValue("E4D289A9-70FA-4381-913E-2A757AD11147", "Name and Code (Odd)", "Displays the name and security code for the first, third, etc. person who checked in during family check-in.", "1FAA4DAC-5240-486E-A23F-2A47D7F36F31", false);
            RockMigrationHelper.AddDefinedValue("E4D289A9-70FA-4381-913E-2A757AD11147", "Person Locations and Times", "The locations and times that person checked into", "08882D9E-4D49-4D1E-94D2-7E5CF64A570D", false);
            RockMigrationHelper.AddDefinedValue("E4D289A9-70FA-4381-913E-2A757AD11147", "Location and Times", "The name and times for a specific location that person checked into", "B407E2A5-A7DC-4C29-9B41-B88C99838BD1", false);

            RockMigrationHelper.AddDefinedValueAttributeValue("23502286-D921-4455-BABC-D8D6CB8FFB3D", "51EB8583-55EA-4431-8B66-B5BD0F83D81E", @"{{ ''Now'' | Date:''ddd M/d'' }}");
            RockMigrationHelper.AddDefinedValueAttributeValue("5B11A934-0398-429F-9A91-F727153392E7", "51EB8583-55EA-4431-8B66-B5BD0F83D81E", @"{% for person in People %}{% assign remainder = forloop.index | Modulo:2 %}{% if remainder == 0 %}{{ person.SecurityCode }}-{{ person.Age }}yr\&{% endif %}{% endfor %}");
            RockMigrationHelper.AddDefinedValueAttributeValue("170207B6-9218-4E6E-8ADA-661521E80E5E", "51EB8583-55EA-4431-8B66-B5BD0F83D81E", @"{% for person in People %}{% assign remainder = forloop.index | Modulo:2 %}{% if remainder > 0 %}{{ person.SecurityCode }}-{{ person.Age }}yr\&{% endif %}{% endfor %}");
            RockMigrationHelper.AddDefinedValueAttributeValue("3DCF76E8-866C-4EC9-B1FB-552691A8B440", "51EB8583-55EA-4431-8B66-B5BD0F83D81E", @"{% for person in People %}{% assign remainder = forloop.index | Modulo:2 %}{% if remainder == 0 %}{{ person.NickName }}-{{ person.SecurityCode }}\&{% endif %}{% endfor %}");
            RockMigrationHelper.AddDefinedValueAttributeValue("1FAA4DAC-5240-486E-A23F-2A47D7F36F31", "51EB8583-55EA-4431-8B66-B5BD0F83D81E", @"{% for person in People %}{% assign remainder = forloop.index | Modulo:2 %}{% if remainder != 0 %}{{ person.NickName }}-{{ person.SecurityCode }}\&{% endif %}{% endfor %}");
            RockMigrationHelper.AddDefinedValueAttributeValue("08882D9E-4D49-4D1E-94D2-7E5CF64A570D", "51EB8583-55EA-4431-8B66-B5BD0F83D81E", @"{% for group in GroupType.Groups %}{% for location in group.Locations %}{% if forloop.index > 1 %}; {% endif %}{{location.Name}}{% for schedule in location.Schedules %} {{schedule.Name}}{% endfor %}{% endfor %}{% endfor %}");
            RockMigrationHelper.AddDefinedValueAttributeValue("B407E2A5-A7DC-4C29-9B41-B88C99838BD1", "51EB8583-55EA-4431-8B66-B5BD0F83D81E", @"{{ Location.Name }}{% for schedule in Location.Schedules %} {{schedule.Name}}{% endfor %}");

            Sql(MigrationSQL._201605232234462_FamilyCheckinType);
        }
        /// <summary>
        /// Operations to be performed during the upgrade process.
        /// </summary>
        public override void Up()
        {
            RockMigrationHelper.AddDefinedType("Workflow", "Workflow Note Type", "The type of notes that can be associated with a workflow.", "FDC7A191-717E-4CA6-9DCF-A2B5BB09C782");
            RockMigrationHelper.AddDefinedTypeAttribute("FDC7A191-717E-4CA6-9DCF-A2B5BB09C782", "9C204CD0-1233-41C5-818A-C5DA439445AA", "Icon Class Name", "IconClass", "The class name to use when rendering an icon for notes of this type", 0, "", "629CFBFF-3A95-4294-B13C-37F4FED04FE7");

            RockMigrationHelper.AddDefinedValue("FDC7A191-717E-4CA6-9DCF-A2B5BB09C782", "User Note", "User entered note", "534489FB-E239-4C51-8F5D-9ECF85E9CDE2");
            RockMigrationHelper.AddDefinedValueAttributeValue("534489FB-E239-4C51-8F5D-9ECF85E9CDE2", "629CFBFF-3A95-4294-B13C-37F4FED04FE7", "fa fa-comment");

            RockMigrationHelper.AddDefinedValue("FDC7A191-717E-4CA6-9DCF-A2B5BB09C782", "System Note", "System entered note", "414E9F98-4709-4895-AEBA-E41773BB7EB8");
            RockMigrationHelper.AddDefinedValueAttributeValue("414E9F98-4709-4895-AEBA-E41773BB7EB8", "629CFBFF-3A95-4294-B13C-37F4FED04FE7", "fa fa-file-text");

            Sql(@"
    DECLARE @DefinedTypeId int = ( SELECT TOP 1 [Id] FROM [DefinedType] WHERE [Guid] = 'FDC7A191-717E-4CA6-9DCF-A2B5BB09C782' )
    DECLARE @WorkflowEntityTypeId int = ( SELECT TOP 1 [Id] FROM [EntityType] WHERE [Guid] = '3540E9A7-FE30-43A9-8B0A-A372B63DFC93' )
    IF @DefinedTypeId IS NOT NULL AND @WorkflowEntityTypeId IS NOT NULL 
    BEGIN
	    IF EXISTS ( SELECT [Id] FROM [NoteType] WHERE [EntityTypeId] = @WorkflowEntityTypeId AND ( [Name] = 'WorkflowNote' OR [Name] = 'Workflow Note' ) )
	    BEGIN
		    UPDATE [NoteType] SET 
                [IsSystem] = 1,
                [Name] = 'Workflow Note',
			    [SourcesTypeId] = @DefinedTypeId,
			    [Guid] = 'A6CE445C-3B49-4401-82E6-312BF7946A6B'
		    WHERE [EntityTypeId] = @WorkflowEntityTypeId 
		    AND ( [Name] = 'WorkflowNote' OR [Name] = 'Workflow Note' )
	    END
	    ELSE
	    BEGIN
		    INSERT INTO [NoteType] ( [IsSystem], [EntityTypeId], [Name], [SourcesTypeId], [EntityTypeQualifierColumn], [EntityTypeQualifierValue], [Guid] )
		    VALUES ( 1, @WorkflowEntityTypeId, 'Workflow Note', @DefinedTypeId, '', '', 'A6CE445C-3B49-4401-82E6-312BF7946A6B')
	    END
    END
");

            Sql(@"
    UPDATE Q 
	    SET [Value] = 'General^General Inquiry,
Login^Login / Username / Password Assistance,
Website^Feedback about the web site,
Finance^Contributions / Finance,
Missions^Missions / Global Trips,
Pastor^Talk to a Pastor'
    FROM [Attribute] A
    INNER JOIN [AttributeQualifier] Q 
	    ON Q.[AttributeId] = A.[Id]
	    AND Q.[Key] = 'values'
    WHERE A.[Guid] = 'DA61CA95-0106-49EE-962B-F70042E1464E'
    AND Q.[Value] = 'General:General Inquiry,
Login:Login / Username / Password Assistance,
Website:Feedback about the web site,
Finance:Contributions / Finance,
Missions:Missions / Global Trips,
Pastor:Talk to a Pastor'
");

            // Add Block to Page: Workflow Detail, Site: Rock RMS
            RockMigrationHelper.AddBlock("BA547EED-5537-49CF-BD4E-C583D760788C", "", "2E9F32D4-B4FC-4A5F-9BE1-B2E3EA624DD3", "Notes", "Main", "", "", 1, "3A289F81-3048-419B-8A78-2B15967CC42B");
            RockMigrationHelper.AddBlockAttributeValue("3A289F81-3048-419B-8A78-2B15967CC42B", "3CB0A7DF-996B-4D6C-B3B6-9BBCC40BDC69", @"Notes");
            // Attrib Value for Block:Notes, Attribute:Heading Icon CSS Class Page: Workflow Detail, Site: Rock RMS
            RockMigrationHelper.AddBlockAttributeValue("3A289F81-3048-419B-8A78-2B15967CC42B", "B69937BE-000A-4B94-852F-16DE92344392", @"fa fa-comment");
            // Attrib Value for Block:Notes, Attribute:Note Term Page: Workflow Detail, Site: Rock RMS
            RockMigrationHelper.AddBlockAttributeValue("3A289F81-3048-419B-8A78-2B15967CC42B", "FD0727DC-92F4-4765-82CB-3A08B7D864F8", @"Note");
            // Attrib Value for Block:Notes, Attribute:Display Type Page: Workflow Detail, Site: Rock RMS
            RockMigrationHelper.AddBlockAttributeValue("3A289F81-3048-419B-8A78-2B15967CC42B", "5232BFAE-4DC8-4270-B38F-D29E1B00AB5E", @"Full");
            // Attrib Value for Block:Notes, Attribute:Use Person Icon Page: Workflow Detail, Site: Rock RMS
            RockMigrationHelper.AddBlockAttributeValue("3A289F81-3048-419B-8A78-2B15967CC42B", "C05757C0-E83E-4170-8CBF-C4E1ABEC36E1", @"False");
            // Attrib Value for Block:Notes, Attribute:Allow Anonymous Page: Workflow Detail, Site: Rock RMS
            RockMigrationHelper.AddBlockAttributeValue("3A289F81-3048-419B-8A78-2B15967CC42B", "EB9CBD02-2B0F-4BA3-9112-BC73D54159E7", @"False");
            // Attrib Value for Block:Notes, Attribute:Add Always Visible Page: Workflow Detail, Site: Rock RMS
            RockMigrationHelper.AddBlockAttributeValue("3A289F81-3048-419B-8A78-2B15967CC42B", "8E0BDD15-6B92-4BB0-9138-E9382B60F3A9", @"False");
            // Attrib Value for Block:Notes, Attribute:Display Order Page: Workflow Detail, Site: Rock RMS
            RockMigrationHelper.AddBlockAttributeValue("3A289F81-3048-419B-8A78-2B15967CC42B", "C9FC2C09-1BF5-4711-8F97-0B96633C46B1", @"Descending");
            // Attrib Value for Block:Notes, Attribute:Entity Type Page: Workflow Detail, Site: Rock RMS
            RockMigrationHelper.AddBlockAttributeValue("3A289F81-3048-419B-8A78-2B15967CC42B", "F1BCF615-FBCA-4BC2-A912-C35C0DC04174", @"3540e9a7-fe30-43a9-8b0a-a372b63dfc93");
            // Attrib Value for Block:Notes, Attribute:Note Type Page: Workflow Detail, Site: Rock RMS
            RockMigrationHelper.AddBlockAttributeValue("3A289F81-3048-419B-8A78-2B15967CC42B", "4EC3F5BD-4CD9-4A47-A49B-915ED98203D6", @"Workflow Note");
            // Attrib Value for Block:Notes, Attribute:Show Private Checkbox Page: Workflow Detail, Site: Rock RMS
            RockMigrationHelper.AddBlockAttributeValue("3A289F81-3048-419B-8A78-2B15967CC42B", "D68EE1F5-D29F-404B-945D-AD0BE76594C3", @"False");
            // Attrib Value for Block:Notes, Attribute:Show Security Button Page: Workflow Detail, Site: Rock RMS
            RockMigrationHelper.AddBlockAttributeValue("3A289F81-3048-419B-8A78-2B15967CC42B", "00B6EBFF-786D-453E-8746-119D0B45CB3E", @"False");
            // Attrib Value for Block:Notes, Attribute:Show Alert Checkbox Page: Workflow Detail, Site: Rock RMS
            RockMigrationHelper.AddBlockAttributeValue("3A289F81-3048-419B-8A78-2B15967CC42B", "20243A98-4802-48E2-AF61-83956056AC65", @"True");

            // Add/Update PageContext for Page:Workflow Detail, Entity: Rock.Model.Workflow, Parameter: workflowid
            RockMigrationHelper.UpdatePageContext("BA547EED-5537-49CF-BD4E-C583D760788C", "Rock.Model.Workflow", "workflowid", "55B1F94F-6498-4616-A1EC-4891E3FF2299");


            // Migration Rollups

            Sql(@"
      UPDATE [HtmlContent]
    SET [Content] = '<ul class=""list-group list-group-panel"">
<li class=""list-group-item""><a href=""http://www.rockrms.com/"">Rock RMS Website</a></li>
<li class=""list-group-item""><a href=""~/page/1"">External Website</a></li>
</ul>'
    WHERE [Guid] = '007EA905-D5D3-4DC5-AD0B-2C1E3935E452' AND [ModifiedDateTime] IS NULL
");

            Sql(@"
UPDATE [SystemEmail]
SET [Body] = '{{ GlobalAttribute.EmailHeader }}

<p>{{ Person.FirstName }},</p>
<p>The following {{ Workflow.WorkflowType.Name }} requires action:<p>
<p>{{ Workflow.WorkflowType.WorkTerm}}: <a href=''{{ GlobalAttribute.InternalApplicationRoot }}WorkflowEntry/{{ Workflow.WorkflowTypeId }}?WorkflowGuid={{ Workflow.Guid }}''>{{ Workflow.Name }}</a></p>

{% assign RequiredFields = false %}

<h3 class=""separator"">Details</h3>



{% for attribute in Action.FormAttributes %}

    
    {% if attribute.IsVisible and attribute.Value != '''' %}
        <div>
            <strong>{{ attribute.Name }}:</strong>
            <br />
            
                {% if attribute.Url and attribute.Url != '''' %}
                    <a href=''{{ attribute.Url }}''>{{ attribute.Value }}</a>
                {% else %}
                    {{ attribute.Value }}
                {% endif %}

        </div>
        <br />
    {% endif %}
    
        
    {% if attribute.IsRequired && attribute.Value == Empty %}
        {% assign RequiredFields = true %}
    {% endif %}

{% endfor %}



<table width=""100%"">
    <tr>
        <td>

    <table align=""left"" style=""width: 29%; min-width: 190px; margin-bottom: 12px;"" cellpadding=""0"" cellspacing=""0"">
     <tr>
       <td>
    
            <div><!--[if mso]>
              <v:roundrect xmlns:v=""urn:schemas-microsoft-com:vml"" xmlns:w=""urn:schemas-microsoft-com:office:word"" href=""{{ GlobalAttribute.InternalApplicationRoot }}WorkflowEntry/{{ Workflow.WorkflowTypeId }}?WorkflowGuid={{ Workflow.Guid }}"" style=""height:38px;v-text-anchor:middle;width:175px;"" arcsize=""11%"" strokecolor=""#269abc"" fillcolor=""#31b0d5"">
                <w:anchorlock/>
                <center style=""color:#ffffff;font-family:sans-serif;font-size:14px;font-weight:normal;"">View Details</center>
              </v:roundrect>
            <![endif]--><a href=""{{ GlobalAttribute.InternalApplicationRoot }}WorkflowEntry/{{ Workflow.WorkflowTypeId }}?WorkflowGuid={{ Workflow.Guid }}""
            style=""background-color:#31b0d5;border:1px solid #269abc;border-radius:4px;color:#ffffff;display:inline-block;font-family:sans-serif;font-size:14px;font-weight:normal;line-height:38px;text-align:center;text-decoration:none;width:175px;-webkit-text-size-adjust:none;mso-hide:all;"">View Details</a></div>
    
        </td>
     </tr>
    </table>

    {% if Action.ActionType.WorkflowForm.IncludeActionsInNotification == true %}

        {% if RequiredFields != true %}
    
            {% for button in Action.ActionType.WorkflowForm.Buttons %}
                {% capture ButtonLinkSearch %}{% raw %}{{ ButtonLink }}{% endraw %}{% endcapture %}
                {% capture ButtonLinkReplace %}{{ GlobalAttribute.InternalApplicationRoot }}WorkflowEntry/{{ Workflow.WorkflowTypeId }}?WorkflowGuid={{ Workflow.Guid }}&action={{ button.Name }}{% endcapture %}
                {% capture ButtonHtml %}{{ button.EmailHtml | Replace: ButtonLinkSearch, ButtonLinkReplace }}{% endcapture %}

                {% capture ButtonTextSearch %}{% raw %}{{ ButtonText }}{% endraw %}{% endcapture %}
                {% capture ButtonTextReplace %}{{ button.Name }}{% endcapture %}
                {{ ButtonHtml | Replace: ButtonTextSearch, ButtonTextReplace }}
            {% endfor %}
        {% endif %}

    {% endif %}

        </td>
    </tr>
</table>


{{ GlobalAttribute.EmailFooter }}'
WHERE [Guid] = '88C7D1CC-3478-4562-A301-AE7D4D7FFF6D'
");

            Sql(@"
/*
<doc>
	<summary>
        This function returns the address of the person provided.
	</summary>

	<returns>
		Address of the person.
	</returns>
	<remarks>
		This function allows you to request an address for a specific person. It will return
		the first address of that type (multiple address are possible if the individual is in
		multiple families). 
		
		You can provide the address type by specifing 'Home', 'Previous', 
		'Work'. For custom address types provide the AddressTypeId like '19'.

		You can also determine which component of the address you'd like. Values include:
			+ 'Full' - the full address 
			+ 'Street1'
			+ 'Street2'
			+ 'City'
			+ 'State'
			+ 'PostalCode'
			+ 'Country'

	</remarks>
	<code>
		SELECT [dbo].[ufnCrm_GetAddress](3, 'Home', 'Full')
		SELECT [dbo].[ufnCrm_GetAddress](3, 'Home', 'Street1')
		SELECT [dbo].[ufnCrm_GetAddress](3, 'Home', 'Street2')
		SELECT [dbo].[ufnCrm_GetAddress](3, 'Home', 'City')
		SELECT [dbo].[ufnCrm_GetAddress](3, 'Home', 'State')
		SELECT [dbo].[ufnCrm_GetAddress](3, 'Home', 'PostalCode')
		SELECT [dbo].[ufnCrm_GetAddress](3, 'Home', 'Country')
	</code>
</doc>
*/

CREATE FUNCTION [dbo].[ufnCrm_GetAddress](
	@PersonId int, 
	@AddressType varchar(20),
	@AddressComponent varchar(20)) 

RETURNS nvarchar(250) AS

BEGIN
	DECLARE @AddressTypeId int

	-- get address type
	IF (@AddressType = 'Home')
		BEGIN
		SET @AddressTypeId = 19
		END
	ELSE IF (@AddressType = 'Work')
		BEGIN
		SET @AddressTypeId = 20
		END
	ELSE IF (@AddressType = 'Previous')
		BEGIN
		SET @AddressTypeId = 137
		END
	ELSE
		SET @AddressTypeId = CAST(@AddressType AS int)

	-- return address component
	IF (@AddressComponent = 'Street1')
		BEGIN
		RETURN (SELECT [Street1] FROM [Location] WHERE [Id] = (SELECT [LocationId] FROM [GroupLocation] WHERE  [GroupLocationTypeValueId] = @AddressTypeId AND  [GroupId] = (SELECT TOP 1 [GroupId] FROM [GroupMember] gm INNER JOIN [Group] g ON g.[Id] = gm.[GroupId] WHERE [PersonId] = @PersonId AND g.[GroupTypeId] = 10))) 
		END
	ELSE IF (@AddressComponent = 'Street2')
		BEGIN
		RETURN (SELECT [Street2] FROM [Location] WHERE [Id] = (SELECT [LocationId] FROM [GroupLocation] WHERE  [GroupLocationTypeValueId] = @AddressTypeId AND  [GroupId] = (SELECT TOP 1 [GroupId] FROM [GroupMember] gm INNER JOIN [Group] g ON g.[Id] = gm.[GroupId] WHERE [PersonId] = @PersonId AND g.[GroupTypeId] = 10))) 
		END
	ELSE IF (@AddressComponent = 'City')
		BEGIN
		RETURN (SELECT [City] FROM [Location] WHERE [Id] = (SELECT [LocationId] FROM [GroupLocation] WHERE  [GroupLocationTypeValueId] = @AddressTypeId AND  [GroupId] = (SELECT TOP 1 [GroupId] FROM [GroupMember] gm INNER JOIN [Group] g ON g.[Id] = gm.[GroupId] WHERE [PersonId] = @PersonId AND g.[GroupTypeId] = 10))) 
		END
	ELSE IF (@AddressComponent = 'State')
		BEGIN
		RETURN (SELECT [State] FROM [Location] WHERE [Id] = (SELECT [LocationId] FROM [GroupLocation] WHERE  [GroupLocationTypeValueId] = @AddressTypeId AND  [GroupId] = (SELECT TOP 1 [GroupId] FROM [GroupMember] gm INNER JOIN [Group] g ON g.[Id] = gm.[GroupId] WHERE [PersonId] = @PersonId AND g.[GroupTypeId] = 10))) 
		END
	ELSE IF (@AddressComponent = 'PostalCode')
		BEGIN
		RETURN (SELECT [PostalCode] FROM [Location] WHERE [Id] = (SELECT [LocationId] FROM [GroupLocation] WHERE  [GroupLocationTypeValueId] = @AddressTypeId AND  [GroupId] = (SELECT TOP 1 [GroupId] FROM [GroupMember] gm INNER JOIN [Group] g ON g.[Id] = gm.[GroupId] WHERE [PersonId] = @PersonId AND g.[GroupTypeId] = 10))) 
		END
	ELSE IF (@AddressComponent = 'Country')
		BEGIN
		RETURN (SELECT [Country] FROM [Location] WHERE [Id] = (SELECT [LocationId] FROM [GroupLocation] WHERE  [GroupLocationTypeValueId] = @AddressTypeId AND  [GroupId] = (SELECT TOP 1 [GroupId] FROM [GroupMember] gm INNER JOIN [Group] g ON g.[Id] = gm.[GroupId] WHERE [PersonId] = @PersonId AND g.[GroupTypeId] = 10))) 
		END
	ELSE 
		BEGIN
		RETURN (SELECT [Street1] + ' ' + [Street2] + ' ' + [City] + ', ' + [State] + ' ' + [PostalCode] FROM [Location] WHERE [Id] = (SELECT [LocationId] FROM [GroupLocation] WHERE  [GroupLocationTypeValueId] = @AddressTypeId AND  [GroupId] = (SELECT TOP 1 [GroupId] FROM [GroupMember] gm INNER JOIN [Group] g ON g.[Id] = gm.[GroupId] WHERE [PersonId] = @PersonId AND g.[GroupTypeId] = 10))) 
		END

	RETURN ''
END
");

            Sql(@"
    UPDATE [BinaryFileData]
    SET Content = 0x0A3C212D2D2073617665642066726F6D2075726C3D283030373629687474703A2F2F6C6F63616C686F73743A363232392F47657446696C652E617368783F677569643D66393865396236312D336662342D343366342D386333302D346565636432663534393637202D2D3E0A3C68746D6C3E3C686561643E3C6D65746120687474702D65717569763D22436F6E74656E742D547970652220636F6E74656E743D22746578742F68746D6C3B20636861727365743D5554462D38223E3C2F686561643E3C626F64793E3C707265207374796C653D22776F72642D777261703A20627265616B2D776F72643B2077686974652D73706163653A207072652D777261703B223E1043547E7E43442C7E43435E7E43547E0A5E58417E54413030307E4A534E5E4C54305E4D4E575E4D54445E504F4E5E504D4E5E4C48302C305E4A4D415E5052362C367E534431355E4A55535E4C524E5E4349305E585A0A5E58410A5E4D4D540A5E50573831320A5E4C4C303430360A5E4C53300A5E46543434332C3131395E41304E2C3133352C3133345E46423333332C312C302C525E46485C5E46445757575E46530A5E465431322C3236385E41304E2C3133352C3134365E46485C5E4644355E46530A5E465431342C3332375E41304E2C34352C34355E46485C5E4644365E46530A5E464F3632362C3334305E474236302C35362C35365E46530A5E46543632362C3338345E41304E2C34352C34355E464237302C312C302C435E46525E46485C5E46444141415E46530A5E464F3731392C3334305E474236302C35362C35365E46530A5E46543731392C3338345E41304E2C34352C34355E464237302C312C302C435E46525E46485C5E46444C4C4C5E46530A5E46543333362C3130335E41304E2C3130322C3130305E46485C5E4644325E46530A5E46543430312C3130335E41304E2C3130322C3130305E46485C5E4644335E46530A5E46543334322C3133305E41304E2C32382C32385E46485C5E4644345E46530A5E46543333382C3338355E41304E2C32382C32385E46485C5E464431305E46530A5E465431332C3338355E41304E2C32382C32385E46485C5E4644395E46530A5E4C52595E464F302C305E47423831322C302C3133365E46535E4C524E0A5E5051312C302C312C595E585A0A3C2F7072653E3C2F626F64793E3C2F68746D6C3E
    WHERE [Guid] = 'DF44734E-473B-4009-9099-7BA25C8EA36A'
");
        }
Example #24
0
        /// <summary>
        /// Operations to be performed during the upgrade process.
        /// </summary>
        public override void Up()
        {
            /* Create Content Channel Type of Content Component*/
            Sql(MigrationSQL._201809142151587_ContentComponents_CreateContentComponentChannelType);

            /* Add Content Component Template defined type */
            RockMigrationHelper.AddDefinedType("Content Channel", "Content Component Template", "Lava Template that can be used with a Content Component block.", Rock.SystemGuid.DefinedType.CONTENT_COMPONENT_TEMPLATE);
            RockMigrationHelper.AddDefinedTypeAttribute(Rock.SystemGuid.DefinedType.CONTENT_COMPONENT_TEMPLATE, Rock.SystemGuid.FieldType.LAVA, "Display Lava", "DisplayLava", "The Lava Template to use when rendering the Content Component", 0, "", "FF5C0A7E-F3CD-46F0-934D-7C73B7CC35EE");
            RockMigrationHelper.AddAttributeQualifier("FF5C0A7E-F3CD-46F0-934D-7C73B7CC35EE", "editorHeight", "400", "573D06B9-5BDE-4E64-B0B1-85E167FCB47A");
            RockMigrationHelper.AddAttributeQualifier("FF5C0A7E-F3CD-46F0-934D-7C73B7CC35EE", "editorTheme", "0", "94E49DA2-F796-4F83-A857-A9751F273CF6");
            RockMigrationHelper.AddAttributeQualifier("FF5C0A7E-F3CD-46F0-934D-7C73B7CC35EE", "editorMode", "3", "17B8ECCA-2F67-4130-A43D-4D76C71D11D0");

            RockMigrationHelper.AddDefinedValue(Rock.SystemGuid.DefinedType.CONTENT_COMPONENT_TEMPLATE, "Hero", "", "3E7D4D0C-8238-4A5F-9E5F-34E4DFBF7725");
            RockMigrationHelper.AddDefinedValueAttributeValue("3E7D4D0C-8238-4A5F-9E5F-34E4DFBF7725", "FF5C0A7E-F3CD-46F0-934D-7C73B7CC35EE", MigrationSQL._201809142151587_ContentComponents_Hero);

            RockMigrationHelper.AddDefinedValue(Rock.SystemGuid.DefinedType.CONTENT_COMPONENT_TEMPLATE, "Ad Unit", "", "902D960C-0B7B-425E-9CEA-94CF215AABE4");
            RockMigrationHelper.AddDefinedValueAttributeValue("902D960C-0B7B-425E-9CEA-94CF215AABE4", "FF5C0A7E-F3CD-46F0-934D-7C73B7CC35EE", MigrationSQL._201809142151587_ContentComponents_AdUnit);

            RockMigrationHelper.AddDefinedValue(Rock.SystemGuid.DefinedType.CONTENT_COMPONENT_TEMPLATE, "Side By Side", "", "EC429625-767E-4F69-BB48-F55DA3C836A3");
            RockMigrationHelper.AddDefinedValueAttributeValue("EC429625-767E-4F69-BB48-F55DA3C836A3", "FF5C0A7E-F3CD-46F0-934D-7C73B7CC35EE", MigrationSQL._201809142151587_ContentComponents_SideBySide);

            RockMigrationHelper.AddDefinedValue(Rock.SystemGuid.DefinedType.CONTENT_COMPONENT_TEMPLATE, "Card", "", "54A6FE8C-B38F-46DB-81F7-A7648886B592");
            RockMigrationHelper.AddDefinedValueAttributeValue("54A6FE8C-B38F-46DB-81F7-A7648886B592", "FF5C0A7E-F3CD-46F0-934D-7C73B7CC35EE", MigrationSQL._201809142151587_ContentComponents_Card);

            /* Add Content Component Templates page to CMS Config page*/
            RockMigrationHelper.AddPage(true, "B4A24AB7-9369-4055-883F-4F4892C39AE3", "D65F783D-87A9-4CC9-8110-E83466A0EADB", "Content Component Templates", "", "F1ED10C2-A17D-4310-9F86-76E11A4A7ED2", "fa fa-list-alt");   // Site:Rock RMS
            // Add Block to Page: Content Component Templates, Site: Rock RMS
            RockMigrationHelper.AddBlock(true, "F1ED10C2-A17D-4310-9F86-76E11A4A7ED2", "", "0AB2D5E9-9272-47D5-90E4-4AA838D2D3EE", "Content Component Template List", "Main", @"", @"", 0, "9DFBA51C-FDBE-452E-9763-38CA182555F2");
            // Attrib Value for Block:Content Component Template List, Attribute:Defined Type Page: Content Component Templates, Site: Rock RMS
            RockMigrationHelper.AddBlockAttributeValue("9DFBA51C-FDBE-452E-9763-38CA182555F2", "9280D61F-C4F3-4A3E-A9BB-BCD67FF78637", @"313B579F-F442-4247-ADBB-BBD25E255003");
            // Attrib Value for Block:Content Component Template List, Attribute:core.CustomGridColumnsConfig Page: Content Component Templates, Site: Rock RMS
            RockMigrationHelper.AddBlockAttributeValue("9DFBA51C-FDBE-452E-9763-38CA182555F2", "87DAF7ED-AAF5-4D5C-8339-CB30B16CC9FF", @"");
            // Attrib Value for Block:Content Component Template List, Attribute:core.CustomGridEnableStickyHeaders Page: Content Component Templates, Site: Rock RMS
            RockMigrationHelper.AddBlockAttributeValue("9DFBA51C-FDBE-452E-9763-38CA182555F2", "945FE831-D33C-49C6-B21D-00EACA9A43D7", @"False");

            /* New Content Component Block Type*/
            RockMigrationHelper.UpdateBlockType("Content Component", "Block to manage and display content.", "~/Blocks/Cms/ContentComponent.ascx", "CMS", "AD802CA1-842C-47F0-B5E9-739FE2B4A2BD");
            // Attrib for BlockType: Content Component:Item Cache Duration
            RockMigrationHelper.UpdateBlockTypeAttribute("AD802CA1-842C-47F0-B5E9-739FE2B4A2BD", "A75DFC58-7A1B-4799-BF31-451B2BBE38FF", "Item Cache Duration", "ItemCacheDuration", "", @"Number of seconds to cache the content item specified by the parameter.", 0, @"0", "89B2C635-7F93-469B-BA8A-8F52609238DF");
            // Attrib for BlockType: Content Component:Content Channel
            RockMigrationHelper.UpdateBlockTypeAttribute("AD802CA1-842C-47F0-B5E9-739FE2B4A2BD", "D835A0EC-C8DB-483A-A37C-E8FB6E956C3D", "Content Channel", "ContentChannel", "", @"", 0, @"", "8F7BBA6A-88B8-4568-BF7F-5043AAB23BDC");
            // Attrib for BlockType: Content Component:Cache Tags
            RockMigrationHelper.UpdateBlockTypeAttribute("AD802CA1-842C-47F0-B5E9-739FE2B4A2BD", "BD0D9B57-2A41-4490-89FF-F01DAB7D4904", "Cache Tags", "CacheTags", "", @"Cached tags are used to link cached content so that it can be expired as a group", 0, @"", "DD660761-0894-4297-81EE-535135EF12E7");
            // Attrib for BlockType: Content Component:Filter Id
            RockMigrationHelper.UpdateBlockTypeAttribute("AD802CA1-842C-47F0-B5E9-739FE2B4A2BD", "A75DFC58-7A1B-4799-BF31-451B2BBE38FF", "Filter Id", "FilterId", "", @"The data filter that is used to filter items", 0, @"0", "0F7971F3-DB75-4E4E-9193-D87A02CB5691");
            // Attrib for BlockType: Content Component:Content Component Template
            RockMigrationHelper.UpdateBlockTypeAttribute("AD802CA1-842C-47F0-B5E9-739FE2B4A2BD", "59D5A94C-94A0-4630-B80A-BB25697D74C7", "Content Component Template", "ContentComponentTemplate", "", @"", 0, @"", "F33C44C4-615E-4254-9A97-9DD1D9922C32");
            // Attrib for BlockType: Content Component:Allow Multiple Content Items
            RockMigrationHelper.UpdateBlockTypeAttribute("AD802CA1-842C-47F0-B5E9-739FE2B4A2BD", "1EDAFDED-DFE6-4334-B019-6EECBA89E05A", "Allow Multiple Content Items", "AllowMultipleContentItems", "", @"", 0, @"False", "F11E0BF3-13BD-4A00-86F6-1BA74790EF61");
            // Attrib for BlockType: Content Component:Output Cache Duration
            RockMigrationHelper.UpdateBlockTypeAttribute("AD802CA1-842C-47F0-B5E9-739FE2B4A2BD", "A75DFC58-7A1B-4799-BF31-451B2BBE38FF", "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, @"", "1344878E-D977-489F-BE0D-5AA761521145");

            /* Set Content Component and Content Channel Item View as 'Common' block types */
            Sql($"UPDATE [BlockType] SET [IsCommon] = 1 WHERE [Guid] in ('AD802CA1-842C-47F0-B5E9-739FE2B4A2BD{Rock.SystemGuid.BlockType.CONTENT_COMPONENT}','{Rock.SystemGuid.BlockType.CONTENT_CHANNEL_ITEM_VIEW}')");

            /* Do a Switch-a-roo to get a couple of CMS blocks renamed to Content Channel Item View and Content Channel Navigation blocks so they make more sense */

            // Change the Name and Path of old "Content Channel Item View" to "Content Channel Navigation" (This is a better name for it and it also lets us name "Content Channel View Detail" get renamed "Content Channel Item View")
            RockMigrationHelper.UpdateBlockTypeByGuid("Content Channel Navigation", "Block to display a menu of content channels/items that user is authorized to view.", "~/Blocks/Cms/ContentChannelNavigation.ascx", "CMS", Rock.SystemGuid.BlockType.CONTENT_CHANNEL_NAVIGATION);

            // Change the Name and Path of old "Content Channel View Detail" to "Content Channel Item View" (This is a better name for it now that we got the old one renamed to make the name available) )
            RockMigrationHelper.UpdateBlockTypeByGuid("Content Channel Item View", "Block to display a specific content channel item.", "~/Blocks/Cms/ContentChannelItemView.ascx", "CMS", Rock.SystemGuid.BlockType.CONTENT_CHANNEL_ITEM_VIEW);

            // Update the name of the Content CHannel Item View blocks on Series Detail, Site: External Website and  Message Detail, Site: External Website
            Sql(@"UPDATE [Block]
SET [Name] = 'Content Channel Item View'
WHERE [Name] = 'Content Channel View Detail'
	AND [Guid] IN (
		'847E12E0-A7FC-4BD5-BD7E-1E9D435510E7'
		,'71D998C7-9F27-4B8A-937A-64C5EFC4783A'
		)"        );
        }
        /// <summary>
        /// Operations to be performed during the upgrade process.
        /// </summary>
        public override void Up()
        {
            CreateTable(
                "dbo.BackgroundCheck",
                c => new
            {
                Id                      = c.Int(nullable: false, identity: true),
                PersonAliasId           = c.Int(nullable: false),
                WorkflowId              = c.Int(),
                RequestDate             = c.DateTime(nullable: false),
                ResponseDate            = c.DateTime(),
                RecordFound             = c.Boolean(),
                ResponseXml             = c.String(),
                ResponseDocumentId      = c.Int(),
                CreatedDateTime         = c.DateTime(),
                ModifiedDateTime        = c.DateTime(),
                CreatedByPersonAliasId  = c.Int(),
                ModifiedByPersonAliasId = c.Int(),
                Guid                    = c.Guid(nullable: false),
                ForeignId               = c.Int(),
                ForeignGuid             = c.Guid(),
                ForeignKey              = c.String(maxLength: 100),
            })
            .PrimaryKey(t => t.Id)
            .ForeignKey("dbo.PersonAlias", t => t.CreatedByPersonAliasId)
            .ForeignKey("dbo.PersonAlias", t => t.ModifiedByPersonAliasId)
            .ForeignKey("dbo.PersonAlias", t => t.PersonAliasId, cascadeDelete: true)
            .ForeignKey("dbo.BinaryFile", t => t.ResponseDocumentId)
            .ForeignKey("dbo.Workflow", t => t.WorkflowId, cascadeDelete: true)
            .Index(t => t.PersonAliasId)
            .Index(t => t.WorkflowId)
            .Index(t => t.ResponseDocumentId)
            .Index(t => t.CreatedByPersonAliasId)
            .Index(t => t.ModifiedByPersonAliasId)
            .Index(t => t.Guid, unique: true)
            .Index(t => t.ForeignId)
            .Index(t => t.ForeignGuid)
            .Index(t => t.ForeignKey);

            AddColumn("dbo.Location", "County", c => c.String(maxLength: 50));

            RockMigrationHelper.AddDefinedType("Global", "Protect My Ministry DVR Jurisdiction Codes", "The jurisdication codes available for MVR requests from Protect My Ministry.", "2F8821E8-05B9-4CD5-9FA4-303662AAC85D");
            RockMigrationHelper.AddDefinedValue("2F8821E8-05B9-4CD5-9FA4-303662AAC85D", "AL", "Alabama");
            RockMigrationHelper.AddDefinedValue("2F8821E8-05B9-4CD5-9FA4-303662AAC85D", "AK", "Alaska");
            RockMigrationHelper.AddDefinedValue("2F8821E8-05B9-4CD5-9FA4-303662AAC85D", "AZ39M", "Arizona (39 month)");
            RockMigrationHelper.AddDefinedValue("2F8821E8-05B9-4CD5-9FA4-303662AAC85D", "AZ5Y", "Arizona 5 Year (Commercial use only)");
            RockMigrationHelper.AddDefinedValue("2F8821E8-05B9-4CD5-9FA4-303662AAC85D", "ARC", "Arkansas (Commercial)");
            RockMigrationHelper.AddDefinedValue("2F8821E8-05B9-4CD5-9FA4-303662AAC85D", "ARD", "Arkansas (Driver Check)");
            RockMigrationHelper.AddDefinedValue("2F8821E8-05B9-4CD5-9FA4-303662AAC85D", "ARI", "Arkansas (Insurance)");
            RockMigrationHelper.AddDefinedValue("2F8821E8-05B9-4CD5-9FA4-303662AAC85D", "CA", "California");
            RockMigrationHelper.AddDefinedValue("2F8821E8-05B9-4CD5-9FA4-303662AAC85D", "CO", "Colorado");
            RockMigrationHelper.AddDefinedValue("2F8821E8-05B9-4CD5-9FA4-303662AAC85D", "CT", "Connecticut");
            RockMigrationHelper.AddDefinedValue("2F8821E8-05B9-4CD5-9FA4-303662AAC85D", "DE", "Delaware");
            RockMigrationHelper.AddDefinedValue("2F8821E8-05B9-4CD5-9FA4-303662AAC85D", "DC", "District of Columbia");
            RockMigrationHelper.AddDefinedValue("2F8821E8-05B9-4CD5-9FA4-303662AAC85D", "FL3", "Florida (3 Year)");
            RockMigrationHelper.AddDefinedValue("2F8821E8-05B9-4CD5-9FA4-303662AAC85D", "FL7", "Florida (7 Year)");
            RockMigrationHelper.AddDefinedValue("2F8821E8-05B9-4CD5-9FA4-303662AAC85D", "FLU", "Florida (Unlimited)");
            RockMigrationHelper.AddDefinedValue("2F8821E8-05B9-4CD5-9FA4-303662AAC85D", "GA3Y", "Georgia (3 Year)");
            RockMigrationHelper.AddDefinedValue("2F8821E8-05B9-4CD5-9FA4-303662AAC85D", "GA7Y", "Georgia (7 Year)");
            RockMigrationHelper.AddDefinedValue("2F8821E8-05B9-4CD5-9FA4-303662AAC85D", "GAL", "Georgia LRI");
            RockMigrationHelper.AddDefinedValue("2F8821E8-05B9-4CD5-9FA4-303662AAC85D", "HI", "Hawaii");
            RockMigrationHelper.AddDefinedValue("2F8821E8-05B9-4CD5-9FA4-303662AAC85D", "ID", "Idaho");
            RockMigrationHelper.AddDefinedValue("2F8821E8-05B9-4CD5-9FA4-303662AAC85D", "IL", "Illinois");
            RockMigrationHelper.AddDefinedValue("2F8821E8-05B9-4CD5-9FA4-303662AAC85D", "IN", "Indiana");
            RockMigrationHelper.AddDefinedValue("2F8821E8-05B9-4CD5-9FA4-303662AAC85D", "IA", "Iowa");
            RockMigrationHelper.AddDefinedValue("2F8821E8-05B9-4CD5-9FA4-303662AAC85D", "KS", "Kansas");
            RockMigrationHelper.AddDefinedValue("2F8821E8-05B9-4CD5-9FA4-303662AAC85D", "KY", "Kentucky");
            RockMigrationHelper.AddDefinedValue("2F8821E8-05B9-4CD5-9FA4-303662AAC85D", "LA", "Louisiana");
            RockMigrationHelper.AddDefinedValue("2F8821E8-05B9-4CD5-9FA4-303662AAC85D", "ME", "Maine");
            RockMigrationHelper.AddDefinedValue("2F8821E8-05B9-4CD5-9FA4-303662AAC85D", "MD", "Maryland");
            RockMigrationHelper.AddDefinedValue("2F8821E8-05B9-4CD5-9FA4-303662AAC85D", "MA", "Massachusetts");
            RockMigrationHelper.AddDefinedValue("2F8821E8-05B9-4CD5-9FA4-303662AAC85D", "MI", "Michigan");
            RockMigrationHelper.AddDefinedValue("2F8821E8-05B9-4CD5-9FA4-303662AAC85D", "MN1M", "Minnesota (1 Month)");
            RockMigrationHelper.AddDefinedValue("2F8821E8-05B9-4CD5-9FA4-303662AAC85D", "MN1Y", "Minnesota (1 Year)");
            RockMigrationHelper.AddDefinedValue("2F8821E8-05B9-4CD5-9FA4-303662AAC85D", "MNC", "Minnesota (Complete)");
            RockMigrationHelper.AddDefinedValue("2F8821E8-05B9-4CD5-9FA4-303662AAC85D", "MS", "Mississippi");
            RockMigrationHelper.AddDefinedValue("2F8821E8-05B9-4CD5-9FA4-303662AAC85D", "MO1M", "Missouri (1 Month)");
            RockMigrationHelper.AddDefinedValue("2F8821E8-05B9-4CD5-9FA4-303662AAC85D", "MO1Y", "Missouri (1 Year)");
            RockMigrationHelper.AddDefinedValue("2F8821E8-05B9-4CD5-9FA4-303662AAC85D", "MOC", "Missouri (Complete)");
            RockMigrationHelper.AddDefinedValue("2F8821E8-05B9-4CD5-9FA4-303662AAC85D", "MT", "Montana");
            RockMigrationHelper.AddDefinedValue("2F8821E8-05B9-4CD5-9FA4-303662AAC85D", "NE", "Nebraska");
            RockMigrationHelper.AddDefinedValue("2F8821E8-05B9-4CD5-9FA4-303662AAC85D", "NV", "Nevada");
            RockMigrationHelper.AddDefinedValue("2F8821E8-05B9-4CD5-9FA4-303662AAC85D", "NH", "New Hampshire");
            RockMigrationHelper.AddDefinedValue("2F8821E8-05B9-4CD5-9FA4-303662AAC85D", "NJ", "New Jersey");
            RockMigrationHelper.AddDefinedValue("2F8821E8-05B9-4CD5-9FA4-303662AAC85D", "NM", "New Mexico");
            RockMigrationHelper.AddDefinedValue("2F8821E8-05B9-4CD5-9FA4-303662AAC85D", "NY", "New York");
            RockMigrationHelper.AddDefinedValue("2F8821E8-05B9-4CD5-9FA4-303662AAC85D", "NC3Y", "North Carolina (3 Year)");
            RockMigrationHelper.AddDefinedValue("2F8821E8-05B9-4CD5-9FA4-303662AAC85D", "NC7Y", "North Carolina (7 Year)");
            RockMigrationHelper.AddDefinedValue("2F8821E8-05B9-4CD5-9FA4-303662AAC85D", "ND", "North Dakota");
            RockMigrationHelper.AddDefinedValue("2F8821E8-05B9-4CD5-9FA4-303662AAC85D", "OH", "Ohio");
            RockMigrationHelper.AddDefinedValue("2F8821E8-05B9-4CD5-9FA4-303662AAC85D", "OK", "Oklahoma");
            RockMigrationHelper.AddDefinedValue("2F8821E8-05B9-4CD5-9FA4-303662AAC85D", "OR", "Oregon");
            RockMigrationHelper.AddDefinedValue("2F8821E8-05B9-4CD5-9FA4-303662AAC85D", "ORI", "Oregon (Insurance)");
            RockMigrationHelper.AddDefinedValue("2F8821E8-05B9-4CD5-9FA4-303662AAC85D", "PA10Y", "Pennsylvania (10 Year)");
            RockMigrationHelper.AddDefinedValue("2F8821E8-05B9-4CD5-9FA4-303662AAC85D", "PA3Y", "Pennsylvania (3 Year Insurance)");
            RockMigrationHelper.AddDefinedValue("2F8821E8-05B9-4CD5-9FA4-303662AAC85D", "RI", "Rhode Island");
            RockMigrationHelper.AddDefinedValue("2F8821E8-05B9-4CD5-9FA4-303662AAC85D", "SC10Y", "South Carolina (10 Year)");
            RockMigrationHelper.AddDefinedValue("2F8821E8-05B9-4CD5-9FA4-303662AAC85D", "SC3Y", "South Carolina (3 Year)");
            RockMigrationHelper.AddDefinedValue("2F8821E8-05B9-4CD5-9FA4-303662AAC85D", "SD", "South Dakota");
            RockMigrationHelper.AddDefinedValue("2F8821E8-05B9-4CD5-9FA4-303662AAC85D", "TN3Y", "Tennessee (3 Year)");
            RockMigrationHelper.AddDefinedValue("2F8821E8-05B9-4CD5-9FA4-303662AAC85D", "TNL", "Tennessee (Limited MVR)");
            RockMigrationHelper.AddDefinedValue("2F8821E8-05B9-4CD5-9FA4-303662AAC85D", "TX3", "Texas (3 Year)");
            RockMigrationHelper.AddDefinedValue("2F8821E8-05B9-4CD5-9FA4-303662AAC85D", "TXDC", "Texas (Driver Check)");
            RockMigrationHelper.AddDefinedValue("2F8821E8-05B9-4CD5-9FA4-303662AAC85D", "UT", "Utah");
            RockMigrationHelper.AddDefinedValue("2F8821E8-05B9-4CD5-9FA4-303662AAC85D", "VT", "Vermont");
            RockMigrationHelper.AddDefinedValue("2F8821E8-05B9-4CD5-9FA4-303662AAC85D", "VA", "Virginia");
            RockMigrationHelper.AddDefinedValue("2F8821E8-05B9-4CD5-9FA4-303662AAC85D", "WA", "Washington");
            RockMigrationHelper.AddDefinedValue("2F8821E8-05B9-4CD5-9FA4-303662AAC85D", "WADC", "Washington (Driver Check)");
            RockMigrationHelper.AddDefinedValue("2F8821E8-05B9-4CD5-9FA4-303662AAC85D", "WV", "West Virginia");
            RockMigrationHelper.AddDefinedValue("2F8821E8-05B9-4CD5-9FA4-303662AAC85D", "WI", "Wisconsin");
            RockMigrationHelper.AddDefinedValue("2F8821E8-05B9-4CD5-9FA4-303662AAC85D", "WIDC", "Wisconsin (Driver Check)");
            RockMigrationHelper.AddDefinedValue("2F8821E8-05B9-4CD5-9FA4-303662AAC85D", "WY", "Wyoming");

            // Background Check Package Defined Type and attributes
            RockMigrationHelper.AddDefinedType("Global", "Background Check Types", "The type of background checks that are available to be used.", "BC2FDF9A-93B8-4325-8DE9-2F7B1943BFDF");
            RockMigrationHelper.AddDefinedTypeAttribute("BC2FDF9A-93B8-4325-8DE9-2F7B1943BFDF", "9C204CD0-1233-41C5-818A-C5DA439445AA", "Package Name", "PMMPackageName", "The exact name (case is important) of the PMM Package to submit.", 0, "", "01E4D61D-6E23-4EF3-8AE1-6919590B0E70");
            RockMigrationHelper.AddDefinedTypeAttribute("BC2FDF9A-93B8-4325-8DE9-2F7B1943BFDF", "9C204CD0-1233-41C5-818A-C5DA439445AA", "County Criminal Search Default County", "DefaultCounty", "Include a valid county name to request a County Criminal Search (a default county or state is required when using the PLUS package).", 1, "", "39AEB614-BA28-485D-B033-3DD52055DC20");
            RockMigrationHelper.AddDefinedTypeAttribute("BC2FDF9A-93B8-4325-8DE9-2F7B1943BFDF", "1EDAFDED-DFE6-4334-B019-6EECBA89E05A", "Use Home Address County for County search", "SendHomeCounty", "If the person's home address includes a county, use that instead of the default county.", 2, "False", "EC942623-3B32-4EF4-A371-D4312A7AF3F8");
            RockMigrationHelper.AddDefinedTypeAttribute("BC2FDF9A-93B8-4325-8DE9-2F7B1943BFDF", "9C204CD0-1233-41C5-818A-C5DA439445AA", "Statewide Criminal Search Default State", "DefaultState", "Include a valid state to request a Statewide Criminal Search (a default state or county is required when using the PLUS package).", 3, "", "17093E08-F287-4A77-87B7-5FFA2337A8B7");
            RockMigrationHelper.AddDefinedTypeAttribute("BC2FDF9A-93B8-4325-8DE9-2F7B1943BFDF", "1EDAFDED-DFE6-4334-B019-6EECBA89E05A", "Use Home Address State For Statewide Search", "SendHomeState", "If the person's home address includes a state, use that instead of the default state.", 4, "False", "96B3451B-4851-4509-8130-231A2042A4A1");
            RockMigrationHelper.AddDefinedTypeAttribute("BC2FDF9A-93B8-4325-8DE9-2F7B1943BFDF", "59D5A94C-94A0-4630-B80A-BB25697D74C7", "MVR Jurisdiction Code", "MVRJurisdiction", "Select an MVR Jurisdiction code to request a Motor Vehicle Record search.", 5, "", "1169005D-662B-4380-9FFD-BD6177037329");
            RockMigrationHelper.AddDefinedTypeAttribute("BC2FDF9A-93B8-4325-8DE9-2F7B1943BFDF", "1EDAFDED-DFE6-4334-B019-6EECBA89E05A", "Use Home State for MVR Search", "SendHomeStateMVR", "If the person's home address includes a state, use that instead of state from jurisdication code.", 6, "False", "9F7FD96A-BE7C-4CA3-91F8-10A0D1D6C1D0");

            RockMigrationHelper.AddAttributeQualifier("1169005D-662B-4380-9FFD-BD6177037329", "allowmultiple", "False", "DD29AF91-A5F2-4D61-8674-963C107EB465");
            RockMigrationHelper.AddAttributeQualifier("1169005D-662B-4380-9FFD-BD6177037329", "definedtype", "", "9599BD09-1B79-4E00-8FC6-D9DC19010E56");
            RockMigrationHelper.AddAttributeQualifier("1169005D-662B-4380-9FFD-BD6177037329", "displaydescription", "True", "3F7E913C-CE65-4B67-A248-E99028FCD18F");

            // Seven Year Auto Package with attribute values
            RockMigrationHelper.UpdateDefinedValue("BC2FDF9A-93B8-4325-8DE9-2F7B1943BFDF", "Seven Year Automatic",
                                                   "The Seven Year Automatic package is the premier screening option and is the recommended package for all staff and pastors serving at your organization. Some churches also use this package for all volunteers.", "8470F648-58B6-405A-8C4D-CD661F6678DB", false);
            RockMigrationHelper.AddDefinedValueAttributeValue("8470F648-58B6-405A-8C4D-CD661F6678DB", "01E4D61D-6E23-4EF3-8AE1-6919590B0E70", "Auto County 7 yrs");
            RockMigrationHelper.AddDefinedValueAttributeValue("8470F648-58B6-405A-8C4D-CD661F6678DB", "39AEB614-BA28-485D-B033-3DD52055DC20", "");
            RockMigrationHelper.AddDefinedValueAttributeValue("8470F648-58B6-405A-8C4D-CD661F6678DB", "EC942623-3B32-4EF4-A371-D4312A7AF3F8", "False");
            RockMigrationHelper.AddDefinedValueAttributeValue("8470F648-58B6-405A-8C4D-CD661F6678DB", "17093E08-F287-4A77-87B7-5FFA2337A8B7", "");
            RockMigrationHelper.AddDefinedValueAttributeValue("8470F648-58B6-405A-8C4D-CD661F6678DB", "96B3451B-4851-4509-8130-231A2042A4A1", "False");
            RockMigrationHelper.AddDefinedValueAttributeValue("8470F648-58B6-405A-8C4D-CD661F6678DB", "1169005D-662B-4380-9FFD-BD6177037329", "");
            RockMigrationHelper.AddDefinedValueAttributeValue("8470F648-58B6-405A-8C4D-CD661F6678DB", "9F7FD96A-BE7C-4CA3-91F8-10A0D1D6C1D0", "False");

            // BASIC Package with attribute values
            RockMigrationHelper.UpdateDefinedValue("BC2FDF9A-93B8-4325-8DE9-2F7B1943BFDF", "BASIC",
                                                   "The Basic Package is the minimum recommended package for all volunteer and staff screenings. It includes SSN Verification and Address History, National Criminal Database Search, National Sex Offender Search, Re-verification of criminal records, Alias Names.",
                                                   "B091BE26-1EEA-4601-A65A-A3A75CDD7506", false);
            RockMigrationHelper.AddDefinedValueAttributeValue("B091BE26-1EEA-4601-A65A-A3A75CDD7506", "01E4D61D-6E23-4EF3-8AE1-6919590B0E70", "BASIC");
            RockMigrationHelper.AddDefinedValueAttributeValue("B091BE26-1EEA-4601-A65A-A3A75CDD7506", "39AEB614-BA28-485D-B033-3DD52055DC20", "");
            RockMigrationHelper.AddDefinedValueAttributeValue("B091BE26-1EEA-4601-A65A-A3A75CDD7506", "EC942623-3B32-4EF4-A371-D4312A7AF3F8", "False");
            RockMigrationHelper.AddDefinedValueAttributeValue("B091BE26-1EEA-4601-A65A-A3A75CDD7506", "17093E08-F287-4A77-87B7-5FFA2337A8B7", "");
            RockMigrationHelper.AddDefinedValueAttributeValue("B091BE26-1EEA-4601-A65A-A3A75CDD7506", "96B3451B-4851-4509-8130-231A2042A4A1", "False");
            RockMigrationHelper.AddDefinedValueAttributeValue("B091BE26-1EEA-4601-A65A-A3A75CDD7506", "1169005D-662B-4380-9FFD-BD6177037329", "");
            RockMigrationHelper.AddDefinedValueAttributeValue("B091BE26-1EEA-4601-A65A-A3A75CDD7506", "9F7FD96A-BE7C-4CA3-91F8-10A0D1D6C1D0", "False");

            // PLUS Package with attribute values
            RockMigrationHelper.UpdateDefinedValue("BC2FDF9A-93B8-4325-8DE9-2F7B1943BFDF", "PLUS",
                                                   "Depending on your state, it may be recommended to use the PLUS package instead of the Basic. The PLUS package includes everything in the BASIC package with the addition of one county or statewide criminal court search.",
                                                   "C542EFC7-1D22-4DBD-AF09-5C583FCD4FEF", false);
            RockMigrationHelper.AddDefinedValueAttributeValue("C542EFC7-1D22-4DBD-AF09-5C583FCD4FEF", "01E4D61D-6E23-4EF3-8AE1-6919590B0E70", "PLUS");
            RockMigrationHelper.AddDefinedValueAttributeValue("C542EFC7-1D22-4DBD-AF09-5C583FCD4FEF", "39AEB614-BA28-485D-B033-3DD52055DC20", "");
            RockMigrationHelper.AddDefinedValueAttributeValue("C542EFC7-1D22-4DBD-AF09-5C583FCD4FEF", "EC942623-3B32-4EF4-A371-D4312A7AF3F8", "False");
            RockMigrationHelper.AddDefinedValueAttributeValue("C542EFC7-1D22-4DBD-AF09-5C583FCD4FEF", "17093E08-F287-4A77-87B7-5FFA2337A8B7", "AZ");
            RockMigrationHelper.AddDefinedValueAttributeValue("C542EFC7-1D22-4DBD-AF09-5C583FCD4FEF", "96B3451B-4851-4509-8130-231A2042A4A1", "True");
            RockMigrationHelper.AddDefinedValueAttributeValue("C542EFC7-1D22-4DBD-AF09-5C583FCD4FEF", "1169005D-662B-4380-9FFD-BD6177037329", "");
            RockMigrationHelper.AddDefinedValueAttributeValue("C542EFC7-1D22-4DBD-AF09-5C583FCD4FEF", "9F7FD96A-BE7C-4CA3-91F8-10A0D1D6C1D0", "False");

            // PA 153 Package with attribute values
            RockMigrationHelper.UpdateDefinedValue("BC2FDF9A-93B8-4325-8DE9-2F7B1943BFDF", "Pennsylvania Act 153",
                                                   "If your organization is located in Pennsylvania, This package should be used when screening any volunteers or staff that will interact with children. This package includes all of the screening and reporting requirements mandated by Pennsylvania Act 153.",
                                                   "AD47AECE-6779-41C5-A5C4-D3A9C1F849BEF", false);
            RockMigrationHelper.AddDefinedValueAttributeValue("AD47AECE-6779-41C5-A5C4-D3A9C1F849BE", "01E4D61D-6E23-4EF3-8AE1-6919590B0E70", "PA Package");
            RockMigrationHelper.AddDefinedValueAttributeValue("AD47AECE-6779-41C5-A5C4-D3A9C1F849BE", "39AEB614-BA28-485D-B033-3DD52055DC20", "");
            RockMigrationHelper.AddDefinedValueAttributeValue("AD47AECE-6779-41C5-A5C4-D3A9C1F849BE", "EC942623-3B32-4EF4-A371-D4312A7AF3F8", "False");
            RockMigrationHelper.AddDefinedValueAttributeValue("AD47AECE-6779-41C5-A5C4-D3A9C1F849BE", "17093E08-F287-4A77-87B7-5FFA2337A8B7", "");
            RockMigrationHelper.AddDefinedValueAttributeValue("AD47AECE-6779-41C5-A5C4-D3A9C1F849BE", "96B3451B-4851-4509-8130-231A2042A4A1", "False");
            RockMigrationHelper.AddDefinedValueAttributeValue("AD47AECE-6779-41C5-A5C4-D3A9C1F849BE", "1169005D-662B-4380-9FFD-BD6177037329", "");
            RockMigrationHelper.AddDefinedValueAttributeValue("AD47AECE-6779-41C5-A5C4-D3A9C1F849BE", "9F7FD96A-BE7C-4CA3-91F8-10A0D1D6C1D0", "False");

            // MVR Only
            RockMigrationHelper.UpdateDefinedValue("BC2FDF9A-93B8-4325-8DE9-2F7B1943BFDF", "Motor Vehicle Record Search", "An A la carte Motor Vehicle Record (MVR) search.", "D27F591E-0016-4924-BC8D-F3F488DF3F8C", false);
            RockMigrationHelper.AddDefinedValueAttributeValue("D27F591E-0016-4924-BC8D-F3F488DF3F8C", "01E4D61D-6E23-4EF3-8AE1-6919590B0E70", "");
            RockMigrationHelper.AddDefinedValueAttributeValue("D27F591E-0016-4924-BC8D-F3F488DF3F8C", "39AEB614-BA28-485D-B033-3DD52055DC20", "");
            RockMigrationHelper.AddDefinedValueAttributeValue("D27F591E-0016-4924-BC8D-F3F488DF3F8C", "EC942623-3B32-4EF4-A371-D4312A7AF3F8", "False");
            RockMigrationHelper.AddDefinedValueAttributeValue("D27F591E-0016-4924-BC8D-F3F488DF3F8C", "17093E08-F287-4A77-87B7-5FFA2337A8B7", "");
            RockMigrationHelper.AddDefinedValueAttributeValue("D27F591E-0016-4924-BC8D-F3F488DF3F8C", "96B3451B-4851-4509-8130-231A2042A4A1", "False");
            RockMigrationHelper.AddDefinedValueAttributeValue("D27F591E-0016-4924-BC8D-F3F488DF3F8C", "1169005D-662B-4380-9FFD-BD6177037329", "");
            RockMigrationHelper.AddDefinedValueAttributeValue("D27F591E-0016-4924-BC8D-F3F488DF3F8C", "9F7FD96A-BE7C-4CA3-91F8-10A0D1D6C1D0", "True");

            // Change the workflow package attribute to be a defined value field and add the qualifiers
            RockMigrationHelper.UpdateWorkflowTypeAttribute("16D12EF7-C546-4039-9036-B73D118EDC90", "59D5A94C-94A0-4630-B80A-BB25697D74C7", "Type", "PackageType", "Value should be the type of background check to request from the vendor.", 9, @"", "A4CB9461-D77F-40E0-8DFF-C7838D78F2EC");   // Background Check:Type
            RockMigrationHelper.AddAttributeQualifier("A4CB9461-D77F-40E0-8DFF-C7838D78F2EC", "definedtype", @"BC2FDF9A-93B8-4325-8DE9-2F7B1943BFDF", "D03418DA-BC29-47C3-AA36-1051841C62F9");
            RockMigrationHelper.AddAttributeQualifier("A4CB9461-D77F-40E0-8DFF-C7838D78F2EC", "allowmultiple", @"False", "CE080F26-ACDA-45FB-BE30-0D88688FF99B");
            RockMigrationHelper.AddAttributeQualifier("A4CB9461-D77F-40E0-8DFF-C7838D78F2EC", "displaydescription", @"False", "101C2F35-28F8-4E20-B1E2-812D8F784E8F");

            RockMigrationHelper.AddPage("C831428A-6ACD-4D49-9B2D-046D399E3123", "D65F783D-87A9-4CC9-8110-E83466A0EADB", "Protect My Ministry", "", "E7F4B733-60FF-4FA3-AB17-0832E123F6F2", "fa fa-shield", "21DA6141-0A03-4F00-B0A8-3B110FBE2438");   // Site:Rock RMS
            RockMigrationHelper.UpdateBlockType("Protect My Ministry Settings", "Block for updating the settings used by the Protect My Ministry integration.", "~/Blocks/Security/BackgroundCheck/ProtectMyMinistrySettings.ascx", "Security  > Background Check", "AF36FA7E-BD2A-42A3-AF30-2FEBC1C46663");
            RockMigrationHelper.UpdateBlockType("Request List", "Lists all the background check requests.", "~/Blocks/Security/BackgroundCheck/RequestList.ascx", "Security > Background Check", "A25BE440-6A54-4A8C-9359-74DB5AE7E5F3");
            RockMigrationHelper.AddBlock("E7F4B733-60FF-4FA3-AB17-0832E123F6F2", "", "AF36FA7E-BD2A-42A3-AF30-2FEBC1C46663", "Protect My Ministry Settings", "Main", "", "", 0, "63AA839B-B6A1-4A57-A0DC-2F5B6DDA71BE");
            RockMigrationHelper.AddBlock("E7F4B733-60FF-4FA3-AB17-0832E123F6F2", "", "A25BE440-6A54-4A8C-9359-74DB5AE7E5F3", "Request List", "Main", "", "", 1, "29BDA0D1-7595-4ABC-ABA3-5E3E6409B21F");

            // Attrib for BlockType: Request List:Workflow Detail Page
            RockMigrationHelper.AddBlockTypeAttribute("A25BE440-6A54-4A8C-9359-74DB5AE7E5F3", "BD53F9C9-EBA9-4D3F-82EA-DE5DD34A8108", "Workflow Detail Page", "WorkflowDetailPage", "", "The page to view details about the background check workflow", 0, @"", "EBD0D19C-E73D-41AE-82D4-C89C21C35998");

            // Attrib Value for Block:Request List, Attribute:Workflow Detail Page Page: Protect My Ministry, Site: Rock RMS
            RockMigrationHelper.AddBlockAttributeValue("29BDA0D1-7595-4ABC-ABA3-5E3E6409B21F", "EBD0D19C-E73D-41AE-82D4-C89C21C35998", @"ba547eed-5537-49cf-bd4e-c583d760788c,0018e88f-1fea-48e2-93d6-dc254a0c4005");

            RockMigrationHelper.UpdatePersonAttribute(Rock.SystemGuid.FieldType.TEXT, "4D1E1EBA-ABF2-4A7C-8ADF-65CB5AAE94E2", "Driver''s License Number", "com.sparkdevnetwork.DLNumber", "", "Driver''s License Number used for Motor Vehicle Record searches", 5, "", "04549D93-C674-441C-A6CF-ACDFA0EDB163");

            Sql(MigrationSQL._201511182310362_ProtectMyMinistry);
        }
        public override void Up()
        {
            RockMigrationHelper.AddDefinedType("Workflow", "Text To Workflow", "Matches SMS phones and keywords to launch workflows of various types", "2CACB86F-D811-4483-98E1-272F1FF8FF5D", @"

                The following merge fields are available for both the ''Name Template'' and ''Workflow Attributes'' attributes.
                <p>
                    <a data-toggle=""collapse""  href=""#collapsefields"" class=''btn btn-action btn-xs''>show/hide fields</a>
                </p>

                <div id=""collapsefields"" class=""panel-collapse collapse"">
                <pre>
                {
                   ""FromPhone"":""+15555555555"",
                   ""ToPhone"":""+15555555555"",
                   ""MessageBody"":""keyword"",
                   ""ReceivedTime"":""10:02 PM"",
                   ""ReceivedDate"":""7/29/2014"",
                   ""FromPerson"":{
                      ""FullName"":""Ted Decker"",
                      ""IsDeceased"":false,
                      ""TitleValueId"":null,
                      ""FirstName"":""Theodore"",
                      ""NickName"":""Ted"",
                      ""MiddleName"":"""",
                      ""LastName"":""Decker"",
                      ""SuffixValueId"":null,
                      ""PhotoId"":36,
                      ""BirthDay"":10,
                      ""BirthMonth"":2,
                      ""BirthYear"":1976,
                      ""Gender"":1,
                      ""MaritalStatusValueId"":143,
                      ""AnniversaryDate"":null,
                      ""GraduationDate"":""1994-06-01T00:00:00"",
                      ""GivingGroupId"":41,
                      ""Email"":""*****@*****.**"",
                      ""IsEmailActive"":true,
                      ""EmailNote"":null,
                      ""EmailPreference"":0,
                      ""ReviewReasonNote"":null,
                      ""InactiveReasonNote"":null,
                      ""SystemNote"":null,
                      ""ViewedCount"":null,
                      ""PrimaryAliasId"":2,
                      ""BirthdayDayOfWeek"":""Monday"",
                      ""BirthdayDayOfWeekShort"":""Mon"",
                      ""PhotoUrl"":""/GetImage.ashx?id=36"",
                      ""BirthDate"":""1976-02-10T00:00:00"",
                      ""Age"":38,
                      ""DaysToBirthday"":196,
                      ""Grade"":33,
                      ""GradeFormatted"":"""",
                      ""CreatedDateTime"":null,
                      ""ModifiedDateTime"":""2014-07-23T23:26:18.357"",
                      ""CreatedByPersonAliasId"":null,
                      ""ModifiedByPersonAliasId"":1,
                      ""Attributes"":null,
                      ""AttributeValues"":null,
                      ""Id"":2,
                      ""Guid"":""8fedc6ee-8630-41ed-9fc5-c7157fd1eaa4"",
                      ""UrlEncodedKey"":""EAAAAHkbB7e!2bYK0Xdq9Ib9ePIpblOpW9jAghYRMyMWe9vjb3BF8mvzaL6CCNVZrs6zk4nNCgX9JkXkmY3KRudX!2bKO!2fg!3d"",
	                  ""ConnectionStatusValue"":{
                         ""Order"":0,
                         ""Name"":""Member"",
                         ""Description"":""Applied to individuals who have completed all requirements established to become a member."",
                         ""Id"":65,
                         ""Guid"":""41540783-d9ef-4c70-8f1d-c9e83d91ed5f"",
                      },
                      ""MaritalStatusValue"":{
                         ""Order"":0,
                         ""Name"":""Married"",
                         ""Description"":""Used with an individual is married."",
                         ""Id"":143,
                         ""Guid"":""5fe5a540-7d9f-433e-b47e-4229d1472248"",
                         ""UrlEncodedKey"":""EAAAAHiZvJY3Dkl85B1F8SJ2AnS8onTRarYspmUq5VOIkKRWurg4E913MdwkRq2tzQWF7qQoraHlMey24opvgDMvNQ8!3d""
                      },
                      ""PhoneNumbers"":[
                         {
                            ""NumberTypeValue"":{
                               ""Order"":1,
                               ""Name"":""Home"",
                               ""Description"":""Home phone number"",
                               ""Id"":13,
                               ""Guid"":""aa8732fb-2cea-4c76-8d6d-6aaa2c6a4303"",
                               ""UrlEncodedKey"":""EAAAABRiGGLD6CTiCKqb29OBr2KkOwimKb0BQp8oKV0gvKIzSAwNzMXg!2bwvQUHvY!2brdPIJZ7nBdJ1QcwbUsUwB7ITYc!3d""
                            },
                            ""CountryCode"":""1"",
                            ""Number"":""6235553322"",
                            ""NumberFormatted"":""(623) 555-3322"",
                            ""Extension"":null,
                            ""NumberTypeValueId"":13,
                            ""IsMessagingEnabled"":false,
                            ""IsUnlisted"":false,
                            ""Description"":null,
                            ""NumberFormattedWithCountryCode"":""+1 (623) 555-3322"",
                            ""Id"":1,
                            ""Guid"":""fdfbd202-a67e-4ea5-9cff-2b939593d054"",
                            ""UrlEncodedKey"":""EAAAALquQ6scz74JCg3iV50!2bnF0LIDQHyjyJOYxwRn7BSbFX4Z6Y76g7eBbFoXpkSQ67FjHd8VZ2M4!2bZzzbAHhKLYtA!3d""
                         },
                         {
                            ""NumberTypeValue"":{
                               ""Order"":2,
                               ""Name"":""Work"",
                               ""Description"":""Work phone number"",
                               ""Guid"":""2cc66d5a-f61c-4b74-9af9-590a9847c13c"",
                               ""UrlEncodedKey"":""EAAAAAXigHXhetFtBvzV!2bFC7PbJC!2bYcv77nHDYssZobfHDgyvd004RG7xxctsdccwZIHFajKAcfzgw2mwH7IS8iCJ8Y!3d""
                            },
                            ""CountryCode"":""1"",
                            ""Number"":""6235552444"",
                            ""NumberFormatted"":""(623) 555-2444"",
                            ""Extension"":null,
                            ""NumberTypeValueId"":136,
                            ""IsMessagingEnabled"":false,
                            ""IsUnlisted"":false,
                            ""Description"":null,
                            ""NumberFormattedWithCountryCode"":""+1 (623) 555-2444"",
                            ""Id"":3,
                            ""Guid"":""e26f602c-a742-4ee5-b332-5583b2bd31c0"",
                            ""UrlEncodedKey"":""EAAAADItUMe9!2bgCRZ3uugX9STAPz7fllpXVUFdK65R5DlIMYjyjCFDwQIJ7rp3tZrztTsAMsRk5AbuocEH3TvXY3Cgk!3d""
                         },
                         {
                            ""NumberTypeValue"":{
                               ""Order"":0,
                               ""Name"":""Mobile"",
                               ""Description"":""Mobile/Cell phone number"",
                               ""Id"":12,
                               ""Guid"":""407e7e45-7b2e-4fcd-9605-ecb1339f2453"",
                               ""UrlEncodedKey"":""EAAAANaN5diFoMocUiXgsoPb7g!2fwZ0NA8lvD8HPIevtFueL1YrEBGCM9GQF4FANqYrid4yQZm5nFUR!2bjt9JfpMf12Rg!3d""
                            },
                            ""CountryCode"":""1"",
                            ""Number"":""6238662792"",
                            ""NumberFormatted"":""(623) 866-2792"",
                            ""Extension"":null,
                            ""NumberTypeValueId"":12,
                            ""IsMessagingEnabled"":true,
                            ""IsUnlisted"":false,
                            ""Description"":null,
                            ""NumberFormattedWithCountryCode"":""+1 (623) 866-2792"",
                            ""Id"":15,
                            ""Guid"":""96e6b17e-7a18-4231-915a-27a98c02d4c4"",
                            ""UrlEncodedKey"":""EAAAADHSjNg82gKW!2bII0kmO3Wd3bKBOAOJjW8Mb!2buKiNGhzr4ElEd4G4PGz7YHoRWqb4ozsiOr3A7mhzJw0VZg!2fD7RY!3d""
                         }
                      ],
                      ""Photo"":{
                         ""BinaryFileType"":{
                            ""Name"":""Person Image"",
                            ""Description"":""Image of a Person"",
                            ""IconCssClass"":""fa fa-camera"",
	                    },
                         ""IsTemporary"":false,
                         ""BinaryFileTypeId"":5,
                         ""Url"":null,
                         ""FileName"":""decker_ted.jpg"",
                         ""MimeType"":""image/jpeg"",
                         ""Description"":null,
                         ""StorageEntityTypeId"":51,
                         ""CreatedDateTime"":null,
                         ""ModifiedDateTime"":null,
                         ""CreatedByPersonAliasId"":null,
                         ""ModifiedByPersonAliasId"":null,
                         ""Attributes"":null,
                         ""AttributeValues"":null,
                         ""Id"":36,
                         ""Guid"":""5c875f30-7e0e-4d2f-a14b-51aa01e1d887"",
                         ""UrlEncodedKey"":""EAAAAGGE!2budoDA82FsBBemJhMyckBepZzs6zblCc0RNJ1j!2bjtnP!2bbzTTGDffFM7brwVOaM!2f6i0Aa2iyc6U1DyorqpIw!3d""
                      },
                      ""RecordStatusReasonValue"":null,
                      ""RecordStatusValue"":{
                         ""Order"":0,
                         ""Name"":""Active"",
                         ""Description"":""Denotes an individual that is actively participating in the activities or services of the organization."",
                         ""Id"":3,
                         ""Guid"":""618f906c-c33d-4fa3-8aef-e58cb7b63f1e"",
                         ""UrlEncodedKey"":""EAAAABP8y!2bgB9EHvyeR2Tr7miJ9SXQRqyr7lNsl98PUWXOqXclMLzmnQVRm8Msmz0!2f1FwMsTsNjPLz6t!2fy1GRuB!2fNl4!3d""
                      },
                      ""RecordTypeValue"":{
                         ""Order"":0,
                         ""Name"":""Person"",
                         ""Description"":""A Person Record"",
                         ""Id"":1,
                         ""Guid"":""36cf10d6-c695-413d-8e7c-4546efef385e"",
                         ""UrlEncodedKey"":""EAAAAPmuNdsg7fGQlwQdnyA7NVA3cihjY2nm9crF18A629Vz33FJ8p7SARghTWQ8YJ2D!2fY5g8xsLCk6ImNq3UUczuno!3d""
                      },
                      ""ReviewReasonValue"":null,
                      ""SuffixValue"":null,
                      ""TitleValue"":null,
                   }
                }
                </pre>


                </div>
                ");
            RockMigrationHelper.AddDefinedTypeAttribute("2CACB86F-D811-4483-98E1-272F1FF8FF5D", "1B71FEF4-201F-4D53-8C60-2DF21F1985ED", "Campus", "Campus", "campus to post attendance to", 101, "76882ae3-1ce8-42a6-a2b6-8c0b29cf8cf8", "79E3B97B-A717-45AB-A279-335FCDEA141A");
            RockMigrationHelper.AddDefinedTypeAttribute("2CACB86F-D811-4483-98E1-272F1FF8FF5D", "46A03F59-55D3-4ACE-ADD5-B4642225DD20", "Text Attendance Workflow", "WorkflowType", "The type of workflow to launch.", 3, "", "0097D00F-1F29-4217-8E67-D37A619A6FA3");
            RockMigrationHelper.AddDefinedTypeAttribute("2CACB86F-D811-4483-98E1-272F1FF8FF5D", "73B02051-0D38-4AD9-BF81-A2D477DE4F70", "Workflow Attributes", "WorkflowAttributes", "Key/value list of workflow attributes to set with the given lava merge template. See the defined type’s help text for a listing of merge fields. <span class='tip tip-lava'></span>", 5, "", "836CFC0B-6750-4A93-8309-EAB868B845AF");
            RockMigrationHelper.AddDefinedTypeAttribute("2CACB86F-D811-4483-98E1-272F1FF8FF5D", "9C204CD0-1233-41C5-818A-C5DA439445AA", "Workflow Name Template", "WorkflowNameTemplate", "The lava template to use for setting the workflow name. See the defined type's help text for a listing of merge fields. <span class='tip tip-lava'></span>", 4, "", "67E09C64-3558-48B7-9A27-A9499D0826E8");
            RockMigrationHelper.AddDefinedTypeAttribute("2CACB86F-D811-4483-98E1-272F1FF8FF5D", "A75DFC58-7A1B-4799-BF31-451B2BBE38FF", "Keyword Expression", "KeywordExpression", "", 2, "", "3A526D6C-06FC-46CD-A447-9A6D9A74BB4F");
            RockMigrationHelper.AddDefinedTypeAttribute("2CACB86F-D811-4483-98E1-272F1FF8FF5D", "F4399CEF-827B-48B2-A735-F7806FCFE8E8", "AttendanceGroup", "AttendanceGroup", "The attendance group", 102, "7105fcd2-3b66-4b6c-9ab6-4ce5fd572a1e", "17B0E99E-2D10-442A-9342-1F9F07996C2B");
            RockMigrationHelper.AddDefinedValue("2CACB86F-D811-4483-98E1-272F1FF8FF5D", "+12082976885", "PF - Text Attendance Option (3) - Join a Homegroup", "3F2C3A7B-FCBC-45DD-AA80-16BFAE4C6FE5", false);
            RockMigrationHelper.AddDefinedValue("2CACB86F-D811-4483-98E1-272F1FF8FF5D", "+12082976885", "PF: Text Attendance Option (2) - Prayer Request", "2294DC3F-8539-4442-B30E-36D647C70261", false);
            RockMigrationHelper.AddDefinedValue("2CACB86F-D811-4483-98E1-272F1FF8FF5D", "+12082976885", "PF: Text Attendance Option (4) - Review Contact Info", "FE137A19-ECCE-44B5-9643-00C056CF2A72", false);
            RockMigrationHelper.AddDefinedValue("2CACB86F-D811-4483-98E1-272F1FF8FF5D", "+12082976885", "PF: Text Attendance Option (5) - Remove Last Attendance", "F3AE9577-2121-4971-BBED-CEBAB6AAF624", false);
            RockMigrationHelper.AddDefinedValue("2CACB86F-D811-4483-98E1-272F1FF8FF5D", "+12082976885", "PF: Text Attendance Prayer Request Final", "63BE76F0-73E8-4709-8606-D26A5C060DCF", false);
            RockMigrationHelper.AddDefinedValue("2CACB86F-D811-4483-98E1-272F1FF8FF5D", "+12082976885", "PF: Text in Attendance Option (1) - Check in Household", "BA83A4C4-1684-4755-BEEF-CE21E89A761B", false);
            RockMigrationHelper.AddDefinedValue("2CACB86F-D811-4483-98E1-272F1FF8FF5D", "+12082976885", "Post Falls WS - lifer####", "B4016741-F6B0-4E53-B0FB-BE05A8272F74", false);
            RockMigrationHelper.AddDefinedValueAttributeValue("2294DC3F-8539-4442-B30E-36D647C70261", "0097D00F-1F29-4217-8E67-D37A619A6FA3", @"8722ac70-d178-4306-bf91-eb2fbb11dfa2");
            RockMigrationHelper.AddDefinedValueAttributeValue("2294DC3F-8539-4442-B30E-36D647C70261", "17B0E99E-2D10-442A-9342-1F9F07996C2B", @"7105fcd2-3b66-4b6c-9ab6-4ce5fd572a1e");
            RockMigrationHelper.AddDefinedValueAttributeValue("2294DC3F-8539-4442-B30E-36D647C70261", "3A526D6C-06FC-46CD-A447-9A6D9A74BB4F", @"^2$");
            RockMigrationHelper.AddDefinedValueAttributeValue("2294DC3F-8539-4442-B30E-36D647C70261", "67E09C64-3558-48B7-9A27-A9499D0826E8", @"PF Message From: {{ FromPerson.FullName}}");
            RockMigrationHelper.AddDefinedValueAttributeValue("2294DC3F-8539-4442-B30E-36D647C70261", "79E3B97B-A717-45AB-A279-335FCDEA141A", @"76882ae3-1ce8-42a6-a2b6-8c0b29cf8cf8");
            RockMigrationHelper.AddDefinedValueAttributeValue("2294DC3F-8539-4442-B30E-36D647C70261", "836CFC0B-6750-4A93-8309-EAB868B845AF", @"FromPhone^{{FromPhone}}|ReceivedDateTime^{{ReceivedDateTime}}|MessageBody^{{MessageBody}}|");
            RockMigrationHelper.AddDefinedValueAttributeValue("3F2C3A7B-FCBC-45DD-AA80-16BFAE4C6FE5", "0097D00F-1F29-4217-8E67-D37A619A6FA3", @"ca876138-0461-40ad-ab4f-67678b8baeca");
            RockMigrationHelper.AddDefinedValueAttributeValue("3F2C3A7B-FCBC-45DD-AA80-16BFAE4C6FE5", "17B0E99E-2D10-442A-9342-1F9F07996C2B", @"7105fcd2-3b66-4b6c-9ab6-4ce5fd572a1e");
            RockMigrationHelper.AddDefinedValueAttributeValue("3F2C3A7B-FCBC-45DD-AA80-16BFAE4C6FE5", "3A526D6C-06FC-46CD-A447-9A6D9A74BB4F", @"^3.*");
            RockMigrationHelper.AddDefinedValueAttributeValue("3F2C3A7B-FCBC-45DD-AA80-16BFAE4C6FE5", "67E09C64-3558-48B7-9A27-A9499D0826E8", @"PF: Message for Joining a homegroup from {{ FromPerson.FullName}}");
            RockMigrationHelper.AddDefinedValueAttributeValue("3F2C3A7B-FCBC-45DD-AA80-16BFAE4C6FE5", "79E3B97B-A717-45AB-A279-335FCDEA141A", @"76882ae3-1ce8-42a6-a2b6-8c0b29cf8cf8");
            RockMigrationHelper.AddDefinedValueAttributeValue("3F2C3A7B-FCBC-45DD-AA80-16BFAE4C6FE5", "836CFC0B-6750-4A93-8309-EAB868B845AF", @"FromPhone^{{FromPhone}}|ReceivedDateTime^{{ ReceivedDateTime }}|Campus^Post Falls Campus|");
            RockMigrationHelper.AddDefinedValueAttributeValue("63BE76F0-73E8-4709-8606-D26A5C060DCF", "0097D00F-1F29-4217-8E67-D37A619A6FA3", @"88978527-0ca4-4c52-8fda-cf915fafa472");
            RockMigrationHelper.AddDefinedValueAttributeValue("63BE76F0-73E8-4709-8606-D26A5C060DCF", "17B0E99E-2D10-442A-9342-1F9F07996C2B", @"7105fcd2-3b66-4b6c-9ab6-4ce5fd572a1e");
            RockMigrationHelper.AddDefinedValueAttributeValue("63BE76F0-73E8-4709-8606-D26A5C060DCF", "3A526D6C-06FC-46CD-A447-9A6D9A74BB4F", @"^2.+");
            RockMigrationHelper.AddDefinedValueAttributeValue("63BE76F0-73E8-4709-8606-D26A5C060DCF", "67E09C64-3558-48B7-9A27-A9499D0826E8", @"PF: Prayer Request from {{ FromPerson.FullName }}");
            RockMigrationHelper.AddDefinedValueAttributeValue("63BE76F0-73E8-4709-8606-D26A5C060DCF", "79E3B97B-A717-45AB-A279-335FCDEA141A", @"76882ae3-1ce8-42a6-a2b6-8c0b29cf8cf8");
            RockMigrationHelper.AddDefinedValueAttributeValue("63BE76F0-73E8-4709-8606-D26A5C060DCF", "836CFC0B-6750-4A93-8309-EAB868B845AF", @"FromPhone^{{FromPhone}}|MessageBody^{{MessageBody}}|");
            RockMigrationHelper.AddDefinedValueAttributeValue("B4016741-F6B0-4E53-B0FB-BE05A8272F74", "0097D00F-1F29-4217-8E67-D37A619A6FA3", @"d8354ea7-7da9-449d-94ee-210c6b9496d8");
            RockMigrationHelper.AddDefinedValueAttributeValue("B4016741-F6B0-4E53-B0FB-BE05A8272F74", "17B0E99E-2D10-442A-9342-1F9F07996C2B", @"a6978ce3-11ad-42fc-9df7-6a00c40b4797");
            RockMigrationHelper.AddDefinedValueAttributeValue("B4016741-F6B0-4E53-B0FB-BE05A8272F74", "3A526D6C-06FC-46CD-A447-9A6D9A74BB4F", @"(?i)lifer[0-9]...");
            RockMigrationHelper.AddDefinedValueAttributeValue("B4016741-F6B0-4E53-B0FB-BE05A8272F74", "67E09C64-3558-48B7-9A27-A9499D0826E8", @"PF Message from: {{ FromPerson.FullName }}");
            RockMigrationHelper.AddDefinedValueAttributeValue("B4016741-F6B0-4E53-B0FB-BE05A8272F74", "79E3B97B-A717-45AB-A279-335FCDEA141A", @"76882ae3-1ce8-42a6-a2b6-8c0b29cf8cf8");
            RockMigrationHelper.AddDefinedValueAttributeValue("B4016741-F6B0-4E53-B0FB-BE05A8272F74", "836CFC0B-6750-4A93-8309-EAB868B845AF", @"FromPhone^{{ FromPhone }}|ReceivedDateTime^{{ ReceivedDateTime}}|MessageBody^{{ MessageBody }}|ReceivedDate^{{ReceivedDate}}|ReceivedTime^{{ReceivedTime}}|Campus^Post Falls Campus|AttendanceGroup^Post Falls Worship Service|");
            RockMigrationHelper.AddDefinedValueAttributeValue("BA83A4C4-1684-4755-BEEF-CE21E89A761B", "0097D00F-1F29-4217-8E67-D37A619A6FA3", @"c5fe671a-c3ca-4785-95dd-3cb10f4308b0");
            RockMigrationHelper.AddDefinedValueAttributeValue("BA83A4C4-1684-4755-BEEF-CE21E89A761B", "17B0E99E-2D10-442A-9342-1F9F07996C2B", @"a6978ce3-11ad-42fc-9df7-6a00c40b4797");
            RockMigrationHelper.AddDefinedValueAttributeValue("BA83A4C4-1684-4755-BEEF-CE21E89A761B", "3A526D6C-06FC-46CD-A447-9A6D9A74BB4F", @"^1.*");
            RockMigrationHelper.AddDefinedValueAttributeValue("BA83A4C4-1684-4755-BEEF-CE21E89A761B", "67E09C64-3558-48B7-9A27-A9499D0826E8", @"PF Message From: {{ FromPerson.FullName}}");
            RockMigrationHelper.AddDefinedValueAttributeValue("BA83A4C4-1684-4755-BEEF-CE21E89A761B", "79E3B97B-A717-45AB-A279-335FCDEA141A", @"76882ae3-1ce8-42a6-a2b6-8c0b29cf8cf8");
            RockMigrationHelper.AddDefinedValueAttributeValue("BA83A4C4-1684-4755-BEEF-CE21E89A761B", "836CFC0B-6750-4A93-8309-EAB868B845AF", @"FromPhone^{{FromPhone}}|ReceivedDateTime^{{ReceivedDateTime}}|Campus^Post Falls Campus|AttendanceGroup^Post Falls Worship Service|");
            RockMigrationHelper.AddDefinedValueAttributeValue("F3AE9577-2121-4971-BBED-CEBAB6AAF624", "0097D00F-1F29-4217-8E67-D37A619A6FA3", @"a74396b8-4723-4be7-9f4a-14506c921fc8");
            RockMigrationHelper.AddDefinedValueAttributeValue("F3AE9577-2121-4971-BBED-CEBAB6AAF624", "17B0E99E-2D10-442A-9342-1F9F07996C2B", @"7105fcd2-3b66-4b6c-9ab6-4ce5fd572a1e");
            RockMigrationHelper.AddDefinedValueAttributeValue("F3AE9577-2121-4971-BBED-CEBAB6AAF624", "3A526D6C-06FC-46CD-A447-9A6D9A74BB4F", @"^5.*");
            RockMigrationHelper.AddDefinedValueAttributeValue("F3AE9577-2121-4971-BBED-CEBAB6AAF624", "67E09C64-3558-48B7-9A27-A9499D0826E8", @"PF Message From: {{ FromPerson.FullName}}");
            RockMigrationHelper.AddDefinedValueAttributeValue("F3AE9577-2121-4971-BBED-CEBAB6AAF624", "79E3B97B-A717-45AB-A279-335FCDEA141A", @"76882ae3-1ce8-42a6-a2b6-8c0b29cf8cf8");
            RockMigrationHelper.AddDefinedValueAttributeValue("F3AE9577-2121-4971-BBED-CEBAB6AAF624", "836CFC0B-6750-4A93-8309-EAB868B845AF", @"FromPhone^{{FromPhone}}|ReceivedDateTime^{{ReceivedDateTime}}|MessageBody^{{MessageBody}}|");
            RockMigrationHelper.AddDefinedValueAttributeValue("FE137A19-ECCE-44B5-9643-00C056CF2A72", "0097D00F-1F29-4217-8E67-D37A619A6FA3", @"feb34437-9600-4330-855f-85404ec10018");
            RockMigrationHelper.AddDefinedValueAttributeValue("FE137A19-ECCE-44B5-9643-00C056CF2A72", "17B0E99E-2D10-442A-9342-1F9F07996C2B", @"7105fcd2-3b66-4b6c-9ab6-4ce5fd572a1e");
            RockMigrationHelper.AddDefinedValueAttributeValue("FE137A19-ECCE-44B5-9643-00C056CF2A72", "3A526D6C-06FC-46CD-A447-9A6D9A74BB4F", @"^4.*");
            RockMigrationHelper.AddDefinedValueAttributeValue("FE137A19-ECCE-44B5-9643-00C056CF2A72", "67E09C64-3558-48B7-9A27-A9499D0826E8", @"PF Message From: {{ FromPerson.FullName}}");
            RockMigrationHelper.AddDefinedValueAttributeValue("FE137A19-ECCE-44B5-9643-00C056CF2A72", "79E3B97B-A717-45AB-A279-335FCDEA141A", @"76882ae3-1ce8-42a6-a2b6-8c0b29cf8cf8");
            RockMigrationHelper.AddDefinedValueAttributeValue("FE137A19-ECCE-44B5-9643-00C056CF2A72", "836CFC0B-6750-4A93-8309-EAB868B845AF", @"FromPhone^{{FromPhone}}|ReceivedDateTime^{{ReceivedDateTime}}|MessageBody^{{MessageBody}}|");

            // CDA Campus Defined Values
            Guid guidCDA = Guid.NewGuid();

            RockMigrationHelper.AddDefinedValue("2CACB86F-D811-4483-98E1-272F1FF8FF5D", "+12084491990", "CDA WS - lifer####", guidCDA.ToString(), false);
            Guid guidOption1 = Guid.NewGuid();

            RockMigrationHelper.AddDefinedValue("2CACB86F-D811-4483-98E1-272F1FF8FF5D", "+12084491990", "CDA: Text in Attendance Option (1) - Check in Household", guidOption1.ToString(), false);
            Guid guidOption2 = Guid.NewGuid();

            RockMigrationHelper.AddDefinedValue("2CACB86F-D811-4483-98E1-272F1FF8FF5D", "+12084491990", "CDA: Text Attendance Option (2) - Prayer Request", guidOption2.ToString(), false);
            Guid guidOption3 = Guid.NewGuid();

            RockMigrationHelper.AddDefinedValue("2CACB86F-D811-4483-98E1-272F1FF8FF5D", "+12084491990", "CDA - Text Attendance Option (3) - Join a Homegroup", guidOption3.ToString(), false);
            Guid guidOption4 = Guid.NewGuid();

            RockMigrationHelper.AddDefinedValue("2CACB86F-D811-4483-98E1-272F1FF8FF5D", "+12084491990", "CDA: Text Attendance Option (4) - Review Contact Info", guidOption4.ToString(), false);
            Guid guidOption5 = Guid.NewGuid();

            RockMigrationHelper.AddDefinedValue("2CACB86F-D811-4483-98E1-272F1FF8FF5D", "+12084491990", "CDA: Text Attendance Option (5) - Remove Last Attendance", guidOption5.ToString(), false);
            Guid guidOptionPR = Guid.NewGuid();

            RockMigrationHelper.AddDefinedValue("2CACB86F-D811-4483-98E1-272F1FF8FF5D", "+12084491990", "CDA: Text Attendance Prayer Request Final", guidOptionPR.ToString(), false);
            string rlmCDACampusGuid          = "84BE9A09-9E7D-4875-A3F9-C8949BC023BA";
            string rlmCDAAttendanceGroupGuid = "B47ED326-EB99-4A31-9E80-BA91B905B5E6";

            RockMigrationHelper.AddDefinedValueAttributeValue(guidCDA.ToString(), "0097D00F-1F29-4217-8E67-D37A619A6FA3", @"d8354ea7-7da9-449d-94ee-210c6b9496d8");
            RockMigrationHelper.AddDefinedValueAttributeValue(guidCDA.ToString(), "17B0E99E-2D10-442A-9342-1F9F07996C2B", rlmCDAAttendanceGroupGuid);
            RockMigrationHelper.AddDefinedValueAttributeValue(guidCDA.ToString(), "3A526D6C-06FC-46CD-A447-9A6D9A74BB4F", @"(?i)lifer[0-9]...");
            RockMigrationHelper.AddDefinedValueAttributeValue(guidCDA.ToString(), "67E09C64-3558-48B7-9A27-A9499D0826E8", @"CDA Message from: {{ FromPerson.FullName }}");
            RockMigrationHelper.AddDefinedValueAttributeValue(guidCDA.ToString(), "79E3B97B-A717-45AB-A279-335FCDEA141A", rlmCDACampusGuid);
            RockMigrationHelper.AddDefinedValueAttributeValue(guidCDA.ToString(), "836CFC0B-6750-4A93-8309-EAB868B845AF", @"FromPhone^{{ FromPhone }}|ReceivedDateTime^{{ ReceivedDateTime}}|MessageBody^{{ MessageBody }}|ReceivedDate^{{ReceivedDate}}|ReceivedTime^{{ReceivedTime}}|Campus^Coeur d'Alene Campus|AttendanceGroup^RLM CDA Weekend Worship|");

            RockMigrationHelper.AddDefinedValueAttributeValue(guidOption1.ToString(), "0097D00F-1F29-4217-8E67-D37A619A6FA3", @"c5fe671a-c3ca-4785-95dd-3cb10f4308b0");
            RockMigrationHelper.AddDefinedValueAttributeValue(guidOption1.ToString(), "17B0E99E-2D10-442A-9342-1F9F07996C2B", rlmCDAAttendanceGroupGuid);
            RockMigrationHelper.AddDefinedValueAttributeValue(guidOption1.ToString(), "3A526D6C-06FC-46CD-A447-9A6D9A74BB4F", @"^1.*");
            RockMigrationHelper.AddDefinedValueAttributeValue(guidOption1.ToString(), "67E09C64-3558-48B7-9A27-A9499D0826E8", @"PF Message From: {{ FromPerson.FullName}}");
            RockMigrationHelper.AddDefinedValueAttributeValue(guidOption1.ToString(), "79E3B97B-A717-45AB-A279-335FCDEA141A", rlmCDACampusGuid);
            RockMigrationHelper.AddDefinedValueAttributeValue(guidOption1.ToString(), "836CFC0B-6750-4A93-8309-EAB868B845AF", @"FromPhone^{{FromPhone}}|ReceivedDateTime^{{ReceivedDateTime}}|Campus^Coeur d'Alene Campus|AttendanceGroup^RLM CDA Weekend Worship|");

            RockMigrationHelper.AddDefinedValueAttributeValue(guidOption2.ToString(), "0097D00F-1F29-4217-8E67-D37A619A6FA3", @"8722ac70-d178-4306-bf91-eb2fbb11dfa2");
            RockMigrationHelper.AddDefinedValueAttributeValue(guidOption2.ToString(), "17B0E99E-2D10-442A-9342-1F9F07996C2B", rlmCDAAttendanceGroupGuid);
            RockMigrationHelper.AddDefinedValueAttributeValue(guidOption2.ToString(), "3A526D6C-06FC-46CD-A447-9A6D9A74BB4F", @"^2$");
            RockMigrationHelper.AddDefinedValueAttributeValue(guidOption2.ToString(), "67E09C64-3558-48B7-9A27-A9499D0826E8", @"PF Message From: {{ FromPerson.FullName}}");
            RockMigrationHelper.AddDefinedValueAttributeValue(guidOption2.ToString(), "79E3B97B-A717-45AB-A279-335FCDEA141A", rlmCDACampusGuid);
            RockMigrationHelper.AddDefinedValueAttributeValue(guidOption2.ToString(), "836CFC0B-6750-4A93-8309-EAB868B845AF", @"FromPhone^{{FromPhone}}|ReceivedDateTime^{{ReceivedDateTime}}|MessageBody^{{MessageBody}}|");

            RockMigrationHelper.AddDefinedValueAttributeValue(guidOptionPR.ToString(), "0097D00F-1F29-4217-8E67-D37A619A6FA3", @"88978527-0ca4-4c52-8fda-cf915fafa472");
            RockMigrationHelper.AddDefinedValueAttributeValue(guidOptionPR.ToString(), "17B0E99E-2D10-442A-9342-1F9F07996C2B", rlmCDAAttendanceGroupGuid);
            RockMigrationHelper.AddDefinedValueAttributeValue(guidOptionPR.ToString(), "3A526D6C-06FC-46CD-A447-9A6D9A74BB4F", @"^2.+");
            RockMigrationHelper.AddDefinedValueAttributeValue(guidOptionPR.ToString(), "67E09C64-3558-48B7-9A27-A9499D0826E8", @"PF: Prayer Request from {{ FromPerson.FullName }}");
            RockMigrationHelper.AddDefinedValueAttributeValue(guidOptionPR.ToString(), "79E3B97B-A717-45AB-A279-335FCDEA141A", rlmCDACampusGuid);
            RockMigrationHelper.AddDefinedValueAttributeValue(guidOptionPR.ToString(), "836CFC0B-6750-4A93-8309-EAB868B845AF", @"FromPhone^{{FromPhone}}|MessageBody^{{MessageBody}}|");

            RockMigrationHelper.AddDefinedValueAttributeValue(guidOption3.ToString(), "0097D00F-1F29-4217-8E67-D37A619A6FA3", @"ca876138-0461-40ad-ab4f-67678b8baeca");
            RockMigrationHelper.AddDefinedValueAttributeValue(guidOption3.ToString(), "17B0E99E-2D10-442A-9342-1F9F07996C2B", rlmCDAAttendanceGroupGuid);
            RockMigrationHelper.AddDefinedValueAttributeValue(guidOption3.ToString(), "3A526D6C-06FC-46CD-A447-9A6D9A74BB4F", @"^3.*");
            RockMigrationHelper.AddDefinedValueAttributeValue(guidOption3.ToString(), "67E09C64-3558-48B7-9A27-A9499D0826E8", @"PF: Message for Joining a homegroup from {{ FromPerson.FullName}}");
            RockMigrationHelper.AddDefinedValueAttributeValue(guidOption3.ToString(), "79E3B97B-A717-45AB-A279-335FCDEA141A", rlmCDACampusGuid);
            RockMigrationHelper.AddDefinedValueAttributeValue(guidOption3.ToString(), "836CFC0B-6750-4A93-8309-EAB868B845AF", @"FromPhone^{{FromPhone}}|ReceivedDateTime^{{ ReceivedDateTime }}|Campus^Coeur d'Alene Campus|");

            RockMigrationHelper.AddDefinedValueAttributeValue(guidOption4.ToString(), "0097D00F-1F29-4217-8E67-D37A619A6FA3", @"feb34437-9600-4330-855f-85404ec10018");
            RockMigrationHelper.AddDefinedValueAttributeValue(guidOption4.ToString(), "17B0E99E-2D10-442A-9342-1F9F07996C2B", rlmCDAAttendanceGroupGuid);
            RockMigrationHelper.AddDefinedValueAttributeValue(guidOption4.ToString(), "3A526D6C-06FC-46CD-A447-9A6D9A74BB4F", @"^4.*");
            RockMigrationHelper.AddDefinedValueAttributeValue(guidOption4.ToString(), "67E09C64-3558-48B7-9A27-A9499D0826E8", @"PF Message From: {{ FromPerson.FullName}}");
            RockMigrationHelper.AddDefinedValueAttributeValue(guidOption4.ToString(), "79E3B97B-A717-45AB-A279-335FCDEA141A", rlmCDACampusGuid);
            RockMigrationHelper.AddDefinedValueAttributeValue(guidOption4.ToString(), "836CFC0B-6750-4A93-8309-EAB868B845AF", @"FromPhone^{{FromPhone}}|ReceivedDateTime^{{ReceivedDateTime}}|MessageBody^{{MessageBody}}|");

            RockMigrationHelper.AddDefinedValueAttributeValue(guidOption5.ToString(), "0097D00F-1F29-4217-8E67-D37A619A6FA3", @"a74396b8-4723-4be7-9f4a-14506c921fc8");
            RockMigrationHelper.AddDefinedValueAttributeValue(guidOption5.ToString(), "17B0E99E-2D10-442A-9342-1F9F07996C2B", rlmCDAAttendanceGroupGuid);
            RockMigrationHelper.AddDefinedValueAttributeValue(guidOption5.ToString(), "3A526D6C-06FC-46CD-A447-9A6D9A74BB4F", @"^5.*");
            RockMigrationHelper.AddDefinedValueAttributeValue(guidOption5.ToString(), "67E09C64-3558-48B7-9A27-A9499D0826E8", @"PF Message From: {{ FromPerson.FullName}}");
            RockMigrationHelper.AddDefinedValueAttributeValue(guidOption5.ToString(), "79E3B97B-A717-45AB-A279-335FCDEA141A", rlmCDACampusGuid);
            RockMigrationHelper.AddDefinedValueAttributeValue(guidOption5.ToString(), "836CFC0B-6750-4A93-8309-EAB868B845AF", @"FromPhone^{{FromPhone}}|ReceivedDateTime^{{ReceivedDateTime}}|MessageBody^{{MessageBody}}|");
        }
Example #27
0
        /// <summary>
        /// Operations to be performed during the upgrade process.
        /// </summary>
        public override void Up()
        {
            //Defined Types
            RockMigrationHelper.AddDefinedType("Financial", "Benevolence Request Status", "The status of a benevolence request.", "2787B088-D607-4D69-84FF-850A6891EE34", @"");
            RockMigrationHelper.AddDefinedType("Financial", "Benevolence Result Type", "The type of response given to a benevolence request.", "35FC0225-3DAC-48B4-BDF7-AFDE104FB60E", @"");
            RockMigrationHelper.AddDefinedValue("2787B088-D607-4D69-84FF-850A6891EE34", "Pending", "", "67B24629-62A9-436A-A98C-30A454642153", false);
            RockMigrationHelper.AddDefinedValue("2787B088-D607-4D69-84FF-850A6891EE34", "Approved", "", "18D3A2DA-F2BA-49AE-83EB-7E60DCD18A3B", false);
            RockMigrationHelper.AddDefinedValue("2787B088-D607-4D69-84FF-850A6891EE34", "Denied", "", "3720671E-DA48-405F-A6D5-5E2D47436F9A", false);
            RockMigrationHelper.AddDefinedValue("35FC0225-3DAC-48B4-BDF7-AFDE104FB60E", "Provided Financial Assistance", "", "4FEEDE75-0663-47E5-B1D0-A9639FAF197B", false);
            RockMigrationHelper.AddDefinedValue("35FC0225-3DAC-48B4-BDF7-AFDE104FB60E", "Provided Gift Card", "", "78CE59CC-3E3B-47DE-8116-7B898319DE9E", false);
            RockMigrationHelper.AddDefinedValue("35FC0225-3DAC-48B4-BDF7-AFDE104FB60E", "Provided Services", "", "C4C36847-0E86-4667-A28D-CB88D3BDEB7E", false);
            RockMigrationHelper.AddDefinedValue("35FC0225-3DAC-48B4-BDF7-AFDE104FB60E", "Referred to Counseling", "", "43066522-55A2-4A2B-8340-17E927EC1B8D", false);
            RockMigrationHelper.AddDefinedValue("35FC0225-3DAC-48B4-BDF7-AFDE104FB60E", "Referred to Food Pantry", "", "C70395A7-7F71-4F14-A599-BB4635ABFF2D", false);
            RockMigrationHelper.AddDefinedValue("35FC0225-3DAC-48B4-BDF7-AFDE104FB60E", "Unable to Make Contact", "", "CDF5D13E-4636-489C-85F9-95D42EF11895", false);

            //Model
            CreateTable(
                "dbo.BenevolenceRequest",
                c => new
            {
                Id        = c.Int(nullable: false, identity: true),
                FirstName = c.String(nullable: false, maxLength: 50),
                LastName  = c.String(nullable: false, maxLength: 50),
                Email     = c.String(maxLength: 254),
                RequestedByPersonAliasId = c.Int(),
                RequestText             = c.String(nullable: false),
                RequestDateTime         = c.DateTime(nullable: false),
                HomePhoneNumber         = c.String(),
                CellPhoneNumber         = c.String(),
                WorkPhoneNumber         = c.String(),
                CaseWorkerPersonAliasId = c.Int(),
                GovernmentId            = c.String(),
                RequestStatusValueId    = c.Int(nullable: false),
                ResultSummary           = c.String(),
                ConnectionStatusValueId = c.Int(),
                LocationId              = c.Int(),
                CreatedDateTime         = c.DateTime(),
                ModifiedDateTime        = c.DateTime(),
                CreatedByPersonAliasId  = c.Int(),
                ModifiedByPersonAliasId = c.Int(),
                Guid      = c.Guid(nullable: false),
                ForeignId = c.String(maxLength: 50),
            })
            .PrimaryKey(t => t.Id)
            .ForeignKey("dbo.PersonAlias", t => t.CaseWorkerPersonAliasId)
            .ForeignKey("dbo.DefinedValue", t => t.ConnectionStatusValueId)
            .ForeignKey("dbo.PersonAlias", t => t.CreatedByPersonAliasId)
            .ForeignKey("dbo.Location", t => t.LocationId)
            .ForeignKey("dbo.PersonAlias", t => t.ModifiedByPersonAliasId)
            .ForeignKey("dbo.PersonAlias", t => t.RequestedByPersonAliasId)
            .ForeignKey("dbo.DefinedValue", t => t.RequestStatusValueId)
            .Index(t => t.RequestedByPersonAliasId)
            .Index(t => t.CaseWorkerPersonAliasId)
            .Index(t => t.RequestStatusValueId)
            .Index(t => t.ConnectionStatusValueId)
            .Index(t => t.LocationId)
            .Index(t => t.CreatedByPersonAliasId)
            .Index(t => t.ModifiedByPersonAliasId)
            .Index(t => t.Guid, unique: true);

            CreateTable(
                "dbo.BenevolenceResult",
                c => new
            {
                Id = c.Int(nullable: false, identity: true),
                BenevolenceRequestId = c.Int(nullable: false),
                ResultTypeValueId    = c.Int(nullable: false),
                Amount                  = c.Decimal(precision: 18, scale: 2),
                ResultSummary           = c.String(),
                CreatedDateTime         = c.DateTime(),
                ModifiedDateTime        = c.DateTime(),
                CreatedByPersonAliasId  = c.Int(),
                ModifiedByPersonAliasId = c.Int(),
                Guid      = c.Guid(nullable: false),
                ForeignId = c.String(maxLength: 50),
            })
            .PrimaryKey(t => t.Id)
            .ForeignKey("dbo.BenevolenceRequest", t => t.BenevolenceRequestId)
            .ForeignKey("dbo.PersonAlias", t => t.CreatedByPersonAliasId)
            .ForeignKey("dbo.PersonAlias", t => t.ModifiedByPersonAliasId)
            .ForeignKey("dbo.DefinedValue", t => t.ResultTypeValueId)
            .Index(t => t.BenevolenceRequestId)
            .Index(t => t.ResultTypeValueId)
            .Index(t => t.CreatedByPersonAliasId)
            .Index(t => t.ModifiedByPersonAliasId)
            .Index(t => t.Guid, unique: true);

            // Add Benevolence Blocks
            RockMigrationHelper.UpdateBlockType("Benevolence Request List", "Block used to list Benevolence Requests.", "~/Blocks/Finance/BenevolenceRequestList.ascx", "Finance", "3131C55A-8753-435F-85F3-DF777EFBD1C8");
            RockMigrationHelper.AddBlockTypeAttribute("3131C55A-8753-435F-85F3-DF777EFBD1C8", "BD53F9C9-EBA9-4D3F-82EA-DE5DD34A8108", "Detail Page", "DetailPage", "", "", 0, @"", "E2C90243-A79A-4DAD-9301-07F6DF095CDB");
            RockMigrationHelper.AddBlockTypeAttribute("3131C55A-8753-435F-85F3-DF777EFBD1C8", "F4399CEF-827B-48B2-A735-F7806FCFE8E8", "Case Worker Group", "CaseWorkerGroup", "", "The group to draw case workers from", 0, @"26E7148C-2059-4F45-BCFE-32230A12F0DC", "576E31E0-EE40-4A89-93AE-5CCF1F45D21F");

            RockMigrationHelper.UpdateBlockType("Benevolence Request Detail", "Block for users to create, edit, and view benevolence requests.", "~/Blocks/Finance/BenevolenceRequestDetail.ascx", "Finance", "34275D0E-BC7E-4A9C-913E-623D086159A1");
            RockMigrationHelper.AddBlockTypeAttribute("34275D0E-BC7E-4A9C-913E-623D086159A1", "F4399CEF-827B-48B2-A735-F7806FCFE8E8", "Case Worker Group", "CaseWorkerGroup", "", "The group to draw case workers from", 0, @"26E7148C-2059-4F45-BCFE-32230A12F0DC", "89EA176C-2CEB-46F4-AACC-6AF55F5C42B0");
        }
        /// <summary>
        /// Down migration for SK: Update Display Lava Attribute of Content Component
        /// </summary>
        private void DisplayLavaAttributeOfContentComponentDown()
        {
            RockMigrationHelper.UpdateDefinedValueAttributeValue("3E7D4D0C-8238-4A5F-9E5F-34E4DFBF7725", "FF5C0A7E-F3CD-46F0-934D-7C73B7CC35EE", @"{% assign channelTitleSize  =  ContentChannel | Attribute:'TitleSize' | Default:'h1' %}
{% assign channelContentAlignment  =  ContentChannel | Attribute:'ContentAlignment ' %}
{% assign channelForegroundColor  =  ContentChannel | Attribute:'ForegroundColor' %}
{% assign channelBackgroundColor =  ContentChannel | Attribute:'BackgroundColor' %}
{% assign contentItemStyle = '' %}

{% for item in Items %}
    {% if channelBackgroundColor != '' %}
        {% capture contentItemStyle %}{{ contentItemStyle }}background-color:{{ channelBackgroundColor }};{% endcapture %}
    {% endif %}
    {% if channelForegroundColor != '' %}
        {% capture contentItemStyle %}{{ contentItemStyle }}color:{{ channelForegroundColor }};{% endcapture %}
    {% endif %}

    <div class='content-item' style='{{ contentItemStyle }}'>
    
    <{{ channelTitleSize }}>{{ item.Title }}</{{ channelTitleSize }}>
    
    {{ item.Content }}
    
    {% assign imageGuid = item | Attribute:'Image','RawValue' %}
        {% if imageGuid != '' %}
            <img alt=""{{ item.Title }}"" src=""/GetImage.ashx?Guid={{ imageGuid }}"" class=""title-image img-responsive"">
        {% endif %}
    </div>
{% endfor %}");

            RockMigrationHelper.UpdateDefinedValueAttributeValue("54A6FE8C-B38F-46DB-81F7-A7648886B592", "FF5C0A7E-F3CD-46F0-934D-7C73B7CC35EE", @"{% assign channelTitleSize  =  ContentChannel | Attribute:'TitleSize' | Default:'h1' %}
{% assign channelContentAlignment  =  ContentChannel | Attribute:'ContentAlignment ' %}
{% assign channelForegroundColor  =  ContentChannel | Attribute:'ForegroundColor' %}
{% assign channelBackgroundColor =  ContentChannel | Attribute:'BackgroundColor' %}
{% assign contentItemStyle = '' %}

{% for item in Items %}
    {% if channelBackgroundColor != '' %}
        {% capture contentItemStyle %}{{ contentItemStyle }}background-color:{{ channelBackgroundColor }};{% endcapture %}
    {% endif %}
    {% if channelForegroundColor != '' %}
        {% capture contentItemStyle %}{{ contentItemStyle }}color:{{ channelForegroundColor }};{% endcapture %}
    {% endif %}

    <div class='content-item' style='{{ contentItemStyle }}'>
    
    <{{ channelTitleSize }}>{{ item.Title }}</{{ channelTitleSize }}>
    
    {{ item.Content }}
    
    {% assign imageGuid = item | Attribute:'Image','RawValue' %}
        {% if imageGuid != '' %}
            <img alt=""{{ item.Title }}"" src=""/GetImage.ashx?Guid={{ imageGuid }}"" class=""title-image img-responsive"">
        {% endif %}
    </div>
{% endfor %}");

            RockMigrationHelper.UpdateDefinedValueAttributeValue("EC429625-767E-4F69-BB48-F55DA3C836A3", "FF5C0A7E-F3CD-46F0-934D-7C73B7CC35EE", @"{% assign channelTitleSize  =  ContentChannel | Attribute:'TitleSize' | Default:'h1' %}
{% assign channelContentAlignment  =  ContentChannel | Attribute:'ContentAlignment ' %}
{% assign channelForegroundColor  =  ContentChannel | Attribute:'ForegroundColor' %}
{% assign channelBackgroundColor =  ContentChannel | Attribute:'BackgroundColor' %}
{% assign contentItemStyle = '' %}

{% for item in Items %}
    {% if channelBackgroundColor != '' %}
        {% capture contentItemStyle %}{{ contentItemStyle }}background-color:{{ channelBackgroundColor }};{% endcapture %}
    {% endif %}
    {% if channelForegroundColor != '' %}
        {% capture contentItemStyle %}{{ contentItemStyle }}color:{{ channelForegroundColor }};{% endcapture %}
    {% endif %}

    <div class='content-item' style='{{ contentItemStyle }}'>
    
    <{{ channelTitleSize }}>{{ item.Title }}</{{ channelTitleSize }}>
    
    {{ item.Content }}
    
    {% assign imageGuid = item | Attribute:'Image','RawValue' %}
        {% if imageGuid != '' %}
            <img alt=""{{ item.Title }}"" src=""/GetImage.ashx?Guid={{ imageGuid }}"" class=""title-image img-responsive"">
        {% endif %}
    </div>
{% endfor %}");

            RockMigrationHelper.AddDefinedValue("313B579F-F442-4247-ADBB-BBD25E255003", "Ad Unit", string.Empty, "902D960C-0B7B-425E-9CEA-94CF215AABE4", true);
        }
Example #29
0
 public override void Up()
 {
     RockMigrationHelper.AddDefinedValue(Rock.SystemGuid.DefinedType.CACHE_TAGS, Constants.CACHE_TAG, "Cache tag for SECC Family Checkin");
 }
Example #30
0
        public override void Up()
        {
            // CDA Campus Defined Values

            RockMigrationHelper.AddDefinedValue("2CACB86F-D811-4483-98E1-272F1FF8FF5D", "+12084491990", "CDA WS - lifer####", guidCDA.ToString(), false);
            RockMigrationHelper.AddDefinedValue("2CACB86F-D811-4483-98E1-272F1FF8FF5D", "+12084491990", "CDA: Text in Attendance Option (1) - Check in Household", guidOption1.ToString(), false);
            RockMigrationHelper.AddDefinedValue("2CACB86F-D811-4483-98E1-272F1FF8FF5D", "+12084491990", "CDA: Text Attendance Option (2) - Prayer Request", guidOption2.ToString(), false);
            RockMigrationHelper.AddDefinedValue("2CACB86F-D811-4483-98E1-272F1FF8FF5D", "+12084491990", "CDA - Text Attendance Option (3) - Join a Homegroup", guidOption3.ToString(), false);
            RockMigrationHelper.AddDefinedValue("2CACB86F-D811-4483-98E1-272F1FF8FF5D", "+12084491990", "CDA: Text Attendance Option (4) - Review Contact Info", guidOption4.ToString(), false);
            RockMigrationHelper.AddDefinedValue("2CACB86F-D811-4483-98E1-272F1FF8FF5D", "+12084491990", "CDA: Text Attendance Option (5) - Remove Last Attendance", guidOption5.ToString(), false);
            RockMigrationHelper.AddDefinedValue("2CACB86F-D811-4483-98E1-272F1FF8FF5D", "+12084491990", "CDA: Text Attendance Prayer Request Final", guidOptionPR.ToString(), false);

            RockMigrationHelper.AddDefinedValueAttributeValue(guidCDA.ToString(), "0097D00F-1F29-4217-8E67-D37A619A6FA3", @"d8354ea7-7da9-449d-94ee-210c6b9496d8");
            RockMigrationHelper.AddDefinedValueAttributeValue(guidCDA.ToString(), "17B0E99E-2D10-442A-9342-1F9F07996C2B", rlmCDAAttendanceGroupGuid);
            RockMigrationHelper.AddDefinedValueAttributeValue(guidCDA.ToString(), "3A526D6C-06FC-46CD-A447-9A6D9A74BB4F", @"(?i)lifer[0-9]...");
            RockMigrationHelper.AddDefinedValueAttributeValue(guidCDA.ToString(), "67E09C64-3558-48B7-9A27-A9499D0826E8", @"CDA Message from: {{ FromPerson.FullName }}");
            RockMigrationHelper.AddDefinedValueAttributeValue(guidCDA.ToString(), "79E3B97B-A717-45AB-A279-335FCDEA141A", rlmCDACampusGuid);
            RockMigrationHelper.AddDefinedValueAttributeValue(guidCDA.ToString(), "836CFC0B-6750-4A93-8309-EAB868B845AF", @"FromPhone^{{ FromPhone }}|ReceivedDateTime^{{ ReceivedDateTime}}|MessageBody^{{ MessageBody }}|ReceivedDate^{{ReceivedDate}}|ReceivedTime^{{ReceivedTime}}|Campus^Coeur d'Alene Campus|AttendanceGroup^RLM CDA Weekend Worship|");

            RockMigrationHelper.AddDefinedValueAttributeValue(guidOption1.ToString(), "0097D00F-1F29-4217-8E67-D37A619A6FA3", @"c5fe671a-c3ca-4785-95dd-3cb10f4308b0");
            RockMigrationHelper.AddDefinedValueAttributeValue(guidOption1.ToString(), "17B0E99E-2D10-442A-9342-1F9F07996C2B", rlmCDAAttendanceGroupGuid);
            RockMigrationHelper.AddDefinedValueAttributeValue(guidOption1.ToString(), "3A526D6C-06FC-46CD-A447-9A6D9A74BB4F", @"^1.*");
            RockMigrationHelper.AddDefinedValueAttributeValue(guidOption1.ToString(), "67E09C64-3558-48B7-9A27-A9499D0826E8", @"CDA Message From: {{ FromPerson.FullName}}");
            RockMigrationHelper.AddDefinedValueAttributeValue(guidOption1.ToString(), "79E3B97B-A717-45AB-A279-335FCDEA141A", rlmCDACampusGuid);
            RockMigrationHelper.AddDefinedValueAttributeValue(guidOption1.ToString(), "836CFC0B-6750-4A93-8309-EAB868B845AF", @"FromPhone^{{FromPhone}}|ReceivedDateTime^{{ReceivedDateTime}}|Campus^Coeur d'Alene Campus|AttendanceGroup^RLM CDA Weekend Worship|");

            RockMigrationHelper.AddDefinedValueAttributeValue(guidOption2.ToString(), "0097D00F-1F29-4217-8E67-D37A619A6FA3", @"8722ac70-d178-4306-bf91-eb2fbb11dfa2");
            RockMigrationHelper.AddDefinedValueAttributeValue(guidOption2.ToString(), "17B0E99E-2D10-442A-9342-1F9F07996C2B", rlmCDAAttendanceGroupGuid);
            RockMigrationHelper.AddDefinedValueAttributeValue(guidOption2.ToString(), "3A526D6C-06FC-46CD-A447-9A6D9A74BB4F", @"^2$");
            RockMigrationHelper.AddDefinedValueAttributeValue(guidOption2.ToString(), "67E09C64-3558-48B7-9A27-A9499D0826E8", @"CDA Message From: {{ FromPerson.FullName}}");
            RockMigrationHelper.AddDefinedValueAttributeValue(guidOption2.ToString(), "79E3B97B-A717-45AB-A279-335FCDEA141A", rlmCDACampusGuid);
            RockMigrationHelper.AddDefinedValueAttributeValue(guidOption2.ToString(), "836CFC0B-6750-4A93-8309-EAB868B845AF", @"FromPhone^{{FromPhone}}|ReceivedDateTime^{{ReceivedDateTime}}|MessageBody^{{MessageBody}}|");

            RockMigrationHelper.AddDefinedValueAttributeValue(guidOptionPR.ToString(), "0097D00F-1F29-4217-8E67-D37A619A6FA3", @"88978527-0ca4-4c52-8fda-cf915fafa472");
            RockMigrationHelper.AddDefinedValueAttributeValue(guidOptionPR.ToString(), "17B0E99E-2D10-442A-9342-1F9F07996C2B", rlmCDAAttendanceGroupGuid);
            RockMigrationHelper.AddDefinedValueAttributeValue(guidOptionPR.ToString(), "3A526D6C-06FC-46CD-A447-9A6D9A74BB4F", @"^2.+");
            RockMigrationHelper.AddDefinedValueAttributeValue(guidOptionPR.ToString(), "67E09C64-3558-48B7-9A27-A9499D0826E8", @"CDA: Prayer Request from {{ FromPerson.FullName }}");
            RockMigrationHelper.AddDefinedValueAttributeValue(guidOptionPR.ToString(), "79E3B97B-A717-45AB-A279-335FCDEA141A", rlmCDACampusGuid);
            RockMigrationHelper.AddDefinedValueAttributeValue(guidOptionPR.ToString(), "836CFC0B-6750-4A93-8309-EAB868B845AF", @"FromPhone^{{FromPhone}}|MessageBody^{{MessageBody}}|");

            RockMigrationHelper.AddDefinedValueAttributeValue(guidOption3.ToString(), "0097D00F-1F29-4217-8E67-D37A619A6FA3", @"ca876138-0461-40ad-ab4f-67678b8baeca");
            RockMigrationHelper.AddDefinedValueAttributeValue(guidOption3.ToString(), "17B0E99E-2D10-442A-9342-1F9F07996C2B", rlmCDAAttendanceGroupGuid);
            RockMigrationHelper.AddDefinedValueAttributeValue(guidOption3.ToString(), "3A526D6C-06FC-46CD-A447-9A6D9A74BB4F", @"^3.*");
            RockMigrationHelper.AddDefinedValueAttributeValue(guidOption3.ToString(), "67E09C64-3558-48B7-9A27-A9499D0826E8", @"CDA: Message for Joining a homegroup from {{ FromPerson.FullName}}");
            RockMigrationHelper.AddDefinedValueAttributeValue(guidOption3.ToString(), "79E3B97B-A717-45AB-A279-335FCDEA141A", rlmCDACampusGuid);
            RockMigrationHelper.AddDefinedValueAttributeValue(guidOption3.ToString(), "836CFC0B-6750-4A93-8309-EAB868B845AF", @"FromPhone^{{FromPhone}}|ReceivedDateTime^{{ ReceivedDateTime }}|Campus^Coeur d'Alene Campus|");

            RockMigrationHelper.AddDefinedValueAttributeValue(guidOption4.ToString(), "0097D00F-1F29-4217-8E67-D37A619A6FA3", @"feb34437-9600-4330-855f-85404ec10018");
            RockMigrationHelper.AddDefinedValueAttributeValue(guidOption4.ToString(), "17B0E99E-2D10-442A-9342-1F9F07996C2B", rlmCDAAttendanceGroupGuid);
            RockMigrationHelper.AddDefinedValueAttributeValue(guidOption4.ToString(), "3A526D6C-06FC-46CD-A447-9A6D9A74BB4F", @"^4.*");
            RockMigrationHelper.AddDefinedValueAttributeValue(guidOption4.ToString(), "67E09C64-3558-48B7-9A27-A9499D0826E8", @"CDA Message From: {{ FromPerson.FullName}}");
            RockMigrationHelper.AddDefinedValueAttributeValue(guidOption4.ToString(), "79E3B97B-A717-45AB-A279-335FCDEA141A", rlmCDACampusGuid);
            RockMigrationHelper.AddDefinedValueAttributeValue(guidOption4.ToString(), "836CFC0B-6750-4A93-8309-EAB868B845AF", @"FromPhone^{{FromPhone}}|ReceivedDateTime^{{ReceivedDateTime}}|MessageBody^{{MessageBody}}|");

            RockMigrationHelper.AddDefinedValueAttributeValue(guidOption5.ToString(), "0097D00F-1F29-4217-8E67-D37A619A6FA3", @"a74396b8-4723-4be7-9f4a-14506c921fc8");
            RockMigrationHelper.AddDefinedValueAttributeValue(guidOption5.ToString(), "17B0E99E-2D10-442A-9342-1F9F07996C2B", rlmCDAAttendanceGroupGuid);
            RockMigrationHelper.AddDefinedValueAttributeValue(guidOption5.ToString(), "3A526D6C-06FC-46CD-A447-9A6D9A74BB4F", @"^5.*");
            RockMigrationHelper.AddDefinedValueAttributeValue(guidOption5.ToString(), "67E09C64-3558-48B7-9A27-A9499D0826E8", @"CDA Message From: {{ FromPerson.FullName}}");
            RockMigrationHelper.AddDefinedValueAttributeValue(guidOption5.ToString(), "79E3B97B-A717-45AB-A279-335FCDEA141A", rlmCDACampusGuid);
            RockMigrationHelper.AddDefinedValueAttributeValue(guidOption5.ToString(), "836CFC0B-6750-4A93-8309-EAB868B845AF", @"FromPhone^{{FromPhone}}|ReceivedDateTime^{{ReceivedDateTime}}|MessageBody^{{MessageBody}}|");
        }