/// <summary> /// Operations to be performed during the upgrade process. /// </summary> public override void Up() { // BI category for defined types RockMigrationHelper.UpdateCategory("6028D502-79F4-4A74-9323-525E90F900C7", "BI", "fa fa-bar-chart", "Category for Business Intelligence defined types.", Rock.SystemGuid.Category.POWERBI_DEFINED_TYPE); // Defined Types: Power BI Accounts RockMigrationHelper.AddDefinedType("BI", "Power BI Accounts", "List of Power BI accounts and tokens.", Rock.SystemGuid.DefinedType.POWERBI_ACCOUNTS); RockMigrationHelper.AddDefinedTypeAttribute(Rock.SystemGuid.DefinedType.POWERBI_ACCOUNTS, Rock.SystemGuid.FieldType.TEXT, "Client ID", "ClientId", "The client id provided when you registered your app (Rock) at https://dev.powerbi.com/apps?type=web.", 0, "", "60EEBE25-83B3-F7B9-4481-076373529D80"); RockMigrationHelper.AddDefinedTypeAttribute(Rock.SystemGuid.DefinedType.POWERBI_ACCOUNTS, Rock.SystemGuid.FieldType.TEXT, "Client Secret", "ClientSecret", "The client secret provided when you registered your app (Rock) at https://dev.powerbi.com/apps?type=web.", 1, "", "7DEF24AA-C538-88BB-4781-10E161FE448C"); RockMigrationHelper.AddDefinedTypeAttribute(Rock.SystemGuid.DefinedType.POWERBI_ACCOUNTS, Rock.SystemGuid.FieldType.TEXT, "Access Token", "AccessToken", "The access token retrieved when the account was created.", 3, "", "61D179A4-122A-99AF-4FA3-F21618E48CEE"); RockMigrationHelper.AddDefinedTypeAttribute(Rock.SystemGuid.DefinedType.POWERBI_ACCOUNTS, Rock.SystemGuid.FieldType.TEXT, "Refresh Token", "RefreshToken", "The refresh token for the account.", 4, "", "6693F13D-54A3-408C-4CFE-3F57AF8BBD52"); RockMigrationHelper.AddDefinedTypeAttribute(Rock.SystemGuid.DefinedType.POWERBI_ACCOUNTS, Rock.SystemGuid.FieldType.TEXT, "Redirect URL", "RedirectUrl", "The redirect URL defined for the account registration.", 2, "", "B2104D6A-903A-95BB-4EA5-6B54EF0EEBA6"); // Change Defined Type to make it a non-system Sql(string.Format("UPDATE [DefinedType] SET [IsSystem] = 0 WHERE [Guid] = '{0}'", Rock.SystemGuid.DefinedType.POWERBI_ACCOUNTS)); /* NOTE: Commented this out because this was incorrect. It is done correctly in a later migration 201711011841422_GatewayTransactionKey.cs * // register add account block * RockMigrationHelper.UpdateBlockType( "Power Bi Account Register", "This block registers a Power BI account for Rock to use.", "~/Plugins/com_mineCartStudio/Bi/PowerBiAccountRegister.ascx", "Mine Cart Studio > BI", Rock.SystemGuid.BlockType.POWERBI_ACCOUNT_REGISTRATION ); * * // create a new page for the block (if it doesn't already exist) * RockMigrationHelper.AddPage( true, "5B6DBC42-8B03-4D15-8D92-AAFA28FD8616", "D65F783D-87A9-4CC9-8110-E83466A0EADB", "Power BI Register Account", "", Rock.SystemGuid.Page.POWERBI_ACCOUNT_REGISTRATION, "fa fa-bar-chart" ); * * // add block to page (if it doesn't already exist) * RockMigrationHelper.AddBlock( true, Rock.SystemGuid.Page.POWERBI_ACCOUNT_REGISTRATION, "", Rock.SystemGuid.BlockType.POWERBI_ACCOUNT_REGISTRATION, "Account Register", "Main", "", "", 0, "A530FD84-95D2-288C-453C-999DF71D40AE" ); * * // add route to page for redirect usage * RockMigrationHelper.AddPageRoute( Rock.SystemGuid.Page.POWERBI_ACCOUNT_REGISTRATION, "PowerBiAccountRedirect" ); */ }
/// <summary> /// Updates the preferred currency and transaction source up. /// </summary> private void UpdatePreferredCurrencyAndTransactionSourceUp() { RockMigrationHelper.AddDefinedTypeAttribute("4F02B41E-AB7D-4345-8A97-3904DDD89B01", "9C204CD0-1233-41C5-818A-C5DA439445AA", "Icon CSS Class", "IconCssClass", "", 1055, "fa-hand-holding-usd", "CB1E9401-E1FD-4DBB-B15F-4E6994602723"); RockMigrationHelper.AddAttributeQualifier("CB1E9401-E1FD-4DBB-B15F-4E6994602723", "ispassword", "False", "746974E9-0A05-4DD4-8277-922C442F76F0"); RockMigrationHelper.AddAttributeQualifier("CB1E9401-E1FD-4DBB-B15F-4E6994602723", "maxcharacters", "", "1ECBE523-F5EF-4362-A09A-FD9BC9436D7F"); RockMigrationHelper.AddAttributeQualifier("CB1E9401-E1FD-4DBB-B15F-4E6994602723", "showcountdown", "False", "84CE2ECD-B7DE-4F10-B69A-57285AC950E3"); RockMigrationHelper.AddDefinedValueAttributeValue("260EEA80-821A-4F79-973F-49DF79C955F7", "CB1E9401-E1FD-4DBB-B15F-4E6994602723", @"fa-cash-register"); RockMigrationHelper.AddDefinedValueAttributeValue("61E46A46-7399-4817-A6EC-3D8495E2316E", "CB1E9401-E1FD-4DBB-B15F-4E6994602723", @"fa-money-check"); RockMigrationHelper.AddDefinedValueAttributeValue("7D705CE7-7B11-4342-A58E-53617C5B4E69", "CB1E9401-E1FD-4DBB-B15F-4E6994602723", @"fa-desktop"); RockMigrationHelper.AddDefinedValueAttributeValue("8ADCEC72-63FC-4F08-A4CC-72BCE470172C", "CB1E9401-E1FD-4DBB-B15F-4E6994602723", @"fa-mobile-alt"); RockMigrationHelper.AddDefinedValueAttributeValue("8BA95E24-D291-499E-A535-4DCAC365689B", "CB1E9401-E1FD-4DBB-B15F-4E6994602723", @"fa-sms"); RockMigrationHelper.AddDefinedValueAttributeValue("BE7ECF50-52BC-4774-808D-574BA842DB98", "CB1E9401-E1FD-4DBB-B15F-4E6994602723", @"fa-church"); RockMigrationHelper.AddDefinedTypeAttribute("1D1304DE-E83A-44AF-B11D-0C66DD600B81", "9C204CD0-1233-41C5-818A-C5DA439445AA", "Icon CSS Class", "IconCssClass", "", 1054, "fa-credit-card", "9617D1DC-6561-4314-83EB-7F0ACBA2E259"); RockMigrationHelper.AddAttributeQualifier("9617D1DC-6561-4314-83EB-7F0ACBA2E259", "ispassword", "False", "7A492FD1-60F2-4055-BE72-6A367E31022C"); RockMigrationHelper.AddAttributeQualifier("9617D1DC-6561-4314-83EB-7F0ACBA2E259", "maxcharacters", "", "AC52CCC9-FE9C-4481-A21C-B9CA0C1ADE29"); RockMigrationHelper.AddAttributeQualifier("9617D1DC-6561-4314-83EB-7F0ACBA2E259", "showcountdown", "False", "E3188133-82B5-4B21-9286-D850CCC3A77E"); RockMigrationHelper.AddDefinedValueAttributeValue("0FDF0BB3-B483-4C0A-9DFF-A35ABE3B688D", "9617D1DC-6561-4314-83EB-7F0ACBA2E259", @"fa-dollar-sign"); RockMigrationHelper.AddDefinedValueAttributeValue("56C9AE9C-B5EB-46D5-9650-2EF86B14F856", "9617D1DC-6561-4314-83EB-7F0ACBA2E259", @"fa-question"); RockMigrationHelper.AddDefinedValueAttributeValue("6151F6E0-3223-46BA-A59E-E091BE4AF75C", "9617D1DC-6561-4314-83EB-7F0ACBA2E259", @"fa-google-pay"); RockMigrationHelper.AddDefinedValueAttributeValue("7950FF66-80EE-E8AB-4A77-4A13EDEB7513", "9617D1DC-6561-4314-83EB-7F0ACBA2E259", @"fa-file-contract"); RockMigrationHelper.AddDefinedValueAttributeValue("8B086A19-405A-451F-8D44-174E92D6B402", "9617D1DC-6561-4314-83EB-7F0ACBA2E259", @"fa-money-check"); RockMigrationHelper.AddDefinedValueAttributeValue("928A2E04-C77B-4282-888F-EC549CEE026A", "9617D1DC-6561-4314-83EB-7F0ACBA2E259", @"fa-credit-card"); RockMigrationHelper.AddDefinedValueAttributeValue("D42C4DF7-1AE9-4DDE-ADA2-774B866B798C", "9617D1DC-6561-4314-83EB-7F0ACBA2E259", @"fa-apple-pay"); RockMigrationHelper.AddDefinedValueAttributeValue("DABEE8FD-AEDF-43E1-8547-4C97FA14D9B6", "9617D1DC-6561-4314-83EB-7F0ACBA2E259", @"fa-university"); RockMigrationHelper.AddDefinedValueAttributeValue("F3ADC889-1EE8-4EB6-B3FD-8C10F3C8AF93", "9617D1DC-6561-4314-83EB-7F0ACBA2E259", @"fa-money-bill"); }
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) { } } }
private void CreditCardValueIconImageUp() { RockMigrationHelper.AddDefinedTypeAttribute(Rock.SystemGuid.DefinedType.FINANCIAL_CREDIT_CARD_TYPE, Rock.SystemGuid.FieldType.URL_LINK, "Icon Image", Rock.SystemKey.CreditCardTypeAttributeKey.IconImage, "When displaying payment information for this card type, this image may be used to provide a visual reference of the card. An SVG is strongly recommended.", 2, string.Empty, "84FA697A-64CF-44F7-9836-FC439E61634B"); RockMigrationHelper.AddDefinedValueAttributeValue(Rock.SystemGuid.DefinedValue.CREDITCARD_TYPE_AMEX, "84FA697A-64CF-44F7-9836-FC439E61634B", "/Assets/Images/currency/amex.svg"); RockMigrationHelper.AddDefinedValueAttributeValue(Rock.SystemGuid.DefinedValue.CREDITCARD_TYPE_DINERS_CLUB, "84FA697A-64CF-44F7-9836-FC439E61634B", "/Assets/Images/currency/diners.svg"); RockMigrationHelper.AddDefinedValueAttributeValue(Rock.SystemGuid.DefinedValue.CREDITCARD_TYPE_DISCOVER, "84FA697A-64CF-44F7-9836-FC439E61634B", "/Assets/Images/currency/discover.svg"); RockMigrationHelper.AddDefinedValueAttributeValue(Rock.SystemGuid.DefinedValue.CREDITCARD_TYPE_JCB, "84FA697A-64CF-44F7-9836-FC439E61634B", "/Assets/Images/currency/jcb.svg"); RockMigrationHelper.AddDefinedValueAttributeValue(Rock.SystemGuid.DefinedValue.CREDITCARD_TYPE_MASTERCARD, "84FA697A-64CF-44F7-9836-FC439E61634B", "/Assets/Images/currency/mastercard.svg"); RockMigrationHelper.AddDefinedValueAttributeValue(Rock.SystemGuid.DefinedValue.CREDITCARD_TYPE_VISA, "84FA697A-64CF-44F7-9836-FC439E61634B", "/Assets/Images/currency/visa.svg"); }
/// <summary> /// Operations to be performed during the upgrade process. /// </summary> public override void Up() { // Add Field Type: Data Entry Requirement Level RockMigrationHelper.UpdateFieldType("Data Entry Requirement Level", "Indicates the availability and necessity of a data entry item.", "Rock", "Rock.Field.Types.DataEntryRequirementLevelFieldType", SystemGuid.FieldType.DATA_ENTRY_REQUIREMENT_LEVEL); // Add Attributes for Defined Type "Country". RockMigrationHelper.AddDefinedTypeAttribute(SystemGuid.DefinedType.LOCATION_COUNTRIES, SystemGuid.FieldType.TEXT, "Locality Label", SystemKey.CountryAttributeKey.AddressLocalityLabel, "The label to use for the Locality field, which describes a subdivision of a state or region.", 2, true, "County", false, false, SystemGuid.Attribute.COUNTRY_LOCALITY_LABEL); RockMigrationHelper.AddDefinedTypeAttribute(SystemGuid.DefinedType.LOCATION_COUNTRIES, SystemGuid.FieldType.DATA_ENTRY_REQUIREMENT_LEVEL, "Address Line 1 Requirement", SystemKey.CountryAttributeKey.AddressLine1Requirement, "Sets the requirement for the Address Line 1 component of a postal address in this Country.", 6, true, DataEntryRequirementLevelSpecifier.Required.ConvertToInt().ToString(), false, false, SystemGuid.Attribute.COUNTRY_ADDRESS_LINE_1_REQUIREMENT); RockMigrationHelper.AddDefinedTypeAttribute(SystemGuid.DefinedType.LOCATION_COUNTRIES, SystemGuid.FieldType.DATA_ENTRY_REQUIREMENT_LEVEL, "Address Line 2 Requirement", SystemKey.CountryAttributeKey.AddressLine2Requirement, "Sets the requirement for the Address Line 2 component of a postal address in this Country.", 7, true, DataEntryRequirementLevelSpecifier.Optional.ConvertToInt().ToString(), false, false, SystemGuid.Attribute.COUNTRY_ADDRESS_LINE_2_REQUIREMENT); RockMigrationHelper.AddDefinedTypeAttribute(SystemGuid.DefinedType.LOCATION_COUNTRIES, SystemGuid.FieldType.DATA_ENTRY_REQUIREMENT_LEVEL, "City Requirement", SystemKey.CountryAttributeKey.AddressCityRequirement, "Sets the requirement for the City component of a postal address in this Country.", 8, true, DataEntryRequirementLevelSpecifier.Required.ConvertToInt().ToString(), false, false, SystemGuid.Attribute.COUNTRY_ADDRESS_CITY_REQUIREMENT); RockMigrationHelper.AddDefinedTypeAttribute(SystemGuid.DefinedType.LOCATION_COUNTRIES, SystemGuid.FieldType.DATA_ENTRY_REQUIREMENT_LEVEL, "Locality Requirement", SystemKey.CountryAttributeKey.AddressLocalityRequirement, "Sets the requirement for the Locality component of a postal address in this Country.", 9, true, DataEntryRequirementLevelSpecifier.Optional.ConvertToInt().ToString(), false, false, SystemGuid.Attribute.COUNTRY_ADDRESS_LOCALITY_REQUIREMENT); RockMigrationHelper.AddDefinedTypeAttribute(SystemGuid.DefinedType.LOCATION_COUNTRIES, SystemGuid.FieldType.DATA_ENTRY_REQUIREMENT_LEVEL, "State Requirement", SystemKey.CountryAttributeKey.AddressStateRequirement, "Sets the requirement for the State component of a postal address in this Country.", 10, true, DataEntryRequirementLevelSpecifier.Required.ConvertToInt().ToString(), false, false, SystemGuid.Attribute.COUNTRY_ADDRESS_STATE_REQUIREMENT); RockMigrationHelper.AddDefinedTypeAttribute(SystemGuid.DefinedType.LOCATION_COUNTRIES, SystemGuid.FieldType.DATA_ENTRY_REQUIREMENT_LEVEL, "Postal Code Requirement", SystemKey.CountryAttributeKey.AddressPostalCodeRequirement, "Sets the requirement for the Postal Code component of a postal address in this Country.", 11, true, DataEntryRequirementLevelSpecifier.Optional.ConvertToInt().ToString(), false, false, SystemGuid.Attribute.COUNTRY_ADDRESS_POSTCODE_REQUIREMENT); // Set Attribute Values for Country Defined Type "United States". RockMigrationHelper.AddDefinedValueAttributeValueByValue(SystemGuid.DefinedType.LOCATION_COUNTRIES, "US", SystemKey.CountryAttributeKey.AddressLocalityLabel, "County"); RockMigrationHelper.AddDefinedValueAttributeValueByValue(SystemGuid.DefinedType.LOCATION_COUNTRIES, "US", SystemKey.CountryAttributeKey.AddressLine1Requirement, DataEntryRequirementLevelSpecifier.Required.ConvertToInt().ToString()); RockMigrationHelper.AddDefinedValueAttributeValueByValue(SystemGuid.DefinedType.LOCATION_COUNTRIES, "US", SystemKey.CountryAttributeKey.AddressLine2Requirement, DataEntryRequirementLevelSpecifier.Optional.ConvertToInt().ToString()); RockMigrationHelper.AddDefinedValueAttributeValueByValue(SystemGuid.DefinedType.LOCATION_COUNTRIES, "US", SystemKey.CountryAttributeKey.AddressCityRequirement, DataEntryRequirementLevelSpecifier.Required.ConvertToInt().ToString()); RockMigrationHelper.AddDefinedValueAttributeValueByValue(SystemGuid.DefinedType.LOCATION_COUNTRIES, "US", SystemKey.CountryAttributeKey.AddressLocalityRequirement, DataEntryRequirementLevelSpecifier.Optional.ConvertToInt().ToString()); RockMigrationHelper.AddDefinedValueAttributeValueByValue(SystemGuid.DefinedType.LOCATION_COUNTRIES, "US", SystemKey.CountryAttributeKey.AddressStateRequirement, DataEntryRequirementLevelSpecifier.Required.ConvertToInt().ToString()); RockMigrationHelper.AddDefinedValueAttributeValueByValue(SystemGuid.DefinedType.LOCATION_COUNTRIES, "US", SystemKey.CountryAttributeKey.AddressPostalCodeRequirement, DataEntryRequirementLevelSpecifier.Optional.ConvertToInt().ToString()); }
/// <summary> /// SK: Block Template Picker Control, Field Type & Attribute /// </summary> private void SmsSettingsUp() { RockMigrationHelper.AddDefinedType("CMS Settings", "Template Block", "List of blocks which have built-in support for BlockTemplateFields. The block attribute uses the well-known Guid of a particular defined value like this: <code>[BlockTemplateField( \"ABC12345-1111-1111-1111-ABC123000000\", \"Format Templates\", \"This template controls the...\" )]</code>", "0F8E2B71-985E-44C4-BF5A-2FB1AAF3E183", @""); RockMigrationHelper.AddDefinedType("CMS Settings", "Template", "List of Templates that can be used by the corresponding Template Blocks that Rock supports.", "A6E267E2-66A4-44D7-A5C9-9399666CBF95", @""); RockMigrationHelper.AddDefinedTypeAttribute("A6E267E2-66A4-44D7-A5C9-9399666CBF95", "59D5A94C-94A0-4630-B80A-BB25697D74C7", "Template Block", "TemplateBlock", "", 1034, "", "0AAFF537-7EC6-4AA9-A987-68DA1FF8511D"); RockMigrationHelper.AddDefinedTypeAttribute("A6E267E2-66A4-44D7-A5C9-9399666CBF95", "97F8157D-A8C8-4AB3-96A2-9CB2A9049E6D", "Icon", "Icon", "", 1035, "", "831403EB-262E-4BC5-8B5E-F16153493BF5"); RockMigrationHelper.AddAttributeQualifier("0AAFF537-7EC6-4AA9-A987-68DA1FF8511D", "allowmultiple", "False", "92AA03B0-D134-4C81-B6F9-982E520CD3B0"); Sql(string.Format(@" DECLARE @AttributeId int = (SELECT TOP 1 [Id] FROM [Attribute] WHERE [Guid] = '{0}') DECLARE @DefinedTypeId int = (SELECT TOP 1 [Id] FROM [DefinedType] WHERE [Guid] = '{1}') IF NOT EXISTS ( SELECT * FROM AttributeQualifier WHERE [AttributeId] = @AttributeId AND [Key] = 'definedtype' ) BEGIN INSERT INTO [AttributeQualifier] ([IsSystem], [AttributeId], [Key], [Value], [Guid]) VALUES (0, @AttributeId, 'definedtype', @DefinedTypeId, 'B7D9102E-0CEB-4C5A-88FB-CA5C86D06859') END ", "0AAFF537-7EC6-4AA9-A987-68DA1FF8511D", "0F8E2B71-985E-44C4-BF5A-2FB1AAF3E183")); RockMigrationHelper.AddAttributeQualifier("0AAFF537-7EC6-4AA9-A987-68DA1FF8511D", "displaydescription", "False", "325925BF-0A0A-49DD-838E-06D40DDAD77A"); RockMigrationHelper.AddAttributeQualifier("0AAFF537-7EC6-4AA9-A987-68DA1FF8511D", "enhancedselection", "False", "E8C0D449-1CA1-40A1-BB1B-6856A0A3AF11"); RockMigrationHelper.AddAttributeQualifier("0AAFF537-7EC6-4AA9-A987-68DA1FF8511D", "includeInactive", "False", "2BFE679D-9085-4579-9DC4-9269A989E96B"); RockMigrationHelper.AddAttributeQualifier("831403EB-262E-4BC5-8B5E-F16153493BF5", "binaryFileType", "c1142570-8cd6-4a20-83b1-acb47c1cd377", "AE0CCDCC-018D-4F7A-8266-529085A3D97E"); RockMigrationHelper.AddAttributeQualifier("831403EB-262E-4BC5-8B5E-F16153493BF5", "formatAsLink", "False", "74CF1266-5CC0-4694-805B-76220D9293BC"); RockMigrationHelper.AddAttributeQualifier("831403EB-262E-4BC5-8B5E-F16153493BF5", "img_tag_template", "", "3EF02D92-C542-4C1E-AD09-B7D963CF5885"); }
/// <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> /// Operations to be performed during the upgrade process. /// </summary> public override void Up() { AddColumn("dbo.Attendance", "CheckedInByPersonAliasId", c => c.Int()); // Update the "Scanned Id" and "Family Id" options to not be displayed in check-in configuratoin (they are always supported). RockMigrationHelper.AddDefinedTypeAttribute(SystemGuid.DefinedType.CHECKIN_SEARCH_TYPE, SystemGuid.FieldType.BOOLEAN, "User Selectable", "UserSelectable", "Should this search type be displayed as an available option when configuring check-in?", 0, "true", "72C3C999-D243-4500-8EB0-2913069E2B28"); RockMigrationHelper.AddDefinedValueAttributeValue(SystemGuid.DefinedValue.CHECKIN_SEARCH_TYPE_SCANNED_ID, "72C3C999-D243-4500-8EB0-2913069E2B28", "false"); RockMigrationHelper.AddDefinedValueAttributeValue(SystemGuid.DefinedValue.CHECKIN_SEARCH_TYPE_FAMILY_ID, "72C3C999-D243-4500-8EB0-2913069E2B28", "false"); // Add an 'Alternate Id' person search key and configure it to not be available in the advanced settings of person detail RockMigrationHelper.AddDefinedTypeAttribute(SystemGuid.DefinedType.PERSON_SEARCH_KEYS, SystemGuid.FieldType.BOOLEAN, "User Selectable", "UserSelectable", "Should user be able to add a search value of this type on person edit page?", 0, "true", "15C419AA-76A9-4105-AB99-8384AB0E9B44"); RockMigrationHelper.UpdateDefinedValue(SystemGuid.DefinedType.PERSON_SEARCH_KEYS, "Alternate Id", "An alternate identifier is used for things like check-in (bar-code, fingerprint id, etc.)", SystemGuid.DefinedValue.PERSON_SEARCH_KEYS_ALTERNATE_ID); RockMigrationHelper.AddDefinedValueAttributeValue(SystemGuid.DefinedValue.PERSON_SEARCH_KEYS_ALTERNATE_ID, "15C419AA-76A9-4105-AB99-8384AB0E9B44", "false"); // Update attributes to show in grid Sql(@" UPDATE [Attribute] SET [IsGridColumn] = 1 WHERE [Guid] IN ( '72C3C999-D243-4500-8EB0-2913069E2B28', '15C419AA-76A9-4105-AB99-8384AB0E9B44' ) "); // Update any checkin configs that were using scanned or family id search type to use name/phone (that's what it would have been using anyway). Sql($@" DECLARE @AttributeId int = ( SELECT TOP 1 [Id] FROM [Attribute] WHERE [Guid] = 'BBF88ADA-3C2E-4A0B-A9AE-5B07D4557129' ) UPDATE [AttributeValue] SET [Value] = '{SystemGuid.DefinedValue.CHECKIN_SEARCH_TYPE_NAME_AND_PHONE.ToLower()}' WHERE [AttributeId] = @AttributeId AND ( [Value] = '{SystemGuid.DefinedValue.CHECKIN_SEARCH_TYPE_SCANNED_ID}' OR [Value] = '{SystemGuid.DefinedValue.CHECKIN_SEARCH_TYPE_FAMILY_ID}' ) "); // Job for Migrating Family Check-in Identifiers to the head-of-household (schedule for 9pm to avoid conflict with AppPoolRecycle) Sql($@" INSERT INTO [dbo].[ServiceJob] ([IsSystem] ,[IsActive] ,[Name] ,[Description] ,[Class] ,[CronExpression] ,[NotificationStatus] ,[Guid]) VALUES (0 ,1 ,'Move Family Check-in Identifiers to Person' ,'Moves family check-in identifiers to Person alternate ids. All the family ids will be associated with the families head of houshold.' ,'Rock.Jobs.MigrateFamilyAlternateId' ,'0 0 21 1/1 * ? *' ,3 ,'{ SystemGuid.ServiceJob.MIGRATE_FAMILY_CHECKIN_IDS }')"); }
public override void Up() { RockMigrationHelper.AddDefinedTypeAttribute("8CC5A105-E6B9-4F63-89E0-A83F81ACBB21", "73B02051-0D38-4AD9-BF81-A2D477DE4F70", "Response Headers", "ResponseHeaders", string.Empty, 5, string.Empty, "D39AFB27-C4F1-4F3B-992D-6496CC37A826"); RockMigrationHelper.AddAttributeQualifier("D39AFB27-C4F1-4F3B-992D-6496CC37A826", "allowhtml", "False", "10E1EF5E-0BEE-4CD6-BBD9-BF91082D62CB"); RockMigrationHelper.AddAttributeQualifier("D39AFB27-C4F1-4F3B-992D-6496CC37A826", "customvalues", string.Empty, "4AF90BEB-B9FB-4622-9203-F03E91D4C341"); RockMigrationHelper.AddAttributeQualifier("D39AFB27-C4F1-4F3B-992D-6496CC37A826", "definedtype", string.Empty, "3399647C-8786-4866-8F33-406B445FC3DA"); RockMigrationHelper.AddAttributeQualifier("D39AFB27-C4F1-4F3B-992D-6496CC37A826", "displayvaluefirst", "False", "C7F313BE-55D7-47E7-9E6A-31E4A8F5B7A1"); RockMigrationHelper.AddAttributeQualifier("D39AFB27-C4F1-4F3B-992D-6496CC37A826", "keyprompt", "Name", "2D84C3C9-E338-4431-93DD-57074508432A"); RockMigrationHelper.AddAttributeQualifier("D39AFB27-C4F1-4F3B-992D-6496CC37A826", "valueprompt", "Value", "36A10CB1-90D1-486F-926F-5146B4D96C10"); }
/// <summary> /// The commands to run to migrate plugin to the specific version /// </summary> public override void Up() { // Update Help Text of FooterHtml RockMigrationHelper.AddDefinedTypeAttribute(Rock.StatementGenerator.SystemGuid.DefinedType.STATEMENT_GENERATOR_LAVA_TEMPLATE, Rock.SystemGuid.FieldType.CODE_EDITOR, "Footer HTML", "FooterHtml", @"Advanced: If you want custom Html for your footer, you can create an HTML doc that will generate the footer. See https://wkhtmltopdf.org/usage/wkhtmltopdf.txt Note: The Footer will be placed in the bottom margin of the page. To adjust the footer height, set margin.bottom in PDF Object Settings.", 102, string.Empty, Rock.StatementGenerator.SystemGuid.Attribute.DEFINEDVALUE_STATEMENT_GENERATOR_LAVA_TEMPLATE_FOOTERHTML); // Add new PDFObjectSettings option RockMigrationHelper.AddDefinedTypeAttribute(Rock.StatementGenerator.SystemGuid.DefinedType.STATEMENT_GENERATOR_LAVA_TEMPLATE, Rock.SystemGuid.FieldType.KEY_VALUE_LIST, "PDF Object Settings (Advanced)", "PDFObjectSettings", "See https://wkhtmltopdf.org/libwkhtmltox/pagesettings.html#pagePdfObject", 103, "margin.top^10|margin.bottom^10|margin.left^10|margin.right^10|size.pageSize^letter", Rock.StatementGenerator.SystemGuid.Attribute.DEFINEDVALUE_STATEMENT_GENERATOR_LAVA_TEMPLATE_PDFOBJECTSETTINGS); }
public override void Up() { RockMigrationHelper.AddDefinedType("Check-in", "Nested Campuses", "Describes campuses that are nested within other campuses so that attendance and mobile check-in can work correctly.", Constants.DEFINED_TYPE_NESTED_CAMPUSES); RockMigrationHelper.AddDefinedTypeAttribute(Constants.DEFINED_TYPE_NESTED_CAMPUSES, Rock.SystemGuid.FieldType.CAMPUS, "Parent Campus", Constants.DEFINED_VALUE_ATTRIBUTE_PARENT_CAMPUS, "The check-in campus must match this for the process to be applied.", 0, true, "", false, true, "CE0BF4A2-2837-4A60-8FC9-417199507546"); RockMigrationHelper.AddDefinedTypeAttribute(Constants.DEFINED_TYPE_NESTED_CAMPUSES, Rock.SystemGuid.FieldType.CAMPUS, "Child Campus", Constants.DEFINED_VALUE_ATTRIBUTE_CHILD_CAMPUS, "The family campus must match this for the process to be applied.", 0, true, "", false, true, "9CDBFA64-63D0-40FE-93DD-09EA78E7BFB0"); }
public override void Up() { RockMigrationHelper.AddDefinedType("", "Html To Image", "Templates for creating images from Html and Lava", "8CC5A105-E6B9-4F63-89E0-A83F81ACBB21"); RockMigrationHelper.AddDefinedTypeAttribute("8CC5A105-E6B9-4F63-89E0-A83F81ACBB21", "1D0D3794-C210-48A8-8C68-3FBEC08A6BA5", "Template", "Template", "", 0, "", "A247948E-AF88-4622-996D-DBE69CE41832"); RockMigrationHelper.AddDefinedTypeAttribute("8CC5A105-E6B9-4F63-89E0-A83F81ACBB21", "4BD9088F-5CC6-89B1-45FC-A2AAFFC7CC0D", "Enabled Lava Commands", "EnabledLavaCommands", "", 1, "", "40286BE2-F841-423C-B920-78D827C65B81"); RockMigrationHelper.AddDefinedTypeAttribute("8CC5A105-E6B9-4F63-89E0-A83F81ACBB21", "7525C4CB-EE6B-41D4-9B64-A08048D5A5C0", "Image Type", "ImageType", "", 2, "", "3735CF5F-405A-4914-9880-9CC64343CD11"); RockMigrationHelper.AddDefinedTypeAttribute("8CC5A105-E6B9-4F63-89E0-A83F81ACBB21", "A75DFC58-7A1B-4799-BF31-451B2BBE38FF", "Height", "Height", "", 4, "", "D7759B7A-7D4B-4370-A665-18396F7D6768"); RockMigrationHelper.AddDefinedTypeAttribute("8CC5A105-E6B9-4F63-89E0-A83F81ACBB21", "A75DFC58-7A1B-4799-BF31-451B2BBE38FF", "Width", "Width", "", 3, "", "9191028F-A80B-4D1A-B8B8-3B11E4DFDAD5"); RockMigrationHelper.AddAttributeQualifier("3735CF5F-405A-4914-9880-9CC64343CD11", "fieldtype", "ddl", "27978DCD-6C83-4E5C-96CD-32DA5EDDF2F5"); RockMigrationHelper.AddAttributeQualifier("3735CF5F-405A-4914-9880-9CC64343CD11", "repeatColumns", "", "50FF293A-53FB-4BE6-8F84-C6C4F4D118FE"); RockMigrationHelper.AddAttributeQualifier("3735CF5F-405A-4914-9880-9CC64343CD11", "values", "png,jpg", "5BA047C2-B988-492B-8F46-D48FCF5EBDFE"); RockMigrationHelper.AddAttributeQualifier("40286BE2-F841-423C-B920-78D827C65B81", "repeatColumns", "", "0BC7C7E7-5DE6-485D-97F4-6C630D337A81"); RockMigrationHelper.AddAttributeQualifier("A247948E-AF88-4622-996D-DBE69CE41832", "editorHeight", "400", "CE4187E7-D83F-4BAF-8EBC-A1124474959B"); RockMigrationHelper.AddAttributeQualifier("A247948E-AF88-4622-996D-DBE69CE41832", "editorMode", "3", "354730E0-C67A-4686-817F-11FE82A34AE0"); RockMigrationHelper.AddAttributeQualifier("A247948E-AF88-4622-996D-DBE69CE41832", "editorTheme", "0", "FC2F6D93-69AC-4616-BF97-2CD3F6FAF856"); }
/// <summary> /// Operations to be performed during the upgrade process. /// </summary> public override void Up() { AddColumn("dbo.Attendance", "SearchValue", c => c.String()); AddColumn("dbo.Attendance", "SearchResultGroupId", c => c.Int()); AddColumn("dbo.RegistrationInstance", "RegistrationWorkflowTypeId", c => c.Int()); AddColumn("dbo.RegistrationTemplate", "RegistrationWorkflowTypeId", c => c.Int()); CreateIndex("dbo.Attendance", "SearchResultGroupId"); CreateIndex("dbo.RegistrationInstance", "RegistrationWorkflowTypeId"); CreateIndex("dbo.RegistrationTemplate", "RegistrationWorkflowTypeId"); AddForeignKey("dbo.RegistrationTemplate", "RegistrationWorkflowTypeId", "dbo.WorkflowType", "Id"); AddForeignKey("dbo.RegistrationInstance", "RegistrationWorkflowTypeId", "dbo.WorkflowType", "Id"); AddForeignKey("dbo.Attendance", "SearchResultGroupId", "dbo.Group", "Id"); // MP: Address/Country Hide Address Line 2 RockMigrationHelper.AddDefinedTypeAttribute("D7979EA1-44E9-46E2-BF37-DDAF7F741378", Rock.SystemGuid.FieldType.BOOLEAN, "Show Address Line 2", "ShowAddressLine2", "Show Address Line 2 when editing an address", 4, "True", "360F05E4-E55B-4313-BB9F-9DCE96833571"); RockMigrationHelper.AddDefinedValueAttributeValueByValue("D7979EA1-44E9-46E2-BF37-DDAF7F741378", "US", "ShowAddressLine2", @"False"); // United States ShowAddressLine2 (False), all other countries will default to true // DT: V5 hotfix: 002_CheckinGradeRequired & 004_FixGradeRequiredAttribute Sql(@" IF NOT EXISTS ( SELECT [Id] FROM [Attribute] WHERE [Guid] = 'A4899874-9EDF-4549-B054-4F593F4C4362' ) BEGIN DECLARE @EntityTypeId int = (SELECT [Id] FROM [EntityType] WHERE [Name] = 'Rock.Model.GroupType') DECLARE @FieldTypeId int = (SELECT [Id] FROM [FieldType] WHERE [Guid] = '1EDAFDED-DFE6-4334-B019-6EECBA89E05A') DECLARE @CheckInTemplatePurposeId int = ( SELECT TOP 1 [Id] FROM [DefinedValue] WHERE [Guid] = '4A406CB0-495B-4795-B788-52BDFDE00B01' ) INSERT INTO [Attribute] ( [IsSystem],[FieldTypeId],[EntityTypeId],[EntityTypeQualifierColumn],[EntityTypeQualifierValue], [Key],[Name],[Description], [Order],[IsGridColumn],[DefaultValue],[IsMultiValue],[IsRequired], [Guid]) VALUES( 1, @FieldTypeId, @EntityTypeid,'GroupTypePurposeValueId', CAST( @CheckInTemplatePurposeId AS varchar), 'core_checkin_GradeRequired','Grade Required','', 0,0,'False',0,0, 'A4899874-9EDF-4549-B054-4F593F4C4362') END"); RockMigrationHelper.UpdateAttributeQualifier("A4899874-9EDF-4549-B054-4F593F4C4362", "falsetext", "No", "B61ED891-C631-4172-A05D-D86265CA2A1D"); RockMigrationHelper.UpdateAttributeQualifier("A4899874-9EDF-4549-B054-4F593F4C4362", "truetext", "Yes", "D4C52849-6ED4-414A-95D7-2F7F805CF9A3"); // DT: Add back some defined value foreign key indexes (so defined value delete can use them) Sql(MigrationSQL._201606231511599_RegistrationWorkflow_Indexes); }
/// <summary> /// The commands to run to migrate plugin to the specific version /// </summary> public override void Up() { // Data Automation Settings RockMigrationHelper.AddPage(true, "84FD84DF-F58B-4B9D-A407-96276C40AB7E", "D65F783D-87A9-4CC9-8110-E83466A0EADB", "Data Integrity Settings", "", "A2D5F989-1E30-47B9-AAFC-F7EC627AFF21", "fa fa-tachometer"); // Site:Rock RMS RockMigrationHelper.UpdateBlockType("Data Automation Settings", "Block used to set values specific to data automation (NCOA, Updating Person Status, Family Campus, Etc).", "~/Blocks/Administration/DataAutomationSettings.ascx", "Administration", "E34C45E9-97CA-4902-803B-1EFAC9174083"); RockMigrationHelper.AddBlock(true, "A2D5F989-1E30-47B9-AAFC-F7EC627AFF21", "", "E34C45E9-97CA-4902-803B-1EFAC9174083", "Data Automation Settings", "Main", @"", @"", 0, "AD705C56-1451-4FD6-BDC3-66072F54034D"); RockMigrationHelper.AddDefinedTypeAttribute("E17D5988-0372-4792-82CF-9E37C79F7319", "1EDAFDED-DFE6-4334-B019-6EECBA89E05A", "Allow Automated Reactivation", "AllowAutomatedReactivation", "", 1001, "True", "E47870C0-17C7-4556-A922-D7866DFC2C57"); RockMigrationHelper.AddAttributeQualifier("E47870C0-17C7-4556-A922-D7866DFC2C57", "falsetext", "No", "0EBAAE3D-DC46-4834-8EE7-F44CA07D43E6"); RockMigrationHelper.AddAttributeQualifier("E47870C0-17C7-4556-A922-D7866DFC2C57", "truetext", "Yes", "C322A622-C1FE-45C7-87B8-60A357BDC2D8"); RockMigrationHelper.UpdateDefinedValue("E17D5988-0372-4792-82CF-9E37C79F7319", "Does not attend with family", "The individual has not attended with family.", "2BDE800A-C562-4077-9636-5C68770D9676", false); RockMigrationHelper.AddDefinedValueAttributeValue("05D35BC4-5816-4210-965F-1BF44F35A16A", "E47870C0-17C7-4556-A922-D7866DFC2C57", @"False"); RockMigrationHelper.AddDefinedValueAttributeValue("2BDE800A-C562-4077-9636-5C68770D9676", "E47870C0-17C7-4556-A922-D7866DFC2C57", @"False"); RockMigrationHelper.UpdateDefinedValue("E17D5988-0372-4792-82CF-9E37C79F7319", "No Activity", "The individual has not participated in any recent activity.", "64014FE6-943D-4ACF-8014-FED9F9169AE8", true); Sql(@"IF NOT EXISTS(SELECT [Id] FROM [ServiceJob] WHERE [Class] = 'Rock.Jobs.DataAutomation') BEGIN INSERT INTO [ServiceJob] ( [IsSystem] ,[IsActive] ,[Name] ,[Description] ,[Class] ,[CronExpression] ,[NotificationStatus] ,[Guid] ) VALUES ( 0 ,1 ,'Data Automation' ,'Updates person/family information based on data automation settings.' ,'Rock.Jobs.DataAutomation' ,'0 0 4 ? * TUE *' ,1 ,'059DC06D-39F1-4113-A6C3-94622A40F1CE'); END"); // JE: Makes the interaction channel for Short Links a well known channel, changes the name of the channel to something more readable // and adds formatting to the lists and details that one would expect. Sql(HotFixMigrationResource._047_DataAutomation_ShortLinkInteractionFix); // SK: Fixes #2761 Mapped case worker correct address while printing Benevolence Request Sql(HotFixMigrationResource._047_DataAutomation_FixBenevolenceCaseWorker); }
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(); }
/// <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> /// Devices the type attribute. /// </summary> private void DeviceTypeAttribute() { RockMigrationHelper.AddDefinedTypeAttribute(Rock.SystemGuid.DefinedType.DEVICE_TYPE, Rock.SystemGuid.FieldType.BOOLEAN, "Supports Camera", "core_SupportsCameras", "Used to determine if these devices have the capability of a camera.", 0, string.Empty, Rock.SystemGuid.Attribute.DEFINED_VALUE_DEVICE_TYPE_SUPPORTS_CAMERAS); RockMigrationHelper.UpdateDefinedValueAttributeValue(Rock.SystemGuid.DefinedValue.DEVICE_TYPE_CHECKIN_KIOSK, Rock.SystemGuid.Attribute.DEFINED_VALUE_DEVICE_TYPE_SUPPORTS_CAMERAS, true.ToString()); RockMigrationHelper.UpdateDefinedValueAttributeValue(Rock.SystemGuid.DefinedValue.DEVICE_TYPE_GIVING_KIOSK, Rock.SystemGuid.Attribute.DEFINED_VALUE_DEVICE_TYPE_SUPPORTS_CAMERAS, true.ToString()); }
private void AddUpdateDefinedValuesFor_COMMUNICATION_SMS_FROM_Up() { // Edit DT Attribute Response Recipient and make optional RockMigrationHelper.UpdateDefinedTypeAttribute(Rock.SystemGuid.DefinedType.COMMUNICATION_SMS_FROM, Rock.SystemGuid.FieldType.PERSON, "Response Recipient", "ResponseRecipient", "The person who should receive responses to the SMS number. This person must have a phone number with SMS enabled or no response will be sent.", 24, true, string.Empty, false, false, "E9E82709-5506-4339-8F6A-C2259329A71F"); // Add DT Attribute Enable Mobile Conversations and set to true RockMigrationHelper.AddDefinedTypeAttribute(Rock.SystemGuid.DefinedType.COMMUNICATION_SMS_FROM, Rock.SystemGuid.FieldType.BOOLEAN, "Enable Mobile Conversations", "EnableMobileConversations", "When enabled, SMS conversations would be processed by sending messages to the Response Recipient's mobile phone. Otherwise, the conversations would be handled using the SMS Conversations page.", 1019, "True", "60E05E00-E1A3-46A2-A56D-FE208D91FE4F"); // Add DT Attribute Value for Enable Mobile Conversations Attribute and set to true RockMigrationHelper.AddDefinedValueAttributeValue(Rock.SystemGuid.DefinedType.COMMUNICATION_SMS_FROM, "60E05E00-E1A3-46A2-A56D-FE208D91FE4F", "1"); // Add DT Attribute LaunchWorkflowOnResponseReceived RockMigrationHelper.AddDefinedTypeAttribute(Rock.SystemGuid.DefinedType.COMMUNICATION_SMS_FROM, Rock.SystemGuid.FieldType.WORKFLOW_TYPE, "Launch Workflow On Response Received", "LaunchWorkflowOnResponseReceived", "The workflow type to launch when a response is received. Additionally if the workflow type has any of the following attribute keys defined, those attribute values will also be set: FromPhone, Message, SMSFromDefinedValue, FromPerson, ToPerson.", 1020, string.Empty, "49C7A5A3-D711-4E41-86E4-06408ED6C1BD"); }
/// <summary> /// Operations to be performed during the upgrade process. /// </summary> public override void Up() { RockMigrationHelper.AddDefinedType( "Global", "JSON Web Token Configuration", "These values represent validation parameters for JSON Web Tokens. The actual defined value is an OpenID configuration URL. An example value if you are using Auth0 would be https://xxxxxx.auth0.com/.well-known/openid-configuration. Attributes for these defined values define additional parameters for token verification and then Person Search Key association.", SystemGuid.DefinedType.JWT_CONFIGURATION, ""); RockMigrationHelper.AddDefinedTypeAttribute( SystemGuid.DefinedType.JWT_CONFIGURATION, "59D5A94C-94A0-4630-B80A-BB25697D74C7", "Person Search Key", "PersonSearchTypeValue", "The person search keys to use when looking for the bearer of a token using a person search key", 1037, "", Rock.SystemGuid.Attribute.DEFINED_VALUE_JWT_SEARCH_KEY); RockMigrationHelper.AddDefinedTypeAttribute(SystemGuid.DefinedType.JWT_CONFIGURATION, "9C204CD0-1233-41C5-818A-C5DA439445AA", "Audience", "Audience", "The Audience for the JSON Web Token", 1034, "", SystemGuid.Attribute.DEFINED_VALUE_JWT_AUDIENCE); RockMigrationHelper.AddDefinedTypeAttribute(SystemGuid.DefinedType.JWT_CONFIGURATION, "9C204CD0-1233-41C5-818A-C5DA439445AA", "Issuer", "Issuer", "The Issuer for the JSON Web Token", 1035, "", SystemGuid.Attribute.DEFINED_VALUE_JWT_ISSUER); RockMigrationHelper.AddDefinedTypeAttributeQualifier(SystemGuid.Attribute.DEFINED_VALUE_JWT_SEARCH_KEY, SystemGuid.DefinedType.PERSON_SEARCH_KEYS, "E1F99CD5-881D-485F-87F1-E74E713D43A1"); }
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"); }
public override void Up() { RockMigrationHelper.AddDefinedType("Tools", "Distance Mappable Entities", "Endpoint for getting distance for various entities. Route is /api/mapping/distance/{{DefinedValueId}}/{{Address}}", Constants.UniversalDefinedTypeGuid, @""); RockMigrationHelper.AddDefinedTypeAttribute("7F70ABE9-1705-4DED-BABE-6D720EC52914", "7525C4CB-EE6B-41D4-9B64-A08048D5A5C0", "Entity Type", "EntityType", "", 1248, "", "A4E5D4F4-580D-459E-8C83-C6A92B47396A"); RockMigrationHelper.AddDefinedTypeAttribute("7F70ABE9-1705-4DED-BABE-6D720EC52914", "9C204CD0-1233-41C5-818A-C5DA439445AA", "Entity Id", "EntityId", "The id of the entity (Group Type Id, Parent Group Id or Attribute Id) to calculate distances from.", 1249, "", "1BC6FD9F-DDE2-4083-9539-7821C728014A"); RockMigrationHelper.AddAttributeQualifier("1BC6FD9F-DDE2-4083-9539-7821C728014A", "ispassword", "False", "FDCC5DBA-F3A9-4896-BB35-F93B630612BB"); RockMigrationHelper.AddAttributeQualifier("1BC6FD9F-DDE2-4083-9539-7821C728014A", "maxcharacters", "", "1257C2FD-BB2B-4BBE-992E-54BFCB829FF4"); RockMigrationHelper.AddAttributeQualifier("1BC6FD9F-DDE2-4083-9539-7821C728014A", "showcountdown", "False", "7E762A8E-39D4-4EF2-8092-8C5407127BEA"); RockMigrationHelper.AddAttributeQualifier("A4E5D4F4-580D-459E-8C83-C6A92B47396A", "fieldtype", "ddl", "8AE3FF18-6B1E-4096-8494-3B798AAA471B"); RockMigrationHelper.AddAttributeQualifier("A4E5D4F4-580D-459E-8C83-C6A92B47396A", "repeatColumns", "", "4D143B57-93D5-47EE-9697-2F26879DBF73"); RockMigrationHelper.AddAttributeQualifier("A4E5D4F4-580D-459E-8C83-C6A92B47396A", "values", "GroupType^Group Type,ParentGroup^Child Groups of Group,Campus^Campus,Attribute^Address Attribute", "97BB896B-A83D-4F96-8677-4FCD2609F1D5"); RockMigrationHelper.UpdateDefinedValue("7F70ABE9-1705-4DED-BABE-6D720EC52914", "Blankenbaker Home Groups", "", "2E216362-0B05-4CE7-BBA8-E2C3DCAAEB07", false); RockMigrationHelper.UpdateDefinedValue("7F70ABE9-1705-4DED-BABE-6D720EC52914", "Campus", "", "EB39F521-F9AA-4812-BA8F-102C029C8516", false); RockMigrationHelper.UpdateDefinedValue("7F70ABE9-1705-4DED-BABE-6D720EC52914", "Content Channel Attributes", "", "F4D7D410-5096-460F-B740-4F6E0673CE16", false); RockMigrationHelper.UpdateDefinedValue("7F70ABE9-1705-4DED-BABE-6D720EC52914", "Home Groups", "", "7E83A576-07FC-49EA-98BC-73C123D24DD8", false); RockMigrationHelper.AddDefinedValueAttributeValue("2E216362-0B05-4CE7-BBA8-E2C3DCAAEB07", "1BC6FD9F-DDE2-4083-9539-7821C728014A", @"820057"); RockMigrationHelper.AddDefinedValueAttributeValue("2E216362-0B05-4CE7-BBA8-E2C3DCAAEB07", "A4E5D4F4-580D-459E-8C83-C6A92B47396A", @"ParentGroup"); RockMigrationHelper.AddDefinedValueAttributeValue("7E83A576-07FC-49EA-98BC-73C123D24DD8", "1BC6FD9F-DDE2-4083-9539-7821C728014A", @"60"); RockMigrationHelper.AddDefinedValueAttributeValue("7E83A576-07FC-49EA-98BC-73C123D24DD8", "A4E5D4F4-580D-459E-8C83-C6A92B47396A", @"GroupType"); RockMigrationHelper.AddDefinedValueAttributeValue("EB39F521-F9AA-4812-BA8F-102C029C8516", "A4E5D4F4-580D-459E-8C83-C6A92B47396A", @"Campus"); RockMigrationHelper.AddDefinedValueAttributeValue("F4D7D410-5096-460F-B740-4F6E0673CE16", "1BC6FD9F-DDE2-4083-9539-7821C728014A", @"89281"); RockMigrationHelper.AddDefinedValueAttributeValue("F4D7D410-5096-460F-B740-4F6E0673CE16", "A4E5D4F4-580D-459E-8C83-C6A92B47396A", @"Attribute"); }
/// <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); }
public override void Up() { RockMigrationHelper.AddDefinedType("Steps to Care", "Status", "The status of Care Needs.", SystemGuid.DefinedType.CARE_NEED_STATUS); RockMigrationHelper.UpdateDefinedValue(SystemGuid.DefinedType.CARE_NEED_STATUS, "Open", "", SystemGuid.DefinedValue.CARE_NEED_STATUS_OPEN, true); RockMigrationHelper.UpdateDefinedValue(SystemGuid.DefinedType.CARE_NEED_STATUS, "Closed", "", SystemGuid.DefinedValue.CARE_NEED_STATUS_CLOSED, true); RockMigrationHelper.UpdateDefinedValue(SystemGuid.DefinedType.CARE_NEED_STATUS, "Follow Up", "", SystemGuid.DefinedValue.CARE_NEED_STATUS_FOLLOWUP, true); RockMigrationHelper.UpdateDefinedValue(SystemGuid.DefinedType.CARE_NEED_STATUS, "Long Term Care", "", SystemGuid.DefinedValue.CARE_NEED_STATUS_LONGTERMCARE, false); RockMigrationHelper.AddDefinedType("Steps to Care", "Category", "Categories used for Care Needs and Care workers to color code and assign them.", SystemGuid.DefinedType.CARE_NEED_CATEGORY); RockMigrationHelper.AddDefinedTypeAttribute(SystemGuid.DefinedType.CARE_NEED_CATEGORY, "D747E6AE-C383-4E22-8846-71518E3DD06F", "Color", "Color", "", 1056, "", "FF84E9A7-9BD6-4987-A942-AD4703303B12"); RockMigrationHelper.AddAttributeQualifier("FF84E9A7-9BD6-4987-A942-AD4703303B12", "selectiontype", "Color Picker", "E3E0FD56-AEDF-4A44-87E2-B2E5B74A32F9"); RockMigrationHelper.UpdateDefinedValue(SystemGuid.DefinedType.CARE_NEED_CATEGORY, "Birth", "", "EA93B6A9-F151-475D-89B4-C7C24AE603B8", false); RockMigrationHelper.UpdateDefinedValue(SystemGuid.DefinedType.CARE_NEED_CATEGORY, "Grief", "", "6E092B06-BD9C-400F-9426-75CED70FF93E", false); RockMigrationHelper.UpdateDefinedValue(SystemGuid.DefinedType.CARE_NEED_CATEGORY, "Hospital/Surgery", "", "167B982F-1C66-4228-B867-3A64AEFE37F1", false); RockMigrationHelper.UpdateDefinedValue(SystemGuid.DefinedType.CARE_NEED_CATEGORY, "Milestone", "", "087FF723-7C2A-46EE-83F6-F1EF7F0F33C7", false); RockMigrationHelper.UpdateDefinedValue(SystemGuid.DefinedType.CARE_NEED_CATEGORY, "Other", "", "6BD7404D-90DD-4C94-9B0C-B516DEACB306", false); RockMigrationHelper.AddDefinedValueAttributeValue("087FF723-7C2A-46EE-83F6-F1EF7F0F33C7", "FF84E9A7-9BD6-4987-A942-AD4703303B12", @"rgb(76,175,80)"); RockMigrationHelper.AddDefinedValueAttributeValue("167B982F-1C66-4228-B867-3A64AEFE37F1", "FF84E9A7-9BD6-4987-A942-AD4703303B12", @"rgb(244,67,54)"); RockMigrationHelper.AddDefinedValueAttributeValue("6BD7404D-90DD-4C94-9B0C-B516DEACB306", "FF84E9A7-9BD6-4987-A942-AD4703303B12", @"rgb(156,39,176)"); RockMigrationHelper.AddDefinedValueAttributeValue("6E092B06-BD9C-400F-9426-75CED70FF93E", "FF84E9A7-9BD6-4987-A942-AD4703303B12", @"#757272"); RockMigrationHelper.AddDefinedValueAttributeValue("EA93B6A9-F151-475D-89B4-C7C24AE603B8", "FF84E9A7-9BD6-4987-A942-AD4703303B12", @"rgb(255,235,59)"); RockMigrationHelper.UpdateNoteType("Steps to Care - Care Need", "rocks.kfs.StepsToCare.Model.CareNeed", true, "922403D1-FA11-4159-B325-B818237AE9B3", true, "fas fa-notes-medical"); }
/// <summary> /// Operations to be performed during the upgrade process. /// </summary> public override void Up() { // Assign GUID to Zoom and add security RockMigrationHelper.UpdateEntityType("rocks.kfs.Zoom.ZoomApp", ZoomGuid.EntityType.ZOOM, false, true); RockMigrationHelper.AddSecurityAuthForEntityType("rocks.kfs.Zoom.ZoomApp", 0, Rock.Security.Authorization.VIEW, true, Rock.SystemGuid.Group.GROUP_ADMINISTRATORS, 0, "6BC0A6D7-844F-49DF-BE40-5AD45EAB3CEE"); RockMigrationHelper.AddSecurityAuthForEntityType("rocks.kfs.Zoom.ZoomApp", 1, Rock.Security.Authorization.VIEW, false, null, Rock.Model.SpecialRole.AllUsers.ConvertToInt(), "3921542F-476D-48B4-97F5-788709A1F4B4"); RockMigrationHelper.AddNewEntityAttribute("rocks.kfs.Zoom.ZoomApp", Rock.SystemGuid.FieldType.ENCRYPTED_TEXT, "", "", "API Key", "", "The API Key for the Zoom Marketplace JWT app to use for KFS Zoom integration elements.", 0, "", "D53A2B48-C8B4-4481-B2AB-139CAF90C78C", "rocks.kfs.ZoomApiKey"); RockMigrationHelper.AddNewEntityAttribute("rocks.kfs.Zoom.ZoomApp", Rock.SystemGuid.FieldType.ENCRYPTED_TEXT, "", "", "API Secret", "", "The API Secret for the Zoom Marketplace JWT app to use for KFS Zoom integration elements.", 0, "", "CB89B071-4866-41BD-ACB1-1810F5224A82", "rocks.kfs.ZoomApiSecret"); // Only add the Reservation attribute if the Reservation table exists try { Sql(@"SELECT TOP 1 Id FROM _com_bemaservices_RoomManagement_Reservation"); RockMigrationHelper.AddNewEntityAttribute("com.bemaservices.RoomManagement.Model.Reservation", Rock.SystemGuid.FieldType.GROUP_TYPE_GROUP, "", "", "Zoom Notify Group", "", "The Group to notify when a Zoom Room meeting is connected with this reservation.", 0, "", ZoomGuid.Attribute.ROOM_RESERVATION_GROUP_ATTRIBUTE, "rocks.kfs.ZoomNotifyGroup"); } catch { } RockMigrationHelper.AddDefinedType("Zoom", "Zoom Rooms", "Zoom Rooms available for linking to Rock Locations.", ZoomGuid.DefinedType.ZOOM_ROOM); RockMigrationHelper.AddDefinedTypeAttribute(ZoomGuid.DefinedType.ZOOM_ROOM, Rock.SystemGuid.FieldType.TEXT, "Meeting Password", "rocks.kfs.ZoomMeetingPassword", "Zoom meeting password.", 1, "", ZoomGuid.Attribute.ZOOM_MEETING_PASSWORD); RockMigrationHelper.AddDefinedTypeAttribute(ZoomGuid.DefinedType.ZOOM_ROOM, Rock.SystemGuid.FieldType.BOOLEAN, "Join Before Host", "rocks.kfs.ZoomJoinBeforeHost", "Zoom meeting's Join Before Host setting.", 2, "false", ZoomGuid.Attribute.ZOOM_MEETING_JOIN_BEFORE_HOST); RockMigrationHelper.AddOrUpdateEntityAttribute("Rock.Model.Location", Rock.SystemGuid.FieldType.DEFINED_VALUE, "", "", "Zoom Room", "", "The Zoom Room associated with this location.", 0, "", ZoomGuid.Attribute.ZOOM_ROOM_LOCATION_ENTITY_ATTRIBUTE, "rocks.kfs.ZoomRoom"); }
/// <summary> /// NA: PR #3458 Added caching to Channel Feed /// </summary> private void AddCachingToChannelFeedUp() { // Add caching to Channel Feed RockMigrationHelper.AddDefinedTypeAttribute("C3D44004-6951-44D9-8560-8567D705A48B", Rock.SystemGuid.FieldType.INTEGER, "Cache Duration", "CacheDuration", "Length of time in minutes to keep the template output in cache.", 2, "0", "6243C0B1-059D-4236-8F65-FC62281B6210"); }
/// <summary> /// SK: Add "Highlight Color" attribute to Audience Type defined type /// </summary> private void AudienceTypeDefinedTypeAddHighlightColorAttribute() { RockMigrationHelper.AddDefinedTypeAttribute("799301A3-2026-4977-994E-45DC68502559", "D747E6AE-C383-4E22-8846-71518E3DD06F", "Highlight Color", "HighlightColor", "", 1039, "#c4c4c4", "7CE41BAD-58A3-4A1B-B06D-3277F2C816A5"); RockMigrationHelper.AddAttributeQualifier("7CE41BAD-58A3-4A1B-B06D-3277F2C816A5", "selectiontype", "Color Picker", "2EF74C40-7316-432D-82AE-A89E2DD08D0F"); }
/// <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"" } } }"); }
/// <summary> /// Operations to be performed during the upgrade process. /// </summary> public override void Up() { AddColumn("dbo.BlockType", "IsCommon", c => c.Boolean(nullable: false)); Sql($"UPDATE [BlockType] SET [IsCommon] = 1 WHERE [Guid] = '{Rock.SystemGuid.BlockType.HTML_CONTENT}'"); Sql($"UPDATE [BlockType] SET [IsCommon] = 1 WHERE [Guid] = '{Rock.SystemGuid.BlockType.PAGE_MENU}'"); Sql($"UPDATE [BlockType] SET [IsCommon] = 1 WHERE [Guid] = '{Rock.SystemGuid.BlockType.CONTENT_CHANNEL_VIEW}'"); // Rollups // MP: Universal No Date Channel Type Sql(@"INSERT INTO [ContentChannelType] ( [IsSystem], [Name], [DateRangeType], [Guid], [DisablePriority] ) VALUES ( 1, 'Universal No Date Channel Type', 3, '8A9B6DE0-6057-4356-894D-E84E33392F57', 0 )"); // MP: IsFormal Person Titles RockMigrationHelper.AddDefinedTypeAttribute("4784CD23-518B-43EE-9B97-225BF6E07846", Rock.SystemGuid.FieldType.BOOLEAN, "Is Formal", "IsFormal", "This flag marks the title as being formal which will display it differently on various screens. For instance, the title Dr. is nice to know when addressing someone, but Mr. is common and not needed to be displayed in many places.", 0, false.ToString(), "EE60F454-3E87-4BB5-B8BE-10464C96B666"); Sql("Update [Attribute] set [IsGridColumn] = 1 where [Guid] = 'EE60F454-3E87-4BB5-B8BE-10464C96B666' "); // Set 'Dr.' person title as IsFormal=True RockMigrationHelper.AddDefinedValueAttributeValue("FAAFBC0F-6209-4647-BA20-4A9CF1950AB4", "EE60F454-3E87-4BB5-B8BE-10464C96B666", true.ToString()); // Set 'Rev.' person title as IsFormal=True RockMigrationHelper.AddDefinedValueAttributeValue("F0EC14D2-3E4E-4F4A-B445-38A89A005812", "EE60F454-3E87-4BB5-B8BE-10464C96B666", true.ToString()); // Set 'Cpt.' person title as IsFormal=True RockMigrationHelper.AddDefinedValueAttributeValue("7149B9E3-A220-47FD-93EA-84A0381F5C94", "EE60F454-3E87-4BB5-B8BE-10464C96B666", true.ToString()); // DT: Update Binary File proc Sql(MigrationSQL._201707101648235_CommonBlockTypes_spCore_BinaryFileGet); // SV: Renamed the "Inactive Record Status" to "Record Status" and show Inactive AND Pending Sql(@" UPDATE [PersonBadge] SET [Name]='Record Status' WHERE [Guid]='66972BFF-42CD-49AB-9A7A-E1B9DECA4ECA'; UPDATE A SET [Value]='{% if Person.RecordStatusValue.Value != empty and Person.RecordStatusValue.Value == ""Inactive"" -%} <span class=""label label-danger"" title=""{{ Person.RecordStatusReasonValue.Value }}"" data-toggle=""tooltip"">{{ Person.RecordStatusValue.Value }}</span> {% elseif Person.RecordStatusValue.Value != empty and Person.RecordStatusValue.Value == ""Pending"" -%} <span class=""label label-warning"" title=""{{ Person.RecordStatusReasonValue.Value }}"" data-toggle=""tooltip"">{{ Person.RecordStatusValue.Value }}</span> {% endif -%}' FROM [AttributeValue] A INNER JOIN [Attribute] B ON A.[AttributeId]=B.Id WHERE B.[Guid]='01C9BA59-D8D4-4137-90A6-B3C06C70BBC3' AND A.[EntityId]=(SELECT Id FROM [PersonBadge] WHERE [Guid]='66972BFF-42CD-49AB-9A7A-E1B9DECA4ECA') "); // MP: BlockTypes rollups RockMigrationHelper.UpdateBlockType("Event Detail with Occurrences Search Lava", "Block that shows details of a specific event with a search for occurrences of the event", "~/Blocks/Event/EventDetailWithOccurrencesSearchLava.ascx", "Event", "B7788DFF-783D-40A3-BFD4-EA9561F950A8"); RockMigrationHelper.UpdateBlockType("Event Item Occurrences Search Lava", "Block does a search for occurrences of events based on the EventCalendarId specified in the URL", "~/Blocks/Event/EventItemOccurrencesSearchLava.ascx", "Event", "01CA4723-8290-41C6-A2D2-88469FAA48E9"); RockMigrationHelper.UpdateBlockType("Sample React Block", "Creates a generic counter to showcase React integration", "~/Blocks/Examples/SampleReactBlock.ascx", "Examples", "7DC6C490-E9AF-407C-9716-991564F93FF6"); RockMigrationHelper.UpdateBlockType("Fundraising Progress", "Progress for all people in a fundraising opportunity", "~/Blocks/Fundraising/FundraisingProgress.ascx", "Fundraising", "859DCA73-938D-4214-B9AB-BFDB6CEA2DE0"); // Attrib for BlockType: Attributes:Enable Ordering RockMigrationHelper.UpdateBlockTypeAttribute("E5EA2F6D-43A2-48E0-B59C-4409B78AC830", "1EDAFDED-DFE6-4334-B019-6EECBA89E05A", "Enable Ordering", "EnableOrdering", "", "Should the attributes be allowed to be sorted?", 3, @"False", "E27F1AE4-1792-4033-9A72-668647B0CD09"); }
/// <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' "); }
/// <summary> /// Operations to be performed during the upgrade process. /// </summary> public override void Up() { // #897 Binary File Types Duplicate Name rollups DropIndex("dbo.BinaryFileType", new[] { "Name" }); // #893 Office Information orphan block removal RockMigrationHelper.DeleteBlock("3BFEF2CC-AEA9-457E-A552-C14D69AD93FE"); // // add defined type for registration configuration // RockMigrationHelper.AddDefinedType("Check-in", "Family Registration Configuration", "Configuration templates for the Family Registration application.", "0F48CB3F-8A48-249A-412A-2DCA7648706F"); RockMigrationHelper.AddDefinedTypeAttribute("0F48CB3F-8A48-249A-412A-2DCA7648706F", "1D0D3794-C210-48A8-8C68-3FBEC08A6BA5", "Configuration Template", "ConfigurationTemplate", "JSON configuration file.", 0, "", "492D1E2D-5DB5-53BF-46BF-C1F95D17A72B"); RockMigrationHelper.AddAttributeQualifier("492D1E2D-5DB5-53BF-46BF-C1F95D17A72B", "editorHeight", "600", "8A687566-5E0C-5C9B-4A95-CAE04EF4F947"); RockMigrationHelper.AddAttributeQualifier("492D1E2D-5DB5-53BF-46BF-C1F95D17A72B", "editorTheme", "0", "3E912DED-21A6-9398-4BC3-DC44EA3249A5"); RockMigrationHelper.AddAttributeQualifier("492D1E2D-5DB5-53BF-46BF-C1F95D17A72B", "editorMode", "4", "C557305C-84DD-5191-4A9B-C873A487AD05"); // // pages for calendar // RockMigrationHelper.AddPage("F7105BFE-B28C-41B6-9CE6-F1018D77DD8F", "D65F783D-87A9-4CC9-8110-E83466A0EADB", "Calendars", "", "63990874-0DFF-45FC-9F09-81B0B0D375B4", ""); // Site:Rock RMS RockMigrationHelper.UpdateBlockType("Event Calendar List", "Block to display the event calendars.", "~/Blocks/Calendar/EventCalendarList.ascx", "Event Calendar", "041B5C23-5F1F-4B02-A767-FB7F4B1A5345"); RockMigrationHelper.AddBlock("63990874-0DFF-45FC-9F09-81B0B0D375B4", "", "041B5C23-5F1F-4B02-A767-FB7F4B1A5345", "Event Calendar List", "Main", "", "", 0, "367B36C6-2779-451D-BF8C-BC6318D42AA1"); RockMigrationHelper.AddBlockTypeAttribute("041B5C23-5F1F-4B02-A767-FB7F4B1A5345", "BD53F9C9-EBA9-4D3F-82EA-DE5DD34A8108", "Detail Page", "DetailPage", "", "Page used to view status of an event calendar.", 0, @"", "E7907FA7-B586-439B-8DE1-C0185EC4F790"); RockMigrationHelper.AddBlockAttributeValue("367B36C6-2779-451D-BF8C-BC6318D42AA1", "E7907FA7-B586-439B-8DE1-C0185EC4F790", @"b54725e1-3640-4419-b580-2af77daf6568"); // Detail Page // Page: Event Calendar Detail RockMigrationHelper.AddPage("63990874-0DFF-45FC-9F09-81B0B0D375B4", "D65F783D-87A9-4CC9-8110-E83466A0EADB", "Event Calendar Detail", "", "B54725E1-3640-4419-B580-2AF77DAF6568", ""); // Site:Rock RMS RockMigrationHelper.UpdateBlockType("Event Calendar Detail", "Displays the details of the given Event Calendar for editing.", "~/Blocks/Calendar/EventCalendarDetail.ascx", "Event Calendar", "0320DFB9-7A5A-4DAC-8234-3D504E496D71"); RockMigrationHelper.UpdateBlockType("Event Calendar Item List", "Lists all the items in the given calendar.", "~/Blocks/Calendar/EventCalendarItemList.ascx", "Event Calendar", "EC8DFDC5-C177-4208-8ABA-1F85010FBBFF"); RockMigrationHelper.AddBlock("B54725E1-3640-4419-B580-2AF77DAF6568", "", "0320DFB9-7A5A-4DAC-8234-3D504E496D71", "Event Calendar Detail", "Main", "", "", 0, "0C94B3DE-4FA8-4683-B4E9-52BE40D266D9"); RockMigrationHelper.AddBlock("B54725E1-3640-4419-B580-2AF77DAF6568", "", "EC8DFDC5-C177-4208-8ABA-1F85010FBBFF", "Event Calendar Item List", "Main", "", "", 1, "87D0A3C6-D32B-4840-8D1A-B6030B72EA95"); RockMigrationHelper.AddBlockTypeAttribute("EC8DFDC5-C177-4208-8ABA-1F85010FBBFF", "BD53F9C9-EBA9-4D3F-82EA-DE5DD34A8108", "Detail Page", "DetailPage", "", "", 0, @"", "AA08DCED-940E-45B9-AB9B-7B93A609BF13"); RockMigrationHelper.AddBlockAttributeValue("87D0A3C6-D32B-4840-8D1A-B6030B72EA95", "AA08DCED-940E-45B9-AB9B-7B93A609BF13", @"7fb33834-f40a-4221-8849-bb8c06903b04"); // Detail Page // Page: Event Item Detail Page RockMigrationHelper.AddPage("B54725E1-3640-4419-B580-2AF77DAF6568", "D65F783D-87A9-4CC9-8110-E83466A0EADB", "Event Item Detail Page", "", "7FB33834-F40A-4221-8849-BB8C06903B04", ""); // Site:Rock RMS RockMigrationHelper.UpdateBlockType("Event Item Detail", "Displays the details of the given eventItem.", "~/Blocks/Calendar/EventItemDetail.ascx", "Event Calendar", "39E3476D-1BA1-438D-887F-03DD23639221"); RockMigrationHelper.AddBlock("7FB33834-F40A-4221-8849-BB8C06903B04", "", "39E3476D-1BA1-438D-887F-03DD23639221", "Event Item Detail", "Main", "", "", 0, "2F577D8E-7A9C-46DC-A4AB-4732E217F7D0"); RockMigrationHelper.AddBlockTypeAttribute("39E3476D-1BA1-438D-887F-03DD23639221", "1EDAFDED-DFE6-4334-B019-6EECBA89E05A", "Show Edit", "ShowEdit", "", "", 2, @"True", "95CB7E85-F83D-47BB-84B3-77A73C640304"); // Page: Calendar RockMigrationHelper.AddPage("85F25819-E948-4960-9DDF-00F54D32444E", "5FEAF34C-7FB6-4A11-8A1E-C452EC7849BD", "Calendar", "", "2E6FED28-683F-4726-8CF1-2822E8E73B03", ""); // Site:External Website RockMigrationHelper.UpdateBlockType("Event Calendar Lava", "Displays details for a specific package.", "~/Blocks/Calendar/ExternalCalendarLava.ascx", "Event Calendar", "8760D668-8ADF-48C8-9D90-09461FB75B88"); RockMigrationHelper.AddBlock("2E6FED28-683F-4726-8CF1-2822E8E73B03", "", "8760D668-8ADF-48C8-9D90-09461FB75B88", "Event Calendar Lava", "Main", "", "", 0, "0ADEEFE5-8293-48AC-AFA9-E0F0E363FCE7"); RockMigrationHelper.AddBlockTypeAttribute("8760D668-8ADF-48C8-9D90-09461FB75B88", "1EDAFDED-DFE6-4334-B019-6EECBA89E05A", "Set Page Title", "SetPageTitle", "", "Determines if the block should set the page title with the calendar name.", 0, @"False", "4A53E8C5-EE4E-4321-9226-3EEA32A9379D"); RockMigrationHelper.AddBlockTypeAttribute("8760D668-8ADF-48C8-9D90-09461FB75B88", "A75DFC58-7A1B-4799-BF31-451B2BBE38FF", "Event Calendar Id", "EventCalendarId", "", "The Id of the event calendar to be displayed", 0, @"1", "BF06F16A-E40F-497A-B1A9-409D4FFCD972"); RockMigrationHelper.AddBlockTypeAttribute("8760D668-8ADF-48C8-9D90-09461FB75B88", "1EDAFDED-DFE6-4334-B019-6EECBA89E05A", "Show Date Range Filter", "ShowDateRangeFilter", "", "Determines whether the campus filters are shown", 0, @"False", "C1259B83-C1AF-4880-81A3-16204D502DC9"); RockMigrationHelper.AddBlockTypeAttribute("8760D668-8ADF-48C8-9D90-09461FB75B88", "1EDAFDED-DFE6-4334-B019-6EECBA89E05A", "Show Category Filter", "ShowCategoryFilter", "", "Determines whether the campus filters are shown", 0, @"False", "9DEA73E9-E5AF-4386-BFBA-4C1440D315C8"); RockMigrationHelper.AddBlockTypeAttribute("8760D668-8ADF-48C8-9D90-09461FB75B88", "1EDAFDED-DFE6-4334-B019-6EECBA89E05A", "Show Campus Filter", "ShowCampusFilter", "", "Determines whether the campus filters are shown", 0, @"False", "0DA63111-AFE3-4D77-BE00-05DE5D69B536"); RockMigrationHelper.AddBlockTypeAttribute("8760D668-8ADF-48C8-9D90-09461FB75B88", "1D0D3794-C210-48A8-8C68-3FBEC08A6BA5", "Lava Template", "LavaTemplate", "", "Lava template to use to display the list of events.", 2, @"{% include '~/Assets/Lava/EventCalendar/ExternalCalendar.lava' %}", "1D3EC083-581E-4435-8FC8-930C48AC50F4"); RockMigrationHelper.AddBlockTypeAttribute("8760D668-8ADF-48C8-9D90-09461FB75B88", "1EDAFDED-DFE6-4334-B019-6EECBA89E05A", "Enable Debug", "EnableDebug", "", "Display a list of merge fields available for lava.", 3, @"False", "1704176B-F79A-4586-8B11-8460CCFB44BE"); RockMigrationHelper.AddBlockAttributeValue("0ADEEFE5-8293-48AC-AFA9-E0F0E363FCE7", "1D3EC083-581E-4435-8FC8-930C48AC50F4", @"{% include '~/Assets/Lava/EventCalendar/ExternalCalendar.lava' %}"); // Lava Template RockMigrationHelper.AddBlockAttributeValue("0ADEEFE5-8293-48AC-AFA9-E0F0E363FCE7", "1704176B-F79A-4586-8B11-8460CCFB44BE", @"False"); // Enable Debug RockMigrationHelper.AddBlockAttributeValue("0ADEEFE5-8293-48AC-AFA9-E0F0E363FCE7", "4A53E8C5-EE4E-4321-9226-3EEA32A9379D", @"False"); // Set Page Title RockMigrationHelper.AddBlockAttributeValue("0ADEEFE5-8293-48AC-AFA9-E0F0E363FCE7", "BF06F16A-E40F-497A-B1A9-409D4FFCD972", @"1"); // Event Calendar Id RockMigrationHelper.AddBlockAttributeValue("0ADEEFE5-8293-48AC-AFA9-E0F0E363FCE7", "C1259B83-C1AF-4880-81A3-16204D502DC9", @"False"); // Show Date Range Filter RockMigrationHelper.AddBlockAttributeValue("0ADEEFE5-8293-48AC-AFA9-E0F0E363FCE7", "9DEA73E9-E5AF-4386-BFBA-4C1440D315C8", @"False"); // Show Category Filter RockMigrationHelper.AddBlockAttributeValue("0ADEEFE5-8293-48AC-AFA9-E0F0E363FCE7", "0DA63111-AFE3-4D77-BE00-05DE5D69B536", @"False"); // Show Campus Filter Sql(@" INSERT INTO [dbo].[EventCalendar] ([Name] ,[Description] ,[IconCssClass] ,[IsActive] ,[Guid]) VALUES ('Public' ,'A calendar for public events that the church hosts and promotes.' ,'fa fa-calendar' ,'true' ,'8a444668-19af-4417-9c74-09f842572974') "); }