Skip to content

Double quotes on dump and import failing #145

Closed
@back-2-95

Description

We have two Drupal projects. Another gives working dump.sql but another one gives dump which used double quotes.
Configuration files are same.

Preconditions

GdprDump Version: 5.0.2

PHP Version: 8.3

Database Version: MySQL 8.0.30 in DBaaS

Steps to reproduce

  1. ./gdpr-dump.phar conf/gdpr-dump.yaml > dump.sql

Expected result

CREATE TABLE `batch` (
  `bid` int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Primary Key: Unique batch ID.',
  `token` varchar(64) CHARACTER SET ascii COLLATE ascii_general_ci NOT NULL COMMENT 'A string token generated against the current user''s session id and the batch id, used to ensure that only the user who submitted the batch can effectively access it.',
  `timestamp` bigint NOT NULL COMMENT 'A Unix timestamp indicating when this batch was submitted for processing. Stale batches are purged at cron time.',
  `batch` longblob COMMENT 'A serialized array containing the processing data for the batch.',
  PRIMARY KEY (`bid`),
  KEY `token` (`token`)
) 

Actual result

CREATE TABLE "batch" (
  "bid" int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Primary Key: Unique batch ID.',
  "token" varchar(64) CHARACTER SET ascii COLLATE ascii_general_ci NOT NULL COMMENT 'A string token generated against the current user''s session id and the batch id, used to ensure that only the user who submitted the batch can effectively access it.',
  "timestamp" bigint NOT NULL COMMENT 'A Unix timestamp indicating when this batch was submitted for processing. Stale batches are purged at cron time.',
  "batch" longblob COMMENT 'A serialized array containing the processing data for the batch.',
  PRIMARY KEY ("bid"),
  KEY "token" ("token")
);

and an error then importing:

ERROR 1064 (42000) at line 27: 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 '"batch" (
    "bid" int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Primary Key: Uni' at line 1

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions