Skip to content

/cleanup and Integrity constraint violation #917

@Elglobo

Description

@Elglobo
  • Operating system: Linux debian Jessie
  • PHP version: 7.2
  • PHP Telegram Bot version: 0.551
  • Using MySQL database: yes
  • MySQL version: 10.0.37-MariaDB-0+deb8u1
  • Update Method: Webhook
  • Self-signed certificate: yes

Expected behaviour

Clean old record database

Actual behaviour

Error on execution:
Warning: PDO::query(): SQLSTATE[23000]: Integrity constraint violation: 1451 Cannot delete or update a parent row: a foreign key constraint fails (database.message, CONSTRAINT message_ibfk_5 FOREIGN KEY (reply_to_chat, reply_to_message) REFERENCES message (chat_id, id))

Steps to reproduce

Initialize database and after a while error on /cleanup command.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions