Commit Graph

87 Commits

Author SHA1 Message Date
Jan Jakes
dceb1b411d Temporarily disable some more queries in playground
[MAILPOET-6185]
2024-09-02 12:50:50 +02:00
Jan Lysý
952bc28fda Use placeholders and comments in Migrations
[MAILPOET-6150]
2024-08-29 17:23:34 +02:00
Jan Jakes
912cd7965a Temporarily replace DROP DEFAULT with a CHANGE COLUMN for WP Playground
[MAILPOET-6185]
2024-08-22 13:28:09 +02:00
Jan Jakes
f584a673cb Temporarily skip queries incompatible with SQLite
[MAILPOET-6185]
2024-08-22 13:28:09 +02:00
Jan Jakes
279364cf86 Avoid using information_schema for WP Playground 2024-08-22 13:28:09 +02:00
Jan Jakes
ff6a98fae1 Replace deprecated array types with Doctrine's ArrayParameterType
[MAILPOET-6142]
2024-08-19 15:29:42 +02:00
 Ján Mikláš
6a155ec454 Update migration to only check for presence of the setting, without version check
[MAILPOET-5807]
2024-08-07 15:43:42 +02:00
 Ján Mikláš
13e45a960f Add migration so existing active installations remain opt-in checkbox position
[MAILPOET-5807]
2024-08-07 15:43:42 +02:00
 Ján Mikláš
7f1320258c Add migration to fix failed automation runs that should have been complete
[MAILPOET-6154]
2024-07-29 15:03:47 +02:00
 Ján Mikláš
1918d30fcd Add migration for a new cancelled_at column for scheduled tasks
[MAILPOET-5755]
2024-07-04 08:04:34 +02:00
Jan Lysý
25a35e17bf Add migration to fix existing data
[MAILPOET-5584]
2024-05-06 11:43:32 +02:00
Mike Jolley
435f638011 Apply rules on lib dir 2024-03-21 16:57:59 +01:00
Jan Lysý
f8d99b34bf Check table exists before altering it
[MAILPOET-5896]
2024-02-12 11:50:48 +01:00
Jan Jakes
db2e61e987 Use "MAX(subscriber_id)" when fething "updated_at" to leverage DB indexes
[MAILPOET-5887]
2024-02-12 08:52:30 +02:00
Jan Jakes
9db41a5210 Use scheduled task subsriber date for backfilling "sentAt" values
[MAILPOET-5887]
2024-02-12 08:52:30 +02:00
Jan Jakes
7814dda708 Backfill newsletter stats with processed subscribers even with failed status
[MAILPOET-5887]
2024-02-12 08:52:30 +02:00
Jan Jakes
0d71d96cfa Backfill missing sentAt from https://github.com/mailpoet/mailpoet/pull/5416
[MAILPOET-5887]
2024-02-12 08:52:30 +02:00
Jan Jakes
a5d44ba9b6 Backfill missing newsletter statistics from https://github.com/mailpoet/mailpoet/pull/5416
[MAILPOET-5887]
2024-02-12 08:52:30 +02:00
Jan Jakes
78732f8a5d Update also sending queue counts when marking stuck newsletters as sent
[MAILPOET-5887]
2024-02-12 08:52:30 +02:00
Jan Jakes
2804125827 Update also "sent_at" when marking stuck newsletters as sent
[MAILPOET-5887]
2024-02-12 08:52:30 +02:00
Jan Jakes
74f95b972f Split migration code into private methods
[MAILPOET-5887]
2024-02-12 08:52:30 +02:00
Jan Jakes
e3214e441b Add migration to fix sending tasks stuck in "invalid" state
[MAILPOET-5887]
2024-02-12 08:52:30 +02:00
Rostislav Wolny
de9c03a3bc Add migration for fixing status for newsletters stuck as sending
[MAILPOET-5886]
2024-02-05 15:24:26 +01:00
Jan Jakes
2b5135474e Save deleted newsletter in woocommerce purchase stats as NULL
[MAILPOET-5845]
2024-02-02 12:48:40 +01:00
Jan Lysý
525c80bac4 Fix PHPStan warnings in lib
[MAILPOET-5751]
2023-12-13 11:48:14 +01:00
Jan Lysý
553fcfa1b4 Extend migration fixing sending queue to welcome emails
[MAILPOET-5719]
2023-12-04 16:04:11 +01:00
Jan Lysý
dc3f9d25f3 Add migration for fixing queues
Some completed tasks for automatic emails can contain invalid counts in related queues.
We need to fix it for displaying the correct counts.
[MAILPOET-5719]
2023-12-04 16:04:11 +01:00
David Remer
d2d465165d Remove double log entries before adding unique index
[MAILPOET-5630]
2023-10-09 13:20:20 +02:00
Jan Jakes
7fac20fc8c Make default error value NULL, make data non-nullable
[MAILPOET-5599]
2023-09-25 06:10:52 -07:00
Jan Jakes
c5f50b2a47 Fix "Field 'run_number' doesn't have a default value"
[MAILPOET-5599]
2023-09-25 06:10:52 -07:00
Brezo Cordero
6388a7307f Check table exists before altering it
[MAILPOET-5590]
2023-09-25 05:48:48 -07:00
Jan Jakes
d7addd8e55 Add migration to fix and add more automation log data
[MAILPOET-5568]
2023-09-20 02:36:40 -07:00
Jan Jakes
d730083d22 Fix unintended "ON UPDATE current_timestamp()" on some timestamp columns
[MAILPOET-5568]
2023-09-20 02:36:40 -07:00
David Remer
71453f0c14 Switch double quotes with single quotes
[MAILPOET-5485]
2023-09-11 12:14:33 +02:00
David Remer
9991ba546a Separate migration app and db logic
[MAILPOET-5485]
2023-09-11 12:14:33 +02:00
David Remer
bba7786e7e Store current order status in revenue statistics
[MAILPOET-5485]
2023-09-11 12:14:33 +02:00
Rostislav Wolny
e6e20e3159 Save association to WP post with newsletter
This commit adds a simple implementation of ensuring the mailpoet_email post type
has associated NewsletterEntity.
In the future we will need to add support also for saving additional data for
newsletters (subject, sending settings).
[MAILPOET-5365]
2023-08-24 15:44:34 +02:00
Rostislav Wolny
7d99556683 Add DB migration and wpPostId to NewsletterEntity
The email body will be stored as a wp_post, but for mailpoet specific attributes
we will use the current DB structure so that we can easy integrate emails edited in the new editor.
[MAILPOET-5365]
2023-08-24 15:44:34 +02:00
John Oleksowicz
7a6cc36718 Include timeframe in migration to avoid BC code
MAILPOET-5496
2023-08-17 13:49:08 +02:00
John Oleksowicz
0e9bf64986 Migrate existing shipping/payment method filter data
Now that these filters are using the shared DaysPeriodField, they store
the day count in a field named days instead of used_payment_method_days
or used_shipping_method_days.

This migration is based on Migration_20230712_180341, where we needed to
 do the same thing for other filters.

MAILPOET-5496
2023-08-17 13:49:08 +02:00
Rostislav Wolny
7954f9d74f Move newly added migrations (after rebase) to correct folders
[MAILPOET-5416]
2023-07-26 14:01:39 +02:00
Rostislav Wolny
35b7e9177c Eliminate settings controller from the initial migration
[MAILPOET-5416]
2023-07-26 14:01:39 +02:00
Rostislav Wolny
f0a8f3bfd3 Eliminate direct access to EntityManager in Db migrations
As we don't want to allow working directly with EntityManager in
the Db level migrations this commit replaces direct access with helper
methods from the parent class.

We don't want to allow working with EntityManager since it is considered
high level service and causes errors when DB structure is not up to date.
[MAILPOET-5416]
2023-07-26 14:01:39 +02:00
Rostislav Wolny
435152281a Extract App level method from initial Db migration to a new App level migration
All these extracted methods contain DB version check so for existing
sites the migration will be just added as completed to the migrations table.
[MAILPOET-5416]
2023-07-26 14:01:39 +02:00
Rostislav Wolny
7f363a96f5 Refactor Migration_20230111_120000 to work without SettingsController
[MAILPOET-5416]
2023-07-26 14:01:39 +02:00
Rostislav Wolny
9684285105 Move clearly App level migrations to App directory
[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
Rodrigo Primo
1198c52808 Add migration to change the update name of parameters of a few filters
In a previous commit, the name of the parameter of a few filters was
changed to `days`. This commit adds a migration to change the name of
parameter of existing filters when needed. The following parameters
should be renamed to days:

- number_of_orders_days
- total_spent_days
- single_order_value_days
- average_spent_days

I opted to leave the original parameter instead of deleting it, just to
be safe in case a given site needs to rollback to a previous version.
Once a change is made to a filter by the user, the old parameter will be
deleted.

[MAILPOET-4991]
2023-07-19 15:24:46 +02:00
David Remer
e194a4d04b Add indicies to automation_runs and automation_run_logs table
[MAILPOET-5091]
2023-07-18 13:03:16 +02:00