mirror of
https://github.com/friendica/friendica
synced 2024-11-18 15:03:41 +00:00
Merge pull request #13274 from annando/report-gsid
Fix "Cannot add or update a child row: a foreign key constraint fails"
This commit is contained in:
commit
451ba407d7
3 changed files with 3 additions and 3 deletions
|
@ -1695,7 +1695,7 @@ CREATE TABLE IF NOT EXISTS `report` (
|
||||||
`uid` mediumint unsigned COMMENT 'Reporting user',
|
`uid` mediumint unsigned COMMENT 'Reporting user',
|
||||||
`reporter-id` int unsigned COMMENT 'Reporting contact',
|
`reporter-id` int unsigned COMMENT 'Reporting contact',
|
||||||
`cid` int unsigned NOT NULL COMMENT 'Reported contact',
|
`cid` int unsigned NOT NULL COMMENT 'Reported contact',
|
||||||
`gsid` int unsigned NOT NULL COMMENT 'Reported contact server',
|
`gsid` int unsigned COMMENT 'Reported contact server',
|
||||||
`comment` text COMMENT 'Report',
|
`comment` text COMMENT 'Report',
|
||||||
`category-id` int unsigned NOT NULL DEFAULT 1 COMMENT 'Report category, one of Entity\Report::CATEGORY_*',
|
`category-id` int unsigned NOT NULL DEFAULT 1 COMMENT 'Report category, one of Entity\Report::CATEGORY_*',
|
||||||
`forward` boolean COMMENT 'Forward the report to the remote server',
|
`forward` boolean COMMENT 'Forward the report to the remote server',
|
||||||
|
|
|
@ -12,7 +12,7 @@ Fields
|
||||||
| uid | Reporting user | mediumint unsigned | YES | | NULL | |
|
| uid | Reporting user | mediumint unsigned | YES | | NULL | |
|
||||||
| reporter-id | Reporting contact | int unsigned | YES | | NULL | |
|
| reporter-id | Reporting contact | int unsigned | YES | | NULL | |
|
||||||
| cid | Reported contact | int unsigned | NO | | NULL | |
|
| cid | Reported contact | int unsigned | NO | | NULL | |
|
||||||
| gsid | Reported contact server | int unsigned | NO | | NULL | |
|
| gsid | Reported contact server | int unsigned | YES | | NULL | |
|
||||||
| comment | Report | text | YES | | NULL | |
|
| comment | Report | text | YES | | NULL | |
|
||||||
| category-id | Report category, one of Entity\Report::CATEGORY_* | int unsigned | NO | | 1 | |
|
| category-id | Report category, one of Entity\Report::CATEGORY_* | int unsigned | NO | | 1 | |
|
||||||
| forward | Forward the report to the remote server | boolean | YES | | NULL | |
|
| forward | Forward the report to the remote server | boolean | YES | | NULL | |
|
||||||
|
|
|
@ -1691,7 +1691,7 @@ return [
|
||||||
"uid" => ["type" => "mediumint unsigned", "foreign" => ["user" => "uid"], "comment" => "Reporting user"],
|
"uid" => ["type" => "mediumint unsigned", "foreign" => ["user" => "uid"], "comment" => "Reporting user"],
|
||||||
"reporter-id" => ["type" => "int unsigned", "foreign" => ["contact" => "id"], "comment" => "Reporting contact"],
|
"reporter-id" => ["type" => "int unsigned", "foreign" => ["contact" => "id"], "comment" => "Reporting contact"],
|
||||||
"cid" => ["type" => "int unsigned", "not null" => "1", "foreign" => ["contact" => "id"], "comment" => "Reported contact"],
|
"cid" => ["type" => "int unsigned", "not null" => "1", "foreign" => ["contact" => "id"], "comment" => "Reported contact"],
|
||||||
"gsid" => ["type" => "int unsigned", "not null" => "1", "foreign" => ["gserver" => "id"], "comment" => "Reported contact server"],
|
"gsid" => ["type" => "int unsigned", "foreign" => ["gserver" => "id"], "comment" => "Reported contact server"],
|
||||||
"comment" => ["type" => "text", "comment" => "Report"],
|
"comment" => ["type" => "text", "comment" => "Report"],
|
||||||
"category-id" => ["type" => "int unsigned", "not null" => 1, "default" => \Friendica\Moderation\Entity\Report::CATEGORY_OTHER, "comment" => "Report category, one of Entity\Report::CATEGORY_*"],
|
"category-id" => ["type" => "int unsigned", "not null" => 1, "default" => \Friendica\Moderation\Entity\Report::CATEGORY_OTHER, "comment" => "Report category, one of Entity\Report::CATEGORY_*"],
|
||||||
"forward" => ["type" => "boolean", "comment" => "Forward the report to the remote server"],
|
"forward" => ["type" => "boolean", "comment" => "Forward the report to the remote server"],
|
||||||
|
|
Loading…
Reference in a new issue