I hope this message finds you well.
We are currently using your ABP Commercial framework for our project, and we are facing a challenge related to database migrations. Specifically, we need to utilize the ALGORITHM=INSTANT
option in MySQL for certain ALTER TABLE
operations to avoid database locks and ensure zero-downtime deployments. However, we have noticed that the current migration framework does not support this option.
We would like to inquire if there is any possibility to extend or customize the migration framework to accommodate the use of ALGORITHM=INSTANT
. If there is an existing way to achieve this, we would greatly appreciate any guidance or documentation you could provide.
Thank you in advance for your assistance. We look forward to your advice on how best to proceed.
Best regards,
- ABP Framework version: v8.2
- UI Type: Angular
- Database System: EF Core (MySQL.)
15 Answer(s)
-
0
hi
We are using the standard EF Core to migrate the database.
Can you use
ALGORITHM=INSTANT
correctly without abp? -
0
- Yes, I know that you are using EF Core.
- ALGORITHM=INSTANT can also be used in MySQL 8.0.
Is there a way to use ALGORITHM=INSTANT using EF Core?
-
0
hi
Is there a way to use ALGORITHM=INSTANT using EF Core?
I have no idea about this.
How do you use
ALGORITHM=INSTANT
without EF Core? -
0
Thank you for reaching out.
It is possible to use ALGORITHM=INSTANT without ABP Commercial. However, when using EF Core for migrations, applying specific options like ALGORITHM=INSTANT to an ALTER TABLE command might require manually running the SQL or customizing the migration scripts to include this option.
If EF Core migrations do not support this option by default, we might need to consider executing custom scripts before or after the migration to ensure the database lock is minimized.
Our goal is to achieve zero-downtime releases by minimizing database locks. We would appreciate any further guidance or suggestions you could provide on this matter.
Best regards,
-
0
hi
You can add your custom SQL statement during migration
see https://learn.microsoft.com/en-us/ef/core/managing-schemas/migrations/operations
-
0
Thank you for the suggestion. I understand that using migrationBuilder.Sql allows us to add custom SQL during migration. However, I'm looking for a way to achieve this directly through EF Core's built-in migration functionality without having to manually insert SQL statements.
Our goal is to keep our migration process as consistent and maintainable as possible within the framework provided by EF Core. If there is an alternative approach or any upcoming features that might support this requirement natively, I would appreciate any guidance or suggestions you could offer.
-
0
hi
I have no experience in this case, sorry. : ( It related to EF Core instead of ABP Framework
-
0
Ok, where should I contact for help?
-
0
hi
We can only solve problems related to abp. We have no relevant experience in your case.
Sorry for that.
You can try to google it or ask for a solution in EF Core https://github.com/dotnet/efcore/issues/new/choose
-
0
I understand. First of all, does ABP Commercial have a system to support non-startup releases?
-
0
hi
What do you mean
non-startup releases
?Can you explain it in detail?
Thanks
-
0
sorry zero-downtime deployments
-
0
This belongs to devops scope, abp is just a net core web application.
-
0
ok,thx
-
0
: )