Skip to content

汎用DBで、コンテンツを削除した際にtopicsのレコード削除が行われないため、新着や検索等にヒットしてしまう。 #1734

Description

@s-nakajima

本件、マイグレーションは作成しないので、下記のSQLを実行して、既に削除されているデータをtopicsから削除してください。

①topic_readablesの削除

DELETE FROM (テーブルPrefix)_topic_readables
WHERE
  topic_id IN (
    SELECT
      id
    FROM
      (テーブルPrefix)_topics
    WHERE
      plugin_key = 'multidatabases' AND content_key NOT IN (
        SELECT
          contents.key
        FROM
          (テーブルPrefix)_multidatabase_contents contents
      )
  );

②topicsの削除

DELETE FROM (テーブルPrefix)_topics
WHERE
  plugin_key = 'multidatabases' AND content_key NOT IN (
    SELECT
      contents.key
    FROM
      (テーブルPrefix)_multidatabase_contents contents
  );

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions