- Issue created by @NicholasS
- Status changed to Needs review
12 months ago 3:11pm 4 December 2023 - Status changed to Fixed
12 months ago 6:50am 5 December 2023 Automatically closed - issue fixed for 2 weeks with no activity.
During a database import I noticed this.
SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL DEFAULT NULL DEFAULT NULL COMMENT
'Report entity: Entity type id',
"entity' at line 3: CREATE TABLE "openai_seo" (
"rid" INT NOT NULL auto_increment COMMENT 'Primary Key: Unique report ID',
"entity_type_id" NULL DEFAULT NULL DEFAULT NULL COMMENT 'Report entity: Entity type id',
"entity_id" INT NULL DEFAULT NULL DEFAULT NULL COMMENT 'Report entity: Matching "entity".id',
"revision_id" INT NULL DEFAULT NULL DEFAULT NULL COMMENT 'Report node: Matching "node" revision.id',
"url" VARCHAR(500) NULL DEFAULT NULL DEFAULT NULL COMMENT 'Report URL: The URL the report was generated from',
"uid" INT NOT NULL COMMENT 'Report author: Matching "user".id',
"report" LONGTEXT NULL DEFAULT NULL COMMENT 'Full text of the SEO report',
"prompt" LONGTEXT NULL DEFAULT NULL COMMENT 'Prompt used to generate this report',
"seed" INT NULL DEFAULT NULL DEFAULT NULL COMMENT 'Seed used to generate the response',
"timestamp" INT NOT NULL DEFAULT 0 COMMENT 'Timestamp of the report creation',
PRIMARY KEY ("rid"),
INDEX "entity_id" ("entity_id"),
INDEX "uid" ("uid")
) ENGINE = InnoDB DEFAULT CHARACTER SET utf8mb4 COMMENT 'Stores all SEO reports.'; Array
(
)
I think just installing via command line will show this error.
The openai_seo_schema() function. The 'type' for 'entity_type_id' is set as 'string', but in MySQL there's no 'string' type. You should use 'varchar' instead. Also, the 'default' key is set to NULL, which is not necessary for 'varchar' type.
Fixed
1.0
Code
Automatically closed - issue fixed for 2 weeks with no activity.