win7user10 / Laraue.EfCoreTriggers

Library to write triggers in C# with EF.Core
MIT License
112 stars 20 forks source link

Generated trigger names can be too long for MariaDB #89

Open JustusGreiberORGADATA opened 1 year ago

JustusGreiberORGADATA commented 1 year ago

Hi,

just hit the following exception:

MySqlConnector.MySqlException (0x80004005): Identifier name 'LC_TRIGGER_BEFORE_UPDATE_ORGANIZATIONDELETEREQUESTSTATUSTYPEENTITY' is too long

the library should probably respect the max identifier length set by database providers via convention:

https://github.com/PomeloFoundation/Pomelo.EntityFrameworkCore.MySql/blob/25ba058c35f6c7f77414df594399a100bac64716/src/EFCore.MySql/Metadata/Conventions/MySqlConventionSetBuilder.cs#L38

like EFCore does here:

https://github.com/dotnet/efcore/blob/2a77dbd6d4bf67378ee9d1a27f0ec68a704ca10c/src/EFCore.Relational/Extensions/RelationalTriggerExtensions.cs#L72