-
-
Notifications
You must be signed in to change notification settings - Fork 1
feat: show id in content #42
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
base: 2.x
Are you sure you want to change the base?
Conversation
… into feat/show-id-in-content
There was a problem hiding this 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, | ||
| }; |
There was a problem hiding this comment.
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.
|
@Baspa omdat ik van voornemens ben om de |
|
@markvaneijk Goeie! Moet sowieso nog een aantal dingen checken, maar zal die aanstaande vrijdag even hernoemen. |
Note
Adds a numeric identifier to content and exposes it optionally in the UI.
content.id(backfilled in creation order), enforces uniqueness, and configures auto-increment per driver (MySQL/Postgres/SQL Server; SQLite no-op)backstage.cms.show_id_in_content_overviewflag (defaultfalse) to control visibility and search/sort ofidin content overviewContentResourcetable gains conditionalTextColumn('id')that is visible/searchable/sortable when the flag is enabledbackstage/userstorequireWritten by Cursor Bugbot for commit b0b2b08. This will update automatically on new commits. Configure here.