[Database 1524] Fix contact-user.remote_self field type from boolean to integer

- Move MIRROR_* constants to LocalRelationship entity
- Convert boolean LocalRelationship->isRemoteSelf field to integer LocalRelationship->remoteSelf
This commit is contained in:
Hypolite Petovan 2023-07-26 07:27:55 +02:00
parent d0a2357fbd
commit 33b8680dfd
8 changed files with 41 additions and 17 deletions

View file

@ -23,6 +23,7 @@ namespace Friendica\Model;
use Friendica\Contact\Avatar;
use Friendica\Contact\Introduction\Exception\IntroductionNotFoundException;
use Friendica\Contact\LocalRelationship\Entity\LocalRelationship;
use Friendica\Content\Conversation as ConversationContent;
use Friendica\Content\Pager;
use Friendica\Content\Text\HTML;
@ -111,10 +112,14 @@ class Contact
* @}
*/
const MIRROR_DEACTIVATED = 0;
const MIRROR_FORWARDED = 1; // Deprecated, now does the same like MIRROR_OWN_POST
const MIRROR_OWN_POST = 2;
const MIRROR_NATIVE_RESHARE = 3;
/** @deprecated Use Entity\LocalRelationship::MIRROR_DEACTIVATED instead */
const MIRROR_DEACTIVATED = LocalRelationship::MIRROR_DEACTIVATED;
/** @deprecated Now does the same as MIRROR_OWN_POST */
const MIRROR_FORWARDED = 1;
/** @deprecated Use Entity\LocalRelationship::MIRROR_OWN_POST instead */
const MIRROR_OWN_POST = LocalRelationship::MIRROR_OWN_POST;
/** @deprecated Use Entity\LocalRelationship::MIRROR_NATIVE_RESHARE instead */
const MIRROR_NATIVE_RESHARE = LocalRelationship::MIRROR_NATIVE_RESHARE;
/**
* @param array $fields Array of selected fields, empty for all