Serial Type creates error

Created on 28 August 2023, 10 months ago

Steps to reproduce

Create new field TestSer. Add Serial Type and save.

Attempt to update field TestSer failed: Exception thrown while performing a schema update. SQLSTATE[42000]: Syntax error or access violation: 1075 Incorrect table definition; there can be only one auto column and it must be defined as a key: CREATE TABLE "node__field_testser" ( "bundle" VARCHAR(128) CHARACTER SET ascii COLLATE ascii_general_ci NOT NULL DEFAULT '' COMMENT 'The field instance bundle to which this row belongs, used when deleting a field instance', "deleted" TINYINT NOT NULL DEFAULT 0 COMMENT 'A boolean indicating whether this data item has been deleted', "entity_id" INT unsigned NOT NULL COMMENT 'The entity id this data is attached to', "revision_id" INT unsigned NOT NULL COMMENT 'The entity revision id this data is attached to', "langcode" VARCHAR(32) CHARACTER SET ascii COLLATE ascii_general_ci NOT NULL DEFAULT '' COMMENT 'The language code for this data item.', "delta" INT unsigned NOT NULL COMMENT 'The sequence number for this data item, used for multi-value fields', "field_testser_serialtest" INT auto_increment DEFAULT NULL COMMENT 'Serialtest subfield value.', "field_testser_value" VARCHAR(255) NULL DEFAULT NULL COMMENT 'Value subfield value.', PRIMARY KEY ("entity_id", "deleted", "delta", "langcode"), INDEX "bundle" ("bundle"), INDEX "revision_id" ("revision_id") ) ENGINE = InnoDB DEFAULT CHARACTER SET utf8mb4 COMMENT 'Data storage for node field field_testser.'; Array ( ) .

πŸ› Bug report
Status

Closed: works as designed

Version

1.0

Component

Code

Created by

πŸ‡¨πŸ‡¦Canada psaleks

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @psaleks
  • Status changed to Closed: works as designed 10 months ago
  • πŸ‡«πŸ‡·France lazzyvn paris

    Serial Type I don't know how to use this. i think it will create the field with primary key and increment automatically, so it can't have 2 primary key and auto increment in one table, that caused the error. I reserve this type of school for the future

Production build 0.69.0 2024