Skip to content

Conversation

@Baspa
Copy link
Contributor

@Baspa Baspa commented Jan 19, 2026

Note

Adds a numeric identifier to content and exposes it optionally in the UI.

  • Database: new migration adds content.id (backfilled in creation order), enforces uniqueness, and configures auto-increment per driver (MySQL/Postgres/SQL Server; SQLite no-op)
  • Config: new backstage.cms.show_id_in_content_overview flag (default false) to control visibility and search/sort of id in content overview
  • UI: ContentResource table gains conditional TextColumn('id') that is visible/searchable/sortable when the flag is enabled
  • Build: composer adds backstage/users to require

Written by Cursor Bugbot for commit b0b2b08. This will update automatically on new commits. Configure here.

@Baspa Baspa added the feature New feature or request label Jan 19, 2026
cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

'sqlite' => null, // SQLite doesn't support adding autoincrement to existing columns
'sqlsrv' => DB::statement('ALTER TABLE content ALTER COLUMN id BIGINT NOT NULL'),
default => null,
};
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Migration breaks inserts for SQLite and SQL Server

High Severity

The migration adds a NOT NULL id column but only configures auto-increment for MySQL and PostgreSQL. For SQLite (returns null, with a comment acknowledging the limitation) and SQL Server (only sets NOT NULL without IDENTITY), no auto-increment mechanism is established. Since the Content model uses ulid as primary key and doesn't set id explicitly, any attempt to create new content on SQLite or SQL Server will fail with a NOT NULL constraint violation.

Fix in Cursor Fix in Web

@Baspa Baspa self-assigned this Jan 21, 2026
@markvaneijk
Copy link
Contributor

@Baspa omdat ik van voornemens ben om de ulid columns te hernoemen naar id (vanwege Laravel standaard) zou ik voor dit ID een andere naam gebruiken. Bijvoorbeeld: ordered_id.

@Baspa
Copy link
Contributor Author

Baspa commented Jan 21, 2026

@markvaneijk Goeie! Moet sowieso nog een aantal dingen checken, maar zal die aanstaande vrijdag even hernoemen.

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

Labels

feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants