Commit Graph

22 Commits

Author SHA1 Message Date
Jan Lysý
41a55262fe Fix PHPStan warnings in tests
[MAILPOET-5751]
2023-12-13 11:48:14 +01:00
Rodrigo Primo
1865fc8930 Replace expect()->isInstanceOf() with verify()->instanceOf()
codeception/verify 2.1 removed support for expect()->isInstanceOf() so we need
to replace it with verify()->instanceOf().

[MAILPOET-5664]
2023-10-24 08:58:22 +03:00
Rostislav Wolny
74a5dde19f Make migration runner aware of the level of running migration
[MAILPOET-5416]
2023-07-26 14:01:39 +02:00
Rostislav Wolny
94d8d28253 Refactor Migrations Repository to return also migrations level
[MAILPOET-5416]
2023-07-26 14:01:39 +02:00
Rostislav Wolny
466782790a Remove access to higher level services in Db level migrations
[MAILPOET-5416]
2023-07-26 14:01:39 +02:00
Rostislav Wolny
5fd02b2bab Add support for App and Db migrations into Repository and Runner
[MAILPOET-5416]
2023-07-26 14:01:39 +02:00
Rostislav Wolny
5c4dcb77c5 Move all current migrations to Dd folder
[MAILPOET-5416]
2023-07-26 14:01:39 +02:00
Rostislav Wolny
092fcb78d0 Rename Migration to DbMigration
We want to distinguish Db and App level migrations. This is the first step.
[MAILPOET-5416]
2023-07-26 14:01:39 +02:00
Jan Jakes
89df50c160 Always skip unknown migrations (not only completed ones)
[MAILPOET-5054]
2023-02-13 16:56:01 +01:00
Jan Jakes
e9326e8c9e Handle a case when migrations table contains invalid data
See: https://wordpress.org/support/topic/null-values-are-exported-as-empty-strings/

[MAILPOET-5054]
2023-02-13 16:56:01 +01:00
Jan Jakes
82aeb89854 Use strict types in tests
[MAILPOET-2688]
2022-11-29 15:04:09 +01:00
David Remer
2cdbc68643 Fix Squiz.Classes.ValidClassName.NotCamelCaps
[MAILPOET-4850]
2022-11-28 22:54:13 +03:00
Jan Jakes
70aefb421b Clear error when rerunning migration
[MAILPOET-4811]
2022-11-14 20:12:35 +03:00
Jan Jakes
bd34c4e7ec Ignore index.php in migrations directory
[MAILPOET-4466]
2022-11-07 10:05:42 +01:00
Jan Jakes
511b8ad7ff Retry timed out and failed migrations
[MAILPOET-4466]
2022-11-07 10:05:42 +01:00
Jan Jakes
a177b3b8da Add the possibility to use a logger in migrator
[MAILPOET-4466]
2022-11-07 10:05:42 +01:00
Jan Jakes
036d0a29ae Implement full migration running logic
[MAILPOET-4466]
2022-11-07 10:05:42 +01:00
Jan Jakes
d199e0b77e Add migrator service with ability to resolve status of all migrations
[MAILPOET-4466]
2022-11-07 10:05:42 +01:00
Jan Jakes
17ab79aa6f Add store method to list all migrations
[MAILPOET-4466]
2022-11-07 10:05:42 +01:00
Jan Jakes
b10cd32449 Add runner to execute a migration and save its status
[MAILPOET-4466]
2022-11-07 10:05:42 +01:00
Jan Jakes
f9001c1826 Add store methods to start, complete, and fail a migration
[MAILPOET-4466]
2022-11-07 10:05:42 +01:00
Jan Jakes
31050394b9 Add a store with a method to create migrations table when it doesn't exist
[MAILPOET-4466]
2022-11-07 10:05:42 +01:00