Open RLashofRegas opened 5 years ago
Note: Just noticed that this is caused by the following line in my IEntityTypeConfiguration
builder.Property(l => l.Id) .ForSqlServerUseSequenceHiLo("listing_hilo") .IsRequired();
This code was added in PR https://github.com/PomeloFoundation/Pomelo.EntityFrameworkCore.MySql/pull/568 where code was copied from upstream and not tailored for MySQL/MariaDB. Seeing method ForSqlServerUseSequenceHiLo
seems to indicate as much.
It would need someone to adjust this code to make it work with MariaDB and get the corresponding tests working. Also see issue https://github.com/PomeloFoundation/Pomelo.EntityFrameworkCore.MySql/issues/477 for discussion on HiLo key generation.
Running EnsureCreated in EFCore against MariaDB get the following error:
According to the MariaDB documentation for CREATE SEQUENCE, the correct syntax for the cycle option is "NOCYCLE" rather than "NO CYCLE".
This differs from the syntax for ALTER SEQUENCE where "NO CYCLE" seems to be the correct syntax.
https://github.com/PomeloFoundation/Pomelo.EntityFrameworkCore.MySql/blob/da58f640f6aa7488644c2d292d41e02e0114386f/src/EFCore.MySql/Migrations/MySqlMigrationsSqlGenerator.cs#L700