Comments (4)
Hello @gegonzalez07 ,
Please pass the DDL for Category and Worker table.
Thanks
from mock-data.
Hello @gegonzalez07
This seems to be a bug, i.e your DDL have CamelCase columns and I guess somewhere we dont honor the camelcase.
If you look at the below debug
% ./mock-darwin-amd64-v3.0 d -f -u testme -a localhost -q -v
DEBU[2023-10-31 10:28:57] Checking the version of the database file="sql.go:67"
INFO[2023-10-31 10:28:57] Version of the database: PostgreSQL 12.14 on x86_64-apple-darwin21.6.0, compiled by Apple clang version 14.0.0 (clang-1400.0.29.202), 64-bit file="sql.go:82"
DEBU[2023-10-31 10:28:57] Checking if this a greenplum or postgres DB file="sql.go:88"
INFO[2023-10-31 10:28:57] The flavour of postgres is: postgres file="sql.go:97"
INFO[2023-10-31 10:28:57] The database that will be used by mock program is: postgres file="cmd.go:82"
INFO[2023-10-31 10:28:57] Starting the program to mock full database file="database.go:53"
INFO[2023-10-31 10:28:57] Extracting the tables in the database: postgres file="database.go:60"
DEBU[2023-10-31 10:28:57] Extracting the tables info from the postgres database file="sql.go:102"
DEBU[2023-10-31 10:28:57] Total number of tables to mock: 1 file="worker.go:28"
INFO[2023-10-31 10:28:57] Beginning the mocking process for the tables file="worker.go:40"
INFO[2023-10-31 10:28:57] Extracting the columns and data type information file="worker.go:63"
DEBU[2023-10-31 10:28:57] Extracting the column information from postgres database for table: "public"."Category" file="sql.go:184"
INFO[2023-10-31 10:28:57] Saving all the backup files to the path: /Users/testme/mock/20231031102857 file="constraintsBackup.go:21"
DEBU[2023-10-31 10:28:57] Backing up all the constraints from the database: postgres file="constraintsBackup.go:31"
DEBU[2023-10-31 10:28:57] Extracting the DDL of the p constraints file="sql.go:264"
DEBU[2023-10-31 10:28:57] Extracting the DDL of the f constraints file="sql.go:264"
DEBU[2023-10-31 10:28:57] Extracting the DDL of the u constraints file="sql.go:264"
DEBU[2023-10-31 10:28:57] Extracting the DDL of the c constraints file="sql.go:264"
DEBU[2023-10-31 10:28:57] Backing up all the unique indexes from the database: postgres file="constraintsBackup.go:53"
DEBU[2023-10-31 10:28:57] Extracting the unique indexes file="sql.go:298"
INFO[2023-10-31 10:28:57] Total numbers of tables to mock: 1 file="worker.go:109"
DEBU[2023-10-31 10:28:57] Removing constraints for table: "public"."Category" file="constraintsBackup.go:96"
DEBU[2023-10-31 10:28:57] Extracting constraint info for table: "public"."Category" file="sql.go:333"
DEBU[2023-10-31 10:28:57] Building and loading mock data to the table "public"."Category" file="worker.go:134"
INFO[2023-10-31 10:28:57] Completed loading mock data to 1 tables file="worker.go:125"
INFO[2023-10-31 10:28:57] Found 1 violation of primary keys, if found any attempting to fix them file="constraintsRestore.go:28"
DEBU[2023-10-31 10:28:57] Fixing the Primary / Unique Key for table "public"."Category" file="constraintsRestore.go:51"
DEBU[2023-10-31 10:28:57] query: SELECT COUNT(*) FROM ( SELECT "id" FROM "public"."Category" GROUP BY "id" HAVING COUNT(*) > 1 ) a file="sql.go:436"
ERRO[2023-10-31 10:28:57] Error when executing the query to extract pk violators: ERROR #42703 column "id" does not exist file="sql.go:437"
INFO[2023-10-31 10:28:57] Found 2 violation of unique keys, if found any attempting to fix them file="constraintsRestore.go:28"
DEBU[2023-10-31 10:28:57] Fixing the Primary / Unique Key for table "public"."Category" file="constraintsRestore.go:51"
DEBU[2023-10-31 10:28:57] query: SELECT COUNT(*) FROM ( SELECT "id" FROM "public"."Category" GROUP BY "id" HAVING COUNT(*) > 1 ) a file="sql.go:436"
ERRO[2023-10-31 10:28:57] Error when executing the query to extract pk violators: ERROR #42703 column "id" does not exist file="sql.go:437"
DEBU[2023-10-31 10:28:57] Fixing the Primary / Unique Key for table "public"."Category" file="constraintsRestore.go:51"
DEBU[2023-10-31 10:28:57] query: SELECT COUNT(*) FROM ( SELECT "id" FROM "public"."Category" GROUP BY "id" HAVING COUNT(*) > 1 ) a file="sql.go:436"
ERRO[2023-10-31 10:28:57] Error when executing the query to extract pk violators: ERROR #42703 column "id" does not exist file="sql.go:437"
INFO[2023-10-31 10:28:57] Found 1 violation of foreign keys, if found any attempting to fix them file="constraintsRestore.go:28"
DEBU[2023-10-31 10:28:57] Checking / Fixing FOREIGN KEY Violation table: "public"."Category", column: "CategoryParentId", reference: "Category"("Id") file="constraintsRestore.go:112"
DEBU[2023-10-31 10:28:58] Extracting the foreign violations for table "public"."Category" and column "Category" file="sql.go:543"
INFO[2023-10-31 10:28:58] Attempting to recreating all the constraints file="constraintsRestore.go:182"
INFO[2023-10-31 10:28:58] Successfully completed running the database sub command file="cmd.go:102"
%
The query executed is all lowercase.
query: SELECT COUNT(*) FROM ( SELECT "id" FROM "public"."Category" GROUP BY "id" HAVING COUNT(*) > 1 ) a file="sql.go:436"
Changing the DDL id column to lower case, seems to work.
-- ----------------------------
-- Table structure for Category
-- ----------------------------
DROP TABLE IF EXISTS "public"."Category";
CREATE TABLE "public"."Category" (
Id int8 NOT NULL GENERATED BY DEFAULT AS IDENTITY (
INCREMENT 1
MINVALUE 1
MAXVALUE 9223372036854775807
START 1
),
"Name" text COLLATE "pg_catalog"."default" NOT NULL,
"CategoryParentId" int8,
"Created" timestamptz(6) NOT NULL,
"LastModified" timestamptz(6),
"StatusBaseEntity" int4 NOT NULL
)
;
-- ----------------------------
-- Indexes structure for table Category
-- ----------------------------
CREATE INDEX "IX_Category_CategoryParentId" ON "public"."Category" USING btree (
"CategoryParentId" "pg_catalog"."int8_ops" ASC NULLS LAST
);
CREATE UNIQUE INDEX "PK_Category" ON "public"."Category" USING btree (
Id "pg_catalog"."int8_ops" ASC NULLS LAST
);
-- ----------------------------
-- Primary Key structure for table Category
-- ----------------------------
ALTER TABLE "public"."Category" ADD CONSTRAINT "pk_category" PRIMARY KEY ("Id");
-- ----------------------------
-- Foreign Keys structure for table Category
-- ----------------------------
ALTER TABLE "public"."Category" ADD CONSTRAINT "fk_category_category_categoryparentid" FOREIGN KEY ("CategoryParentId") REFERENCES "public"."Category" (Id) ON DELETE NO ACTION ON UPDATE NO ACTION;
-- ----------------------------
-- Table structure for Worker
-- ----------------------------
DROP TABLE IF EXISTS "public"."Worker";
CREATE TABLE "public"."Worker" (
Id int8 NOT NULL GENERATED BY DEFAULT AS IDENTITY (
INCREMENT 1
MINVALUE 1
MAXVALUE 9223372036854775807
START 1
),
"Name" varchar(50) COLLATE "pg_catalog"."default" NOT NULL,
"StartDate" timestamptz(6) NOT NULL,
"FinishDate" timestamptz(6) NOT NULL,
"PublishingDate" timestamptz(6) NOT NULL,
"ShortDescription" varchar(250) COLLATE "pg_catalog"."default" NOT NULL,
"LongDescription" varchar(500) COLLATE "pg_catalog"."default" NOT NULL,
"Price" float8 NOT NULL DEFAULT 0.0,
"OrderPriority" int4 NOT NULL DEFAULT 1,
"NeedId" bool NOT NULL DEFAULT false,
"NeedSnack" bool NOT NULL DEFAULT false,
"Payment" varchar(20) COLLATE "pg_catalog"."default" NOT NULL,
"CategoryId" int8 NOT NULL,
"Created" timestamptz(6) NOT NULL,
"LastModified" timestamptz(6),
"StatusBaseEntity" int4 NOT NULL
)
;
-- ----------------------------
-- Indexes structure for table Worker
-- ----------------------------
CREATE INDEX "IX_Worker_CategoryId" ON "public"."Worker" USING btree (
"CategoryId" "pg_catalog"."int8_ops" ASC NULLS LAST
);
CREATE UNIQUE INDEX "PK_Worker" ON "public"."Worker" USING btree (
Id "pg_catalog"."int8_ops" ASC NULLS LAST
);
-- ----------------------------
-- Primary Key structure for table Worker
-- ----------------------------
ALTER TABLE "public"."Worker" ADD CONSTRAINT "pk_Worker" PRIMARY KEY (Id);
-- ----------------------------
-- Foreign Keys structure for table Worker
-- ----------------------------
ALTER TABLE "public"."Worker" ADD CONSTRAINT "fk_Worker_category_categoryid" FOREIGN KEY ("CategoryId") REFERENCES "public"."Category" (Id) ON DELETE CASCADE ON UPDATE NO ACTION;
% ./mock-darwin-amd64-v3.0 d -f -u testme-a localhost -q
INFO[2023-10-31 10:43:31] Version of the database: PostgreSQL 12.14 on x86_64-apple-darwin21.6.0, compiled by Apple clang version 14.0.0 (clang-1400.0.29.202), 64-bit
INFO[2023-10-31 10:43:31] The flavour of postgres is: postgres
INFO[2023-10-31 10:43:31] The database that will be used by mock program is: postgres
INFO[2023-10-31 10:43:31] Starting the program to mock full database
INFO[2023-10-31 10:43:31] Extracting the tables in the database: postgres
INFO[2023-10-31 10:43:31] Beginning the mocking process for the tables
INFO[2023-10-31 10:43:31] Extracting the columns and data type information
Extracting column information from tables 100% [==================================================] (2/2)
INFO[2023-10-31 10:43:31] Saving all the backup files to the path: /Users/testme/mock/20231031104331
INFO[2023-10-31 10:43:31] Total numbers of tables to mock: 2
Mocking Table "public"."Worker" 100% [==================================================] (10/10)
Mocking Table "public"."Category" 100% [==================================================] (10/10)
INFO[2023-10-31 10:43:31] Completed loading mock data to 2 tables
INFO[2023-10-31 10:43:31] Found 1 violation of primary keys, if found any attempting to fix them
Fixing primary keys violation 100% [==================================================] (1/1)
INFO[2023-10-31 10:43:31] Found 4 violation of unique keys, if found any attempting to fix them
Fixing unique keys violation 100% [==================================================] (4/4)
INFO[2023-10-31 10:43:31] Found 0 violation of foreign keys, if found any attempting to fix them
INFO[2023-10-31 10:43:31] Attempting to recreating all the constraints
Recreating the constraint type "p" 100% [==================================================] (1/1)
Recreating the constraint type "u" 100% [==================================================] (4/4)
INFO[2023-10-31 10:43:32] Successfully completed running the database sub command
%
I will get that fixed. Thanks for reporting the bug
from mock-data.
Hello @gegonzalez07 ,
Please pass the DDL for Category and Worker table.
Thanks
Thank you for responding so quickly
Category table
-- ----------------------------
-- Table structure for Category
-- ----------------------------
DROP TABLE IF EXISTS "public"."Category";
CREATE TABLE "public"."Category" (
"Id" int8 NOT NULL GENERATED BY DEFAULT AS IDENTITY (
INCREMENT 1
MINVALUE 1
MAXVALUE 9223372036854775807
START 1
),
"Name" text COLLATE "pg_catalog"."default" NOT NULL,
"CategoryParentId" int8,
"Created" timestamptz(6) NOT NULL,
"LastModified" timestamptz(6),
"StatusBaseEntity" int4 NOT NULL
)
;
-- ----------------------------
-- Indexes structure for table Category
-- ----------------------------
CREATE INDEX "IX_Category_CategoryParentId" ON "public"."Category" USING btree (
"CategoryParentId" "pg_catalog"."int8_ops" ASC NULLS LAST
);
CREATE UNIQUE INDEX "PK_Category" ON "public"."Category" USING btree (
"Id" "pg_catalog"."int8_ops" ASC NULLS LAST
);
-- ----------------------------
-- Primary Key structure for table Category
-- ----------------------------
ALTER TABLE "public"."Category" ADD CONSTRAINT "pk_category" PRIMARY KEY ("Id");
-- ----------------------------
-- Foreign Keys structure for table Category
-- ----------------------------
ALTER TABLE "public"."Category" ADD CONSTRAINT "fk_category_category_categoryparentid" FOREIGN KEY ("CategoryParentId") REFERENCES "public"."Category" ("Id") ON DELETE NO ACTION ON UPDATE NO ACTION;
Worker table
-- ----------------------------
-- Table structure for Worker
-- ----------------------------
DROP TABLE IF EXISTS "public"."Worker";
CREATE TABLE "public"."Worker" (
"Id" int8 NOT NULL GENERATED BY DEFAULT AS IDENTITY (
INCREMENT 1
MINVALUE 1
MAXVALUE 9223372036854775807
START 1
),
"Name" varchar(50) COLLATE "pg_catalog"."default" NOT NULL,
"StartDate" timestamptz(6) NOT NULL,
"FinishDate" timestamptz(6) NOT NULL,
"PublishingDate" timestamptz(6) NOT NULL,
"ShortDescription" varchar(250) COLLATE "pg_catalog"."default" NOT NULL,
"LongDescription" varchar(500) COLLATE "pg_catalog"."default" NOT NULL,
"Price" float8 NOT NULL DEFAULT 0.0,
"OrderPriority" int4 NOT NULL DEFAULT 1,
"NeedId" bool NOT NULL DEFAULT false,
"NeedSnack" bool NOT NULL DEFAULT false,
"Payment" varchar(20) COLLATE "pg_catalog"."default" NOT NULL,
"CategoryId" int8 NOT NULL,
"Created" timestamptz(6) NOT NULL,
"LastModified" timestamptz(6),
"StatusBaseEntity" int4 NOT NULL
)
;
-- ----------------------------
-- Indexes structure for table Worker
-- ----------------------------
CREATE INDEX "IX_Worker_CategoryId" ON "public"."Worker" USING btree (
"CategoryId" "pg_catalog"."int8_ops" ASC NULLS LAST
);
CREATE UNIQUE INDEX "PK_Worker" ON "public"."Worker" USING btree (
"Id" "pg_catalog"."int8_ops" ASC NULLS LAST
);
-- ----------------------------
-- Primary Key structure for table Worker
-- ----------------------------
ALTER TABLE "public"."Worker" ADD CONSTRAINT "pk_Worker" PRIMARY KEY ("Id");
-- ----------------------------
-- Foreign Keys structure for table Worker
-- ----------------------------
ALTER TABLE "public"."Worker" ADD CONSTRAINT "fk_Worker_category_categoryid" FOREIGN KEY ("CategoryId") REFERENCES "public"."Category" ("Id") ON DELETE CASCADE ON UPDATE NO ACTION;
from mock-data.
Hello @gegonzalez07
This seems to be a bug, i.e your DDL have CamelCase columns and I guess somewhere we dont honor the camelcase.
If you look at the below debug
% ./mock-darwin-amd64-v3.0 d -f -u testme -a localhost -q -v DEBU[2023-10-31 10:28:57] Checking the version of the database file="sql.go:67" INFO[2023-10-31 10:28:57] Version of the database: PostgreSQL 12.14 on x86_64-apple-darwin21.6.0, compiled by Apple clang version 14.0.0 (clang-1400.0.29.202), 64-bit file="sql.go:82" DEBU[2023-10-31 10:28:57] Checking if this a greenplum or postgres DB file="sql.go:88" INFO[2023-10-31 10:28:57] The flavour of postgres is: postgres file="sql.go:97" INFO[2023-10-31 10:28:57] The database that will be used by mock program is: postgres file="cmd.go:82" INFO[2023-10-31 10:28:57] Starting the program to mock full database file="database.go:53" INFO[2023-10-31 10:28:57] Extracting the tables in the database: postgres file="database.go:60" DEBU[2023-10-31 10:28:57] Extracting the tables info from the postgres database file="sql.go:102" DEBU[2023-10-31 10:28:57] Total number of tables to mock: 1 file="worker.go:28" INFO[2023-10-31 10:28:57] Beginning the mocking process for the tables file="worker.go:40" INFO[2023-10-31 10:28:57] Extracting the columns and data type information file="worker.go:63" DEBU[2023-10-31 10:28:57] Extracting the column information from postgres database for table: "public"."Category" file="sql.go:184" INFO[2023-10-31 10:28:57] Saving all the backup files to the path: /Users/testme/mock/20231031102857 file="constraintsBackup.go:21" DEBU[2023-10-31 10:28:57] Backing up all the constraints from the database: postgres file="constraintsBackup.go:31" DEBU[2023-10-31 10:28:57] Extracting the DDL of the p constraints file="sql.go:264" DEBU[2023-10-31 10:28:57] Extracting the DDL of the f constraints file="sql.go:264" DEBU[2023-10-31 10:28:57] Extracting the DDL of the u constraints file="sql.go:264" DEBU[2023-10-31 10:28:57] Extracting the DDL of the c constraints file="sql.go:264" DEBU[2023-10-31 10:28:57] Backing up all the unique indexes from the database: postgres file="constraintsBackup.go:53" DEBU[2023-10-31 10:28:57] Extracting the unique indexes file="sql.go:298" INFO[2023-10-31 10:28:57] Total numbers of tables to mock: 1 file="worker.go:109" DEBU[2023-10-31 10:28:57] Removing constraints for table: "public"."Category" file="constraintsBackup.go:96" DEBU[2023-10-31 10:28:57] Extracting constraint info for table: "public"."Category" file="sql.go:333" DEBU[2023-10-31 10:28:57] Building and loading mock data to the table "public"."Category" file="worker.go:134" INFO[2023-10-31 10:28:57] Completed loading mock data to 1 tables file="worker.go:125" INFO[2023-10-31 10:28:57] Found 1 violation of primary keys, if found any attempting to fix them file="constraintsRestore.go:28" DEBU[2023-10-31 10:28:57] Fixing the Primary / Unique Key for table "public"."Category" file="constraintsRestore.go:51" DEBU[2023-10-31 10:28:57] query: SELECT COUNT(*) FROM ( SELECT "id" FROM "public"."Category" GROUP BY "id" HAVING COUNT(*) > 1 ) a file="sql.go:436" ERRO[2023-10-31 10:28:57] Error when executing the query to extract pk violators: ERROR #42703 column "id" does not exist file="sql.go:437" INFO[2023-10-31 10:28:57] Found 2 violation of unique keys, if found any attempting to fix them file="constraintsRestore.go:28" DEBU[2023-10-31 10:28:57] Fixing the Primary / Unique Key for table "public"."Category" file="constraintsRestore.go:51" DEBU[2023-10-31 10:28:57] query: SELECT COUNT(*) FROM ( SELECT "id" FROM "public"."Category" GROUP BY "id" HAVING COUNT(*) > 1 ) a file="sql.go:436" ERRO[2023-10-31 10:28:57] Error when executing the query to extract pk violators: ERROR #42703 column "id" does not exist file="sql.go:437" DEBU[2023-10-31 10:28:57] Fixing the Primary / Unique Key for table "public"."Category" file="constraintsRestore.go:51" DEBU[2023-10-31 10:28:57] query: SELECT COUNT(*) FROM ( SELECT "id" FROM "public"."Category" GROUP BY "id" HAVING COUNT(*) > 1 ) a file="sql.go:436" ERRO[2023-10-31 10:28:57] Error when executing the query to extract pk violators: ERROR #42703 column "id" does not exist file="sql.go:437" INFO[2023-10-31 10:28:57] Found 1 violation of foreign keys, if found any attempting to fix them file="constraintsRestore.go:28" DEBU[2023-10-31 10:28:57] Checking / Fixing FOREIGN KEY Violation table: "public"."Category", column: "CategoryParentId", reference: "Category"("Id") file="constraintsRestore.go:112" DEBU[2023-10-31 10:28:58] Extracting the foreign violations for table "public"."Category" and column "Category" file="sql.go:543" INFO[2023-10-31 10:28:58] Attempting to recreating all the constraints file="constraintsRestore.go:182" INFO[2023-10-31 10:28:58] Successfully completed running the database sub command file="cmd.go:102" %
The query executed is all lowercase.
query: SELECT COUNT(*) FROM ( SELECT "id" FROM "public"."Category" GROUP BY "id" HAVING COUNT(*) > 1 ) a file="sql.go:436"
Changing the DDL id column to lower case, seems to work.
-- ---------------------------- -- Table structure for Category -- ---------------------------- DROP TABLE IF EXISTS "public"."Category"; CREATE TABLE "public"."Category" ( Id int8 NOT NULL GENERATED BY DEFAULT AS IDENTITY ( INCREMENT 1 MINVALUE 1 MAXVALUE 9223372036854775807 START 1 ), "Name" text COLLATE "pg_catalog"."default" NOT NULL, "CategoryParentId" int8, "Created" timestamptz(6) NOT NULL, "LastModified" timestamptz(6), "StatusBaseEntity" int4 NOT NULL ) ; -- ---------------------------- -- Indexes structure for table Category -- ---------------------------- CREATE INDEX "IX_Category_CategoryParentId" ON "public"."Category" USING btree ( "CategoryParentId" "pg_catalog"."int8_ops" ASC NULLS LAST ); CREATE UNIQUE INDEX "PK_Category" ON "public"."Category" USING btree ( Id "pg_catalog"."int8_ops" ASC NULLS LAST ); -- ---------------------------- -- Primary Key structure for table Category -- ---------------------------- ALTER TABLE "public"."Category" ADD CONSTRAINT "pk_category" PRIMARY KEY ("Id"); -- ---------------------------- -- Foreign Keys structure for table Category -- ---------------------------- ALTER TABLE "public"."Category" ADD CONSTRAINT "fk_category_category_categoryparentid" FOREIGN KEY ("CategoryParentId") REFERENCES "public"."Category" (Id) ON DELETE NO ACTION ON UPDATE NO ACTION; -- ---------------------------- -- Table structure for Worker -- ---------------------------- DROP TABLE IF EXISTS "public"."Worker"; CREATE TABLE "public"."Worker" ( Id int8 NOT NULL GENERATED BY DEFAULT AS IDENTITY ( INCREMENT 1 MINVALUE 1 MAXVALUE 9223372036854775807 START 1 ), "Name" varchar(50) COLLATE "pg_catalog"."default" NOT NULL, "StartDate" timestamptz(6) NOT NULL, "FinishDate" timestamptz(6) NOT NULL, "PublishingDate" timestamptz(6) NOT NULL, "ShortDescription" varchar(250) COLLATE "pg_catalog"."default" NOT NULL, "LongDescription" varchar(500) COLLATE "pg_catalog"."default" NOT NULL, "Price" float8 NOT NULL DEFAULT 0.0, "OrderPriority" int4 NOT NULL DEFAULT 1, "NeedId" bool NOT NULL DEFAULT false, "NeedSnack" bool NOT NULL DEFAULT false, "Payment" varchar(20) COLLATE "pg_catalog"."default" NOT NULL, "CategoryId" int8 NOT NULL, "Created" timestamptz(6) NOT NULL, "LastModified" timestamptz(6), "StatusBaseEntity" int4 NOT NULL ) ; -- ---------------------------- -- Indexes structure for table Worker -- ---------------------------- CREATE INDEX "IX_Worker_CategoryId" ON "public"."Worker" USING btree ( "CategoryId" "pg_catalog"."int8_ops" ASC NULLS LAST ); CREATE UNIQUE INDEX "PK_Worker" ON "public"."Worker" USING btree ( Id "pg_catalog"."int8_ops" ASC NULLS LAST ); -- ---------------------------- -- Primary Key structure for table Worker -- ---------------------------- ALTER TABLE "public"."Worker" ADD CONSTRAINT "pk_Worker" PRIMARY KEY (Id); -- ---------------------------- -- Foreign Keys structure for table Worker -- ---------------------------- ALTER TABLE "public"."Worker" ADD CONSTRAINT "fk_Worker_category_categoryid" FOREIGN KEY ("CategoryId") REFERENCES "public"."Category" (Id) ON DELETE CASCADE ON UPDATE NO ACTION; % ./mock-darwin-amd64-v3.0 d -f -u testme-a localhost -q INFO[2023-10-31 10:43:31] Version of the database: PostgreSQL 12.14 on x86_64-apple-darwin21.6.0, compiled by Apple clang version 14.0.0 (clang-1400.0.29.202), 64-bit INFO[2023-10-31 10:43:31] The flavour of postgres is: postgres INFO[2023-10-31 10:43:31] The database that will be used by mock program is: postgres INFO[2023-10-31 10:43:31] Starting the program to mock full database INFO[2023-10-31 10:43:31] Extracting the tables in the database: postgres INFO[2023-10-31 10:43:31] Beginning the mocking process for the tables INFO[2023-10-31 10:43:31] Extracting the columns and data type information Extracting column information from tables 100% [==================================================] (2/2) INFO[2023-10-31 10:43:31] Saving all the backup files to the path: /Users/testme/mock/20231031104331 INFO[2023-10-31 10:43:31] Total numbers of tables to mock: 2 Mocking Table "public"."Worker" 100% [==================================================] (10/10) Mocking Table "public"."Category" 100% [==================================================] (10/10) INFO[2023-10-31 10:43:31] Completed loading mock data to 2 tables INFO[2023-10-31 10:43:31] Found 1 violation of primary keys, if found any attempting to fix them Fixing primary keys violation 100% [==================================================] (1/1) INFO[2023-10-31 10:43:31] Found 4 violation of unique keys, if found any attempting to fix them Fixing unique keys violation 100% [==================================================] (4/4) INFO[2023-10-31 10:43:31] Found 0 violation of foreign keys, if found any attempting to fix them INFO[2023-10-31 10:43:31] Attempting to recreating all the constraints Recreating the constraint type "p" 100% [==================================================] (1/1) Recreating the constraint type "u" 100% [==================================================] (4/4) INFO[2023-10-31 10:43:32] Successfully completed running the database sub command %
I will get that fixed. Thanks for reporting the bug
Thanks a loot for your answer.
from mock-data.
Related Issues (20)
- Strategies to avoid constraint creation would fails? HOT 5
- [2.3] Encountered error when getting constraints for table \"public\".\"AO_0A5972_NOTIFICATION_SETTING\" from database, err: ERROR #42602 invalid name syntax HOT 13
- [2.3] "Error during committing data: ERROR #23502 null value in column \"EXPRESSION\" violates not-null constraint" HOT 4
- Possibly missing quotes for schema in "Extracting the column information from postgres database for table" step HOT 1
- Loop for "Fixing the Primary / Unique Key" HOT 2
- Error during committing data: ERROR #2201W LIMIT must not be negative HOT 3
- Error when execute the query to extract pk violators: ERROR #42601 syntax error at or near \"FROM\" HOT 13
- Error when updating the foreign key for table \"public\".\"jbid_io_attr\", err: ERROR #22P02 invalid input syntax for type bigint: \"\" HOT 4
- Error during committing data: ERROR #54000 index row requires 828856 bytes, maximum size is 8191 HOT 9
- Error during committing data: ERROR #42883 function periode_exist(text, integer) does not exist HOT 2
- Error when updating the foreign key for table \"public\".\"film_actor\", err: ERROR #23502 null value in column \"film_id\" violates not-null constraint HOT 8
- Error when updating the foreign key for table \"public\".\"baseball_action_pitches\", err: ERROR #22P02 invalid input syntax for type integer: \"\" HOT 12
- Stop showing progress bar on Debug HOT 1
- Run all those constraints HOT 1
- More information in debug output `Fixing the Primary / Unique Key` HOT 2
- Encountered error when connecting to the database, err: FATAL #28000 SSL connection is required. Please specify SSL options and retry HOT 4
- SSL mode verify-ca not supported HOT 4
- 同学,您这个项目引入了201个开源组件,存在2个漏洞,辛苦升级一下 HOT 1
- mock can't connect to db - dial tcp 127.0.0.1:5432: connect: connection refused HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mock-data.