Open Fofonew opened 6 months ago
Hi @Fofonew, did you add the following config:
# config/packages/zenstruck_messenger_monitor.yaml
zenstruck_messenger_monitor:
storage:
orm:
entity_class: App\Entity\ProcessedMessage
(and clear cache after?)
Yeah sure i did it, and it change nothing
Hmm, I can't create the issue locally, I see:
$this->addSql('CREATE SEQUENCE processed_messages_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
$this->addSql('CREATE TABLE processed_messages (id INT NOT NULL, run_id INT NOT NULL, attempt SMALLINT NOT NULL, message_type VARCHAR(255) NOT NULL, description VARCHAR(255) DEFAULT NULL, dispatched_at TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, received_at TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, finished_at TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, memory_usage INT NOT NULL, transport VARCHAR(255) NOT NULL, tags VARCHAR(255) DEFAULT NULL, failure_type VARCHAR(255) DEFAULT NULL, failure_message TEXT DEFAULT NULL, results JSON NOT NULL, PRIMARY KEY(id))');
$this->addSql('COMMENT ON COLUMN processed_messages.dispatched_at IS \'(DC2Type:datetime_immutable)\'');
$this->addSql('COMMENT ON COLUMN processed_messages.received_at IS \'(DC2Type:datetime_immutable)\'');
$this->addSql('COMMENT ON COLUMN processed_messages.finished_at IS \'(DC2Type:datetime_immutable)\'');
Could you create a simple reproducer?
Did you rollback the incorrect migration and deleted the migration file? I think that @kbond is right, and is releated to caching. (i did had the same problem in the past).
Otherwise version of doctrine/orm version and database could be a useful info.
When i do the command
bin/console doctrine:mapping:info
i seeThis is my entity file
but when i generate migration i got :