refactor: change note to status
This MR is meant to clear things up:
- Having status updates (ActivityPub Note objects) referred to as "Notes" may confuse podcasters as the terminology is close to "Show Notes".
- Naming a "status" (or status update) as "note" behind the scenes (in the code) goes against the established convention from any other social media platform.
- In the user interface, statuses are referred to as "posts".
closes #129 (closed), fixes #135 (closed)
Database updates
SET AUTOCOMMIT = 0;
START TRANSACTION;
/* rename tables */
RENAME TABLE `cp_activitypub_notes` TO `cp_activitypub_statuses`;
RENAME TABLE `cp_activitypub_notes_preview_cards` TO `cp_activitypub_statuses_preview_cards`;
/* rename foreign key indices */
ALTER TABLE `cp_activitypub_statuses` RENAME INDEX `cp_activitypub_notes_episode_id_foreign` TO `cp_activitypub_statuses_episode_id_foreign`;
ALTER TABLE `cp_activitypub_statuses` RENAME INDEX `cp_activitypub_notes_created_by_foreign` TO `cp_activitypub_statuses_created_by_foreign`;
ALTER TABLE `cp_activitypub_statuses` RENAME INDEX `cp_activitypub_notes_in_reply_to_id_foreign` TO `cp_activitypub_statuses_in_reply_to_id_foreign`;
ALTER TABLE `cp_activitypub_statuses` RENAME INDEX `cp_activitypub_notes_reblog_of_id_foreign` TO `cp_activitypub_statuses_reblog_of_id_foreign`;
ALTER TABLE `cp_activitypub_activities` RENAME INDEX `cp_activitypub_activities_note_id_foreign` TO `cp_activitypub_activities_status_id_foreign`;
ALTER TABLE `cp_activitypub_favourites` RENAME INDEX `cp_activitypub_favourites_note_id_foreign` TO `cp_activitypub_favourites_status_id_foreign`;
ALTER TABLE `cp_activitypub_statuses_preview_cards` RENAME INDEX `cp_activitypub_statuses_preview_cards_note_id_foreign` TO `cp_activitypub_statuses_preview_cards_status_id_foreign`;
/* rename columns */
ALTER TABLE `cp_episodes` CHANGE `notes_total` `statuses_total` INT(10) UNSIGNED NOT NULL DEFAULT 0;
ALTER TABLE `cp_activitypub_actors` CHANGE `notes_count` `statuses_count` INT(10) UNSIGNED NOT NULL DEFAULT 0;
ALTER TABLE `cp_activitypub_actors` CHANGE `notes_count` `statuses_count` INT(10) UNSIGNED NOT NULL DEFAULT 0;
ALTER TABLE `cp_activitypub_activities` CHANGE `note_id` `status_id` BINARY(16) NULL DEFAULT NULL;
ALTER TABLE `cp_activitypub_activities` CHANGE `status` `task_status` ENUM('queued','delivered') NULL DEFAULT NULL;
ALTER TABLE `cp_activitypub_favourites` CHANGE `note_id` `status_id` BINARY(16) NOT NULL;
ALTER TABLE `cp_activitypub_statuses_preview_cards` CHANGE `note_id` `status_id` BINARY(16) NOT NULL;
/* update permissions descriptions */
UPDATE `cp_auth_permissions` SET `description` = 'Publish / unpublish episodes & statuses of a podcast' WHERE `cp_auth_permissions`.`name` = 'podcast-manage_publications';
UPDATE `cp_auth_permissions` SET `description` = 'Interact as the podcast to favourite / share or reply to statuses.' WHERE `cp_auth_permissions`.`name` = 'podcast-interact_as';
COMMIT;
Edited by Yassine Doghri