From 83bc84dd97cf7ed6e415cf46d86687348c360139 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Sat, 13 May 2023 07:04:11 -0600 Subject: [PATCH] Add migration --- ...ve_status_entities_from_statuses_table.php | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 database/migrations/2023_05_13_123119_remove_status_entities_from_statuses_table.php diff --git a/database/migrations/2023_05_13_123119_remove_status_entities_from_statuses_table.php b/database/migrations/2023_05_13_123119_remove_status_entities_from_statuses_table.php new file mode 100644 index 000000000..9a7fb4734 --- /dev/null +++ b/database/migrations/2023_05_13_123119_remove_status_entities_from_statuses_table.php @@ -0,0 +1,34 @@ +lazyById(200, 'id') as $status) { + if(!in_array($status->scope, ['public', 'unlisted', 'private'])) { + continue; + } + if(str_starts_with($status->entities, '{"urls')) { + $status->entities = null; + $status->save(); + } else { + continue; + } + } + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + } +};