KE country data
Account products, the currencies they imply, and the privacy policy. They publish as an Onboarding EF data migration—the mechanism DigitalOnboardingSvc already applies at startup.
Review the script
This is the primary database artifact. It upserts the account products and privacy policy currently configured for KE. Review the values and rollback before adding it to DigitalOnboardingSvc.
src/Modules/Onboarding/OmniDos.Onboarding.Infra/Migrations/20261018145737_SeedKECountryData.csusing Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using OmniDos.Onboarding.Infra.Data;
#nullable disable
namespace OmniDos.Onboarding.Infra.Migrations
{
/// <summary>Upserts KE account products and privacy-policy lookup data.</summary>
[DbContext(typeof(OnboardingDbContext))]
[Migration("20261018145737_SeedKECountryData")]
public partial class SeedKECountryData_20261018145737 : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.Sql("""
DECLARE @CountryDataSeededBy NVARCHAR(256) = N'20261018145737_SeedKECountryData';
CREATE TABLE #AccountProductSeed (
CountryCode NVARCHAR(8) NOT NULL,
Currency NVARCHAR(8) NOT NULL,
ResidencyType NVARCHAR(32) NOT NULL,
SchemeCode NVARCHAR(32) NOT NULL,
AccountType NVARCHAR(128) NULL,
Description NVARCHAR(1024) NULL,
ImageUrl NVARCHAR(2048) NULL,
Features NVARCHAR(MAX) NOT NULL,
Requirements NVARCHAR(MAX) NOT NULL,
TariffGuideUrl NVARCHAR(2048) NULL,
CostNote NVARCHAR(512) NULL,
SpecialNotes NVARCHAR(512) NULL
);
INSERT INTO #AccountProductSeed (
CountryCode, Currency, ResidencyType, SchemeCode, AccountType,
Description, ImageUrl, Features, Requirements, TariffGuideUrl,
CostNote, SpecialNotes
)
VALUES
(N'KE', N'KES', N'Resident', N'SB100', N'Savings Account', N'An Ordinary Account is a standard personal banking account offering easy access to funds through cash and cheque deposits, mobile, and internet banking. It has no minimum balance or monthly charges.', NULL, N'["No minimum operating balance","No monthly charges","Full access to mobile banking and internet banking","Customer can choose a payment card that best suits their needs, including prepaid cards, debit cards, and credit cards","Cash and cheque deposits"]', N'["Original and copy National Identity Card/ Valid Passport/Valid Maisha Identification Card","KRA Pin Certificate"]', N'https://equitygroupholdings.com/ke/media/images/docs/tariff-guide.pdf', N'You can find all charges in our tariff guide.', NULL),
(N'KE', N'KES', N'NonResident', N'SB110', N'Savings Account', N'The Non-Resident Account is tailored for individuals living abroad to manage finances in Kenya conveniently. It offers full access to mobile and internet banking with no minimum balance or monthly charges.', NULL, N'["No minimum operating balance","No monthly charges","Full access to mobile banking and internet banking","Customer can choose a payment card that best suits their needs","Cash and cheque deposits","No maintenance fees","No ledger fees","Customers can access accounts from any of the countries Equity Bank operates in"]', N'["Individuals (singly or jointly) – Original Identification document & KRA PIN","Registered Groups – Registration Certificate, Constitution, minutes of resolution to open account certified by the DSDO","An introduction letter from the DSDO"]', N'https://equitygroupholdings.com/ke/media/images/docs/tariff-guide.pdf', N'You can find all charges in our tariff guide.', NULL),
(N'KE', N'KES', N'Resident', N'CA201', N'Current Account', N'The Equity Bank Personal Current Account (CA201) is a non-interest bearing account with no minimum balance or monthly charges, offering full mobile banking access and flexible payment card options.', NULL, N'["No minimum operating balance","Non-interest earning","No monthly charges","Full access to mobile banking","Customer can choose a payment card that best suits their needs: Prepaid cards, Debit cards, Credit cards","Cash and cheque deposits","Chequebook"]', N'["Original and copy National Identity Card/ Valid Passport/Valid Maisha Identification Card","KRA Pin Certificate"]', N'https://equitygroupholdings.com/ke/media/images/docs/tariff-guide.pdf', N'You can find all charges in our tariff guide.', N'This account does not earn interest.'),
(N'KE', N'KES', N'NonResident', N'CA210', N'Current Account', N'A convenient and flexible medium for a range of transactions. With this account you can make deposits, receive money, make payments, make withdrawals and set up standing orders.', NULL, N'["No minimum opening balance","No minimum operating balance","Non-interest earning","No monthly charges","No maintenance fees","No ledger fees","Full access to mobile banking","Customer can choose a payment card that best suits their needs","Cash and cheque deposits","Cheque book available when required","Customers can access the account from any of the countries Equity Bank operates in"]', N'["Individuals (singly or jointly) – Original Identification document & KRA PIN","Registered Groups – Registration Certificate, Constitution, minutes of resolution certified by the DSDO","An introduction letter from the DSDO"]', N'https://equitygroupholdings.com/ke/media/images/docs/tariff-guide.pdf', N'You can find all charges in our tariff guide.', NULL),
(N'KE', N'USD', N'Resident', N'SB100', N'Savings Account', N'An Ordinary Account is a standard personal banking account offering easy access to funds through cash and cheque deposits, mobile, and internet banking. It has no minimum balance or monthly charges.', NULL, N'["No minimum operating balance","No monthly charges","Full access to mobile banking and internet banking","Customer can choose a payment card that best suits their needs, including prepaid cards, debit cards, and credit cards","Cash and cheque deposits"]', N'["Original and copy National Identity Card/ Valid Passport/Valid Maisha Identification Card","KRA Pin Certificate"]', N'https://equitygroupholdings.com/ke/media/images/docs/tariff-guide.pdf', N'You can find all charges in our tariff guide.', NULL),
(N'KE', N'EUR', N'Resident', N'SB100', N'Savings Account', N'An Ordinary Account is a standard personal banking account offering easy access to funds through cash and cheque deposits, mobile, and internet banking. It has no minimum balance or monthly charges.', NULL, N'["No minimum operating balance","No monthly charges","Full access to mobile banking and internet banking","Customer can choose a payment card that best suits their needs, including prepaid cards, debit cards, and credit cards","Cash and cheque deposits"]', N'["Original and copy National Identity Card/ Valid Passport/Valid Maisha Identification Card","KRA Pin Certificate"]', N'https://equitygroupholdings.com/ke/media/images/docs/tariff-guide.pdf', N'You can find all charges in our tariff guide.', NULL),
(N'KE', N'GBP', N'Resident', N'SB100', N'Savings Account', N'An Ordinary Account is a standard personal banking account offering easy access to funds through cash and cheque deposits, mobile, and internet banking. It has no minimum balance or monthly charges.', NULL, N'["No minimum operating balance","No monthly charges","Full access to mobile banking and internet banking","Customer can choose a payment card that best suits their needs, including prepaid cards, debit cards, and credit cards","Cash and cheque deposits"]', N'["Original and copy National Identity Card/ Valid Passport/Valid Maisha Identification Card","KRA Pin Certificate"]', N'https://equitygroupholdings.com/ke/media/images/docs/tariff-guide.pdf', N'You can find all charges in our tariff guide.', NULL),
(N'KE', N'USD', N'Resident', N'CA201', N'Current Account', N'The Equity Bank Personal Current Account (CA201) is a non-interest bearing account with no minimum balance or monthly charges, offering full mobile banking access and flexible payment card options.', NULL, N'["No minimum operating balance","Non-interest earning","No monthly charges","Full access to mobile banking","Customer can choose a payment card that best suits their needs: Prepaid cards, Debit cards, Credit cards","Cash and cheque deposits","Chequebook"]', N'["Original and copy National Identity Card/ Valid Passport/Valid Maisha Identification Card","KRA Pin Certificate"]', N'https://equitygroupholdings.com/ke/media/images/docs/tariff-guide.pdf', N'You can find all charges in our tariff guide.', N'This account does not earn interest.'),
(N'KE', N'EUR', N'Resident', N'CA201', N'Current Account', N'The Equity Bank Personal Current Account (CA201) is a non-interest bearing account with no minimum balance or monthly charges, offering full mobile banking access and flexible payment card options.', NULL, N'["No minimum operating balance","Non-interest earning","No monthly charges","Full access to mobile banking","Customer can choose a payment card that best suits their needs: Prepaid cards, Debit cards, Credit cards","Cash and cheque deposits","Chequebook"]', N'["Original and copy National Identity Card/ Valid Passport/Valid Maisha Identification Card","KRA Pin Certificate"]', N'https://equitygroupholdings.com/ke/media/images/docs/tariff-guide.pdf', N'You can find all charges in our tariff guide.', N'This account does not earn interest.'),
(N'KE', N'GBP', N'Resident', N'CA201', N'Current Account', N'The Equity Bank Personal Current Account (CA201) is a non-interest bearing account with no minimum balance or monthly charges, offering full mobile banking access and flexible payment card options.', NULL, N'["No minimum operating balance","Non-interest earning","No monthly charges","Full access to mobile banking","Customer can choose a payment card that best suits their needs: Prepaid cards, Debit cards, Credit cards","Cash and cheque deposits","Chequebook"]', N'["Original and copy National Identity Card/ Valid Passport/Valid Maisha Identification Card","KRA Pin Certificate"]', N'https://equitygroupholdings.com/ke/media/images/docs/tariff-guide.pdf', N'You can find all charges in our tariff guide.', N'This account does not earn interest.'),
(N'KE', N'USD', N'NonResident', N'SB110', N'Savings Account', N'The Non-Resident Account is tailored for individuals living abroad to manage finances in Kenya conveniently.', NULL, N'["No minimum operating balance","No monthly charges","Full access to mobile banking and internet banking","No maintenance fees","No ledger fees","Customers can access accounts from any of the countries Equity Bank operates in"]', N'["Individuals (singly or jointly) – Original Identification document & KRA PIN","Registered Groups – Registration Certificate, Constitution, minutes of resolution certified by the DSDO"]', N'https://equitygroupholdings.com/ke/media/images/docs/tariff-guide.pdf', N'You can find all charges in our tariff guide.', NULL),
(N'KE', N'EUR', N'NonResident', N'SB110', N'Savings Account', N'The Non-Resident Account is tailored for individuals living abroad to manage finances in Kenya conveniently.', NULL, N'["No minimum operating balance","No monthly charges","Full access to mobile banking and internet banking","No maintenance fees","No ledger fees","Customers can access accounts from any of the countries Equity Bank operates in"]', N'["Individuals (singly or jointly) – Original Identification document & KRA PIN","Registered Groups – Registration Certificate, Constitution, minutes of resolution certified by the DSDO"]', N'https://equitygroupholdings.com/ke/media/images/docs/tariff-guide.pdf', N'You can find all charges in our tariff guide.', NULL),
(N'KE', N'GBP', N'NonResident', N'SB110', N'Savings Account', N'The Non-Resident Account is tailored for individuals living abroad to manage finances in Kenya conveniently.', NULL, N'["No minimum operating balance","No monthly charges","Full access to mobile banking and internet banking","No maintenance fees","No ledger fees","Customers can access accounts from any of the countries Equity Bank operates in"]', N'["Individuals (singly or jointly) – Original Identification document & KRA PIN","Registered Groups – Registration Certificate, Constitution, minutes of resolution certified by the DSDO"]', N'https://equitygroupholdings.com/ke/media/images/docs/tariff-guide.pdf', N'You can find all charges in our tariff guide.', NULL);
MERGE INTO Onboarding.AccountProduct WITH (HOLDLOCK) AS target
USING #AccountProductSeed AS source
ON target.CountryCode = source.CountryCode
AND target.Currency = source.Currency
AND target.ResidencyType = source.ResidencyType
AND target.SchemeCode = source.SchemeCode
WHEN MATCHED THEN
UPDATE SET
AccountType = source.AccountType,
Description = source.Description,
ImageUrl = source.ImageUrl,
Features = source.Features,
Requirements = source.Requirements,
TariffGuideUrl = source.TariffGuideUrl,
CostNote = source.CostNote,
SpecialNotes = source.SpecialNotes,
ModifiedBy = @CountryDataSeededBy,
ModifiedOn = GETUTCDATE()
WHEN NOT MATCHED BY TARGET THEN
INSERT (
Id, CountryCode, Currency, ResidencyType, SchemeCode, AccountType,
Description, ImageUrl, Features, Requirements, TariffGuideUrl,
CostNote, SpecialNotes, CreatedBy, CreatedOn, ModifiedBy, ModifiedOn
)
VALUES (
NEWID(), source.CountryCode, source.Currency, source.ResidencyType,
source.SchemeCode, source.AccountType, source.Description, source.ImageUrl,
source.Features, source.Requirements, source.TariffGuideUrl, source.CostNote,
source.SpecialNotes, @CountryDataSeededBy, GETUTCDATE(),
@CountryDataSeededBy, NULL
);
DROP TABLE #AccountProductSeed;
DECLARE @PrivacyPolicySeededBy NVARCHAR(256) = N'20261018145737_SeedKECountryData';
CREATE TABLE #PrivacyPolicySeed (
JourneyId NVARCHAR(96) NOT NULL,
CountryCode NVARCHAR(8) NOT NULL,
MediaType NVARCHAR(128) NOT NULL,
ContentType NVARCHAR(24) NOT NULL,
Content NVARCHAR(MAX) NOT NULL
);
INSERT INTO #PrivacyPolicySeed (JourneyId, CountryCode, MediaType, ContentType, Content)
VALUES
(N'retail_onboarding', N'KE', N'application/pdf', N'url', N'https://oneequity.blob.core.windows.net/tnc/digital-onboarding/ke/Digital%20Onboarding%20App%20-%20Abbreviated%20EBKL%20Privacy%20Notice%20v2026.02.05.pdf');
MERGE INTO Onboarding.PrivacyPolicy WITH (HOLDLOCK) AS target
USING #PrivacyPolicySeed AS source
ON target.JourneyId = source.JourneyId
AND target.CountryCode = source.CountryCode
WHEN MATCHED THEN
UPDATE SET
MediaType = source.MediaType,
ContentType = source.ContentType,
Content = source.Content,
ModifiedBy = @PrivacyPolicySeededBy,
ModifiedOn = GETUTCDATE()
WHEN NOT MATCHED BY TARGET THEN
INSERT (
Id, JourneyId, CountryCode, MediaType, ContentType, Content,
CreatedBy, CreatedOn, ModifiedBy, ModifiedOn
)
VALUES (
NEWID(), source.JourneyId, source.CountryCode, source.MediaType,
source.ContentType, source.Content, @PrivacyPolicySeededBy,
GETUTCDATE(), @PrivacyPolicySeededBy, NULL
);
DROP TABLE #PrivacyPolicySeed;
""");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
// Rows inserted by this migration are safe to remove. Rows that already
// existed were updated in place and need a forward corrective migration;
// their previous values are not available here to restore safely.
migrationBuilder.Sql("""
DELETE FROM Onboarding.PrivacyPolicy
WHERE CountryCode = N'KE'
AND CreatedBy = N'20261018145737_SeedKECountryData';
DELETE FROM Onboarding.AccountProduct
WHERE CountryCode = N'KE'
AND CreatedBy = N'20261018145737_SeedKECountryData';
""");
}
}
}
How the platform uses this file
Up() method runs the seed script. The studio does not generate or copy an EF designer model. - 1Add the generated file
Download the bundle and copy
repo/over the root of the DigitalOnboardingSvc checkout. Keep the generated migration path and timestamp unchanged. - 2Review before deployment
Confirm the country, currencies, scheme codes, document URLs and both
Up()andDown(). The migration deliberately does not delete database products omitted from the studio. - 3Let the backend apply it
In a deployed environment,
OmniDos.Web.Apiapplies pending migrations before serving requests. A migration failure stops startup, so the seed is never run against an outdated schema. - 4Verify the country lookups
After startup, verify account products, currencies and the privacy policy through the Onboarding lookup endpoints for
KE.
dotnet ef database update \
--project src/Modules/Onboarding/OmniDos.Onboarding.Infra/OmniDos.Onboarding.Infra.csproj \
--startup-project src/Api/OmniDos.Web.Api/OmniDos.Web.Api.csproj \
--context OnboardingDbContextsrc/Modules/Onboarding/OmniDos.Onboarding.Infra/Migrations/20261018145737_SeedKECountryData.cs