Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[4.x]: CLI index-assets fails due to not-null id constraint in assetindexdata #12617

Closed
membla opened this issue Feb 3, 2023 · 1 comment
Closed
Assignees

Comments

@membla
Copy link

membla commented Feb 3, 2023

What happened?

Description

Indexing assets using the index-assets CLI command fails while running the indexing from the CP on the same instance works like it should. I am able to reproduce this on several of our environments with different db/asset content. Assets are on Azure Blob Storage.

Steps to reproduce

  1. Run any type of index-assets command from the CLI

Expected behavior

Assets should be indexed.

Actual behavior

null value in column "id" of relation "assetindexdata" violates not-null constraint
2023-02-03 22:28:23.681 +07 [83053] DETAIL:  Failing row contains (null, 2, folder/file.mp4, 39076168, 2022-09-27 11:10:54, 8945, t, f, 2023-02-03 15:28:23, 2023-02-03 15:28:23, 532d6f56-87a9-4f1c-8d2e-f67cc53aed94, 2, f, null).
2023-02-03 22:28:23.681 +07 [83053] STATEMENT:  INSERT INTO "assetindexdata" ("id", "sessionId", "volumeId", "uri", "size", "timestamp", "isDir", "recordId", "isSkipped", "inProgress", "completed", "dateCreated", "dateUpdated", "uid") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14)

Craft CMS version

4.3.1

PHP version

8.1

Operating system and version

Ubuntu 22.04, etc.

Database type and version

PostgreSQL 11+

Image driver and version

No response

Installed plugins and versions

@brandonkelly
Copy link
Member

Thanks for reporting that! Just released Craft 4.3.7 with a fix.

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

No branches or pull requests

2 participants