New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding an index for the address_log_entries
#16096
base: 2.0
Are you sure you want to change the base?
Conversation
5a56767
to
581201f
Compare
581201f
to
62b2f02
Compare
Bunnyshell Preview Environment deployedIt will be automatically stopped in 4 hours. Use the command
Available commands:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall, this PR is ok, but it should be targeted for the 2.0 branch.
use Doctrine\DBAL\Schema\Schema; | ||
use Doctrine\Migrations\AbstractMigration; | ||
|
||
final class Version20240405121345 extends AbstractMigration |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Starting from Sylius 1.13, we need to create two migration versions, one for MySQL and one for PostgreSQL. Here's an example for PostgreSQL:
final class Version20240318083808 extends AbstractPostgreSQLMigration |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a way to generate it with doctrine?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seeing that the syntax for creating an index on prostgres is the same. I just extended the postgres migration.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Rafikooo I've changed the base of the PR to 2.0 and use an AbstractPostgreSQLMigration
.
What's inside
Adding indicies to the
address_order_log_entry
.Why?
I don't know how exactly gedomo's loggable trait works but appereantly it querries the current version for an object like this:
Which is very expensive if you have a lot of entries.