Code Monkey home page Code Monkey logo

mock-data's Introduction

Mock Data go version CI CI codecov Go Report Card Github Releases Stats of mock-data

Here are my tables
Load them [with data] for me
I don't care how

Mock-data is the result of a Pivotal internal hackathon in July 2017. The idea behind it is to allow users to test database queries with sets of fake data in any pre-defined table.

With Mock-data users can have

  • Their own tables defined with any particular (supported) data types. It's only needed to provide the target table(s), and the number of rows of randomly generated data to insert.
  • Create a demo database
  • Create n number of table with n number of column
  • Custom fit data into the table
  • Option to select realistic data to be loaded onto the table

An ideal environment to make Mock-data work without any errors would be

  • Tables with no constraints
  • No custom data types

However, please DO MAKE SURE TO TAKE A BACKUP of your database before you mock data in it as it has not been tested extensively.

Check on the "Known Issues" section below for more information about current identified bugs.

Table of Contents

Important & Disclaimer

Mock-data idea is to generate fake data in new test cluster, and it is NOT TO BE USED IN PRODUCTION ENVIRONMENTS. Please ensure you have a backup of your database before running Mock-data in an environment you can't afford losing.

Supported database engines & data types

Database Engine

  • PostgresSQL
  • Greenplum Database

Data types

  • All datatypes that are listed on the postgres datatype website are supported
  • As Greenplum are both base from postgres, the supported postgres datatype also apply in their case

How it works

  • PARSES the CLI arguments
  • CHECKS if the database connection can be established
  • BASED on sub commands i.e either database , table or schema it pull / verifies the tables
  • CREATES a backup of all constraints (PK, UK, CK, FK ) and unique indexes (due to cascade nature of the drop constraints)
  • STORES this constraint/unique index information in memory and also saves it to the file under $HOME/mock
  • REMOVES all the constraints on the table
  • STARTS loading random data based on the columns datatype
  • READS all the constraints information from memory
  • FIXES PK and UK initially
  • FIXES FK
  • CHECK constraints are ignored (coming soon?)
  • LOADS constraints that it had backed up (Mock-data can fail at this stage if its not able to fix the constraint violations)

Usage

$ mock --help
This program generates fake data into a postgres database cluster. 
PLEASE DO NOT run on a mission critical databases

Usage:
  mock [flags]
  mock [command]

Available Commands:
  custom      Controlled mocking of tables
  database    Mock at database level
  help        Help about any command
  schema      Mock at schema level
  tables      Mock at table level

Flags:
  -a, --address string    Hostname where the postgres database lives
  -d, --database string   Database to mock the data
  -q, --dont-prompt       Run without asking for confirmation
  -h, --help              help for mock
  -i, --ignore            Ignore checking and fixing constraints
  -w, --password string   Password for the user to connect to database
  -p, --port int          Port number of the postgres database
  -r, --rows int          Total rows to be faked or mocked (default 10)
      --uri string        Postgres connection URI, eg. postgres://user:pass@host:=port/db?sslmode=disable
  -u, --username string   Username to connect to the database
  -v, --verbose           Enable verbose or debug logging
      --version           version for mock

Use "mock [command] --help" for more information about a command.

Installation

Using Binary

Download the latest release for your OS & Architecture and you're ready to go!

[Optional] You can copy the mock program to the PATH folder, so that you can use the mock from anywhere in the terminal, for eg.s

cp mock-darwin-amd64-v2.0 /usr/local/bin/mock
chmod +x /usr/local/bin/mock

provided /usr/local/bin is part of the $PATH environment variable.

Using Docker

  • Pull the image & you are all set
    docker pull ghcr.io/faisaltheparttimecoder/mock-data:latest
    
  • [OPTIONAL] add a tag for easy acess
    docker image tag ghcr.io/faisaltheparttimecoder/mock-data mock
    
  • Create a local directory on the host to mount has a volume inside the container, needed to store files (eg.s constraints list) or to send in configuration files to the mock data tool (like custom subcommand)
    mkdir /tmp/mock
    
  • Now run the docker command
    docker run -v /tmp/mock:/home/mock [docker-image-tag] [subcommand] <flags...>
    
    eg.s
    docker run -v /tmp/mock:/home/mock mock database -f -u postgres -d demodb
    
  • For mac users to connect to the host(or local host) database you can use the address host.docker.internal as shown in the below command
    docker run -v /tmp/mock:/home/mock [docker-image-tag] [subcommand] -a host.docker.internal <flags...>
    
    eg.s
    docker run -v /tmp/mock:/home/mock mock database -f -a host.docker.internal -u postgres -d demodb
    
  • [Optional] You can also make an alias of the above command, for eg.s alias with .zshrc
    echo alias mock=\"docker run -it -v /tmp/mock:/home/mock ghcr.io/faisaltheparttimecoder/mock-data:latest\" >> ~/.zshrc
    source ~/.zshrc
    mock tables -t "public.gardens" --uri="postgres://pg_user:mypassword@myhost:5432/database_name?sslmode=disable"
    

Examples

Here is a simple demo of how the tool works, provide us your table and we will load the data for you

demo-table-loading

For more examples how to use the tool, please check out the wiki page for categories like

  • Look here on how the database connection works
  • For realistic & controlled data, read this section on how the subcommand custom works
  • For mocking the whole database or creating a demo database, read this section on how the subcommand database works
  • For mocking the whole tables of the schema, read this section on how the subcommand schema works
  • For creating fake tables and mocking selected tables, read this section on how the subcommand tables works

Known Issues

  1. We do struggle when recreating constraints, even though we do try to fix the primary key , foreign key, unique key. So there is no guarantee that the tool will fix all the constraints and manual intervention is needed in some cases.
  2. If you have a composite unique index where one column is part of foreign key column then there are chances the constraint creation would fail.
  3. Fixing CHECK constraints isn't supported due to complexity, so recreating check constraints would fail, use custom subcommand to control the data being inserted
  4. On Greenplum Database partition tables are not supported (due to check constraint issues defined above), so use the custom sub command to define the data to be inserted to the column with check constraints
  5. Custom data types are not supported, use custom sub command to control the data for that custom data types

Developers / Collaboration

You can sumbit issues or pull request via github and we will try our best to fix them.

To customize this repository, follow the steps

  1. Clone the git repository
  2. Export the GOPATH
    export GOPATH=<path to the clone repository>
    
  3. Install all the dependencies.
    go mod vendor
    
  4. Make sure you have a demo postgres database to connect or if you are using mac, you can use
    make install_postgres
    make start_postgres
    make stop_postgres
    make uninstall_postgres
    
  5. You are all set, you can run it locally using
    go run . <commands> <flags.........>
    
  6. [Recommended] Run the golang linter to analyzes & fix source code programming errors, bugs, stylistic errors, and suspicious constructs.
    golangci-lint run
    
    to install golangci-lint check here, config file .golangci.yml has been provided with this repo
  7. To run test, use
    # Edit the database environment variables on the "Makefile"
    make unit_tests
    make integration_tests
    make tests # Runs the above two test simultaneously 
    
  8. To build the package use
    make build
    

--- HAPPY HACKING ---

Contributors

Faisal
Faisal Ali
Jan
Jan Piotrowski
Matt
Matt Song
Aitor
Aitor Pérez Cedres
Andreas
Andreas Gangsø
Artem/
Artem
Juan
Juan José Ramos
Miguel
Miguel Fernández

License

The Project is licensed under MIT

mock-data's People

Contributors

andreasgangso avatar art-frela avatar faisaltheparttimecoder avatar github-actions[bot] avatar janpio avatar jujoramos avatar matt-song avatar zerpet avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mock-data's Issues

Error when updating the foreign key for table \"public\".\"jbid_io_attr\", err: ERROR #22P02 invalid input syntax for type bigint: \"\"

mock-windows-amd64-v2.4.exe database -a localhost -w foo -f -v -d exo
...
time="2020-03-08 16:47:56" level=debug msg="Extracting the foreign violations for table \"public\".\"gamification_rule\" and column gamification_domain" file="sql.go:517"
Fixing FOREIGN KEYS violation  19% [========>                                         ] (16/81) [10s:42s]time="2020-03-08 16:47:56" level=debug msg="Fixing the Primary / Unique Key" file="constraintsRestore.go:99"
time="2020-03-08 16:47:56" level=debug msg="Checking / Fixing FOREIGN KEY Violation table: \"public\".\"jbid_io\", column: realm, reference: jbid_realm(id)" file="constraintsRestore.go:109"
time="2020-03-08 16:47:56" level=debug msg="Extracting the foreign violations for table \"public\".\"jbid_io\" and column jbid_realm" file="sql.go:517"
Fixing FOREIGN KEYS violation  20% [=========>                                        ] (17/81) [11s:41s]time="2020-03-08 16:47:57" level=debug msg="Fixing the Primary / Unique Key" file="constraintsRestore.go:99"
time="2020-03-08 16:47:57" level=debug msg="Checking / Fixing FOREIGN KEY Violation table: \"public\".\"jbid_io\", column: identity_type, reference: jbid_io_type(id)" file="constraintsRestore.go:109"
time="2020-03-08 16:47:57" level=debug msg="Extracting the foreign violations for table \"public\".\"jbid_io\" and column jbid_io_type" file="sql.go:517"
Fixing FOREIGN KEYS violation  22% [==========>                                       ] (18/81) [11s:40s]time="2020-03-08 16:47:57" level=debug msg="Fixing the Primary / Unique Key" file="constraintsRestore.go:99"
time="2020-03-08 16:47:57" level=debug msg="Checking / Fixing FOREIGN KEY Violation table: \"public\".\"jbid_io_attr\", column: identity_object_id, reference: jbid_io(id)" file="constraintsRestore.go:109"
time="2020-03-08 16:47:57" level=debug msg="Extracting the foreign violations for table \"public\".\"jbid_io_attr\" and column jbid_io" file="sql.go:517"
Fixing FOREIGN KEYS violation  23% [==========>                                       ] (19/81) [12s:38s]time="2020-03-08 16:47:58" level=debug msg="Fixing the Primary / Unique Key" file="constraintsRestore.go:99"
time="2020-03-08 16:47:58" level=debug msg="Checking / Fixing FOREIGN KEY Violation table: \"public\".\"jbid_io_attr\", column: bin_value_id, reference: jbid_attr_bin_value(bin_value_id)" file="constraintsRestore.go:109"
time="2020-03-08 16:47:58" level=debug msg="Extracting the foreign violations for table \"public\".\"jbid_io_attr\" and column jbid_attr_bin_value" file="sql.go:517"
time="2020-03-08 16:47:59" level=debug msg="Extracting the foreign violations for table \"public\".\"jbid_io_attr\" and column jbid_attr_bin_value" file="sql.go:517"

time="2020-03-08 16:47:59" level=debug msg="query: \nUPDATE \"public\".\"jbid_io_attr\" \nSET    bin_value_id = \n       ( \n              SELECT bin_value_id \n              FROM   jbid_attr_bin_value offset floor(random()*0) limit 1) \nWHERE  bin_value_id = ''\n" file="sql.go:549"
time="2020-03-08 16:47:59" level=fatal msg="Error when updating the foreign key for table \"public\".\"jbid_io_attr\", err: ERROR #22P02 invalid input syntax for type bigint: \"\"" file="sql.go:550"

Schema is https://github.com/prisma/database-schema-examples/blob/master/postgres/exo/schema.sql

Loop for "Fixing the Primary / Unique Key"

https://github.com/prisma/database-schema-examples/blob/master/postgres/basic-blog/schema.sql

Get this output:

mock-windows-amd64-v2.3.exe database -a localhost -w foo -f -v -d basic-blog
...
time="2020-02-28 14:22:07" level=info msg="Found 3 violation of PRIMARY KEYS, attempting to fix them" file="constraintsRestore.go:26"
time="2020-02-28 14:22:07" level=debug msg="Fixing the Primary / Unique Key" file="constraintsRestore.go:50"
time="2020-02-28 14:22:07" level=debug msg="Extracting constraint column data type info for table: \"public\".\"authors\"" file="sql.go:371"
time="2020-02-28 14:22:08" level=debug msg="Extracting the unique violations for table \"public\".\"authors\" and column id" file="sql.go:424"
time="2020-02-28 14:22:11" level=debug msg="Extracting constraint column data type info for table: \"public\".\"authors\"" file="sql.go:371"
time="2020-02-28 14:22:11" level=debug msg="Extracting the unique violations for table \"public\".\"authors\" and column id" file="sql.go:424"
time="2020-02-28 14:22:12" level=debug msg="Extracting constraint column data type info for table: \"public\".\"authors\"" file="sql.go:371"
time="2020-02-28 14:22:12" level=debug msg="Extracting the unique violations for table \"public\".\"authors\" and column id" file="sql.go:424"
time="2020-02-28 14:22:13" level=debug msg="Extracting constraint column data type info for table: \"public\".\"authors\"" file="sql.go:371"
time="2020-02-28 14:22:13" level=debug msg="Extracting the unique violations for table \"public\".\"authors\" and column id" file="sql.go:424"
time="2020-02-28 14:22:13" level=debug msg="Extracting constraint column data type info for table: \"public\".\"authors\"" file="sql.go:371"
time="2020-02-28 14:22:14" level=debug msg="Extracting the unique violations for table \"public\".\"authors\" and column id" file="sql.go:424"
time="2020-02-28 14:22:14" level=debug msg="Extracting constraint column data type info for table: \"public\".\"authors\"" file="sql.go:371"
time="2020-02-28 14:22:14" level=debug msg="Extracting the unique violations for table \"public\".\"authors\" and column id" file="sql.go:424"
time="2020-02-28 14:22:15" level=debug msg="Extracting constraint column data type info for table: \"public\".\"authors\"" file="sql.go:371"
time="2020-02-28 14:22:15" level=debug msg="Extracting the unique violations for table \"public\".\"authors\" and column id" file="sql.go:424"
time="2020-02-28 14:22:16" level=debug msg="Extracting constraint column data type info for table: \"public\".\"authors\"" file="sql.go:371"
time="2020-02-28 14:22:16" level=debug msg="Extracting the unique violations for table \"public\".\"authors\" and column id" file="sql.go:424"
time="2020-02-28 14:22:16" level=debug msg="Extracting constraint column data type info for table: \"public\".\"authors\"" file="sql.go:371"
time="2020-02-28 14:22:17" level=debug msg="Extracting the unique violations for table \"public\".\"authors\" and column id" file="sql.go:424"
...

This has been going on for multiple minutes now, so I would say there is some way this could go into a loop that never ends.

Error when execute the query to extract pk violators: ERROR #42601 syntax error at or near \"FROM\"

mock-windows-amd64-v2.4.exe database -a localhost -w foo -f -v -d discourse
...
Fixing PRIMARY KEYS violation  93% [=============================================>    ] (123/131) [8s:0s]time="2020-03-08 16:43:17" level=debug msg="Fixing the Primary / Unique Key" file="constraintsRestore.go:50"
Fixing PRIMARY KEYS violation  94% [==============================================>   ] (124/131) [8s:0s]time="2020-03-08 16:43:17" level=debug msg="Fixing the Primary / Unique Key" file="constraintsRestore.go:50"
Fixing PRIMARY KEYS violation  95% [==============================================>   ] (125/131) [8s:0s]time="2020-03-08 16:43:17" level=debug msg="Fixing the Primary / Unique Key" file="constraintsRestore.go:50"
Fixing PRIMARY KEYS violation  96% [===============================================>  ] (126/131) [8s:0s]time="2020-03-08 16:43:17" level=debug msg="Fixing the Primary / Unique Key" file="constraintsRestore.go:50"
Fixing PRIMARY KEYS violation  96% [===============================================>  ] (127/131) [8s:0s]time="2020-03-08 16:43:17" level=debug msg="Fixing the Primary / Unique Key" file="constraintsRestore.go:50"
Fixing PRIMARY KEYS violation  97% [===============================================>  ] (128/131) [8s:0s]time="2020-03-08 16:43:17" level=debug msg="Fixing the Primary / Unique Key" file="constraintsRestore.go:50"
Fixing PRIMARY KEYS violation  98% [================================================> ] (129/131) [8s:0s]time="2020-03-08 16:43:17" level=debug msg="Fixing the Primary / Unique Key" file="constraintsRestore.go:50"
Fixing PRIMARY KEYS violation  99% [================================================> ] (130/131) [8s:0s]time="2020-03-08 16:43:17" level=debug msg="Fixing the Primary / Unique Key" file="constraintsRestore.go:50"
Fixing PRIMARY KEYS violation 100% [==================================================] (131/131) [8s:0s]
time="2020-03-08 16:43:17" level=info msg="Found 238 violation of UNIQUE KEYS, attempting to fix them" file="constraintsRestore.go:26"
time="2020-03-08 16:43:17" level=debug msg="Fixing the Primary / Unique Key" file="constraintsRestore.go:50"
Fixing UNIQUE KEYS violation   0% [                                                  ] (1/238) [0s:8s]time="2020-03-08 16:43:17" level=debug msg="Fixing the Primary / Unique Key" file="constraintsRestore.go:50"
Fixing UNIQUE KEYS violation   0% [                                                  ] (2/238) [0s:10s]time="2020-03-08 16:43:18" level=debug msg="Fixing the Primary / Unique Key" file="constraintsRestore.go:50"
Fixing UNIQUE KEYS violation   1% [                                                  ] (3/238) [0s:11s]time="2020-03-08 16:43:18" level=debug msg="Fixing the Primary / Unique Key" file="constraintsRestore.go:50"
Fixing UNIQUE KEYS violation   1% [                                                  ] (4/238) [0s:11s]time="2020-03-08 16:43:18" level=debug msg="Fixing the Primary / Unique Key" file="constraintsRestore.go:50"
Fixing UNIQUE KEYS violation   2% [>                                                 ] (5/238) [0s:11s]time="2020-03-08 16:43:18" level=debug msg="Fixing the Primary / Unique Key" file="constraintsRestore.go:50"
Fixing UNIQUE KEYS violation   2% [>                                                 ] (6/238) [0s:11s]time="2020-03-08 16:43:18" level=debug msg="Fixing the Primary / Unique Key" file="constraintsRestore.go:50"
Fixing UNIQUE KEYS violation   2% [>                                                 ] (7/238) [0s:11s]time="2020-03-08 16:43:18" level=debug msg="Fixing the Primary / Unique Key" file="constraintsRestore.go:50"
time="2020-03-08 16:43:18" level=debug msg="Extracting constraint column data type info for table: \"public\".\"categories\"" file="sql.go:371"
time="2020-03-08 16:43:18" level=debug msg="Extracting the unique violations for table \"public\".\"categories\" and column email_in" file="sql.go:424"
Fixing UNIQUE KEYS violation   3% [>                                                 ] (8/238) [0s:16s]time="2020-03-08 16:43:18" level=debug msg="Fixing the Primary / Unique Key" file="constraintsRestore.go:50"

time="2020-03-08 16:43:18" level=debug msg="query: SELECT COUNT(*) FROM ( SELECT COALESCE(parent_category_id, '-1'::integer FROM \"public\".\"categories\" GROUP BY COALESCE(parent_category_id, '-1'::integer HAVING COUNT(*) > 1 ) a" file="sql.go:410"
time="2020-03-08 16:43:18" level=fatal msg="Error when execute the query to extract pk violators: ERROR #42601 syntax error at or near \"FROM\"" file="sql.go:411"

Schema is https://github.com/prisma/database-schema-examples/blob/master/postgres/discourse/schema.sql

Run all those constraints

  • Currently if it finds an error when creating constraints then it skips the rest.
  • Make improvements in running through all the constraints before error out.

Need random byte support

First of all, thanks for the great tool for generating mock data so easily.
It can generate random data for a lot of different data type.

However, for binary format data, it create random string instead of real binary data.
It would be better to generate real binary format data for 'bytea' format of postgresql.

This won't work if the table name has uppercase characters

Have a simple database with a table, named "bills" and run the standard
./mockd-mac.dms postgres -d [dbname] -t bills
and you will get all the data filled in and it works. But if your table is named Bills instead the following will happen:

Command

Run ./mockd-mac.dms postgres -d [dbname] -t Bills
OR
Run ./mockd-mac.dms postgres -d [dbname] -t "Bills"
OR
Run ./mockd-mac.dms postgres -d [dbname] -t bills

What occurred

In all cases, the error will be exactly:

Cannot extracting the column info, error from the database: pq: relation "bills" does not exist

What you expected to occur

I expected the table to get a new row.

Table or Database structure

DDL:

-- DDL generated by Postico 1.5.4
-- Not all database features are supported. Do not use for backup.

-- Table Definition ----------------------------------------------

CREATE TABLE "Bills" (
    "CPRLink" integer,
    "companyId" integer,
    "Comprobante" character varying(30) NOT NULL,
    "Agrupador" character varying(200),
    "CAENro" bigint,
    "CAEVto" character varying(10),
    "Codigo" character varying(10),
    "Nombre" character varying(255),
    "CondIVA" character varying(255),
    "CUIT" character varying(30),
    "Domicilio" character varying(255),
    "Localidad" character varying(255),
    "Provincia" character varying(255),
    "Fecha" timestamp with time zone,
    "FechaVenc" timestamp with time zone,
    "SaldoAnterior" character varying(255),
    "TotalSIVA" character varying(255),
    "IVA" character varying(255),
    "DGR" character varying(255),
    notified boolean NOT NULL DEFAULT false,
    "Total" character varying(255),
    "PagoMinimo" character varying(255),
    "createdAt" timestamp with time zone DEFAULT 'now'::text::timestamp(3) with time zone,
    "updatedAt" timestamp with time zone DEFAULT 'now'::text::timestamp(3) with time zone,
    CONSTRAINT bills_pkey PRIMARY KEY ("CPRLink", "companyId")
);

-- Indices -------------------------------------------------------

CREATE UNIQUE INDEX bills_pkey ON "Bills"("CPRLink" int4_ops,"companyId" int4_ops);

MockD Version

v1.3

Database Details

Postgres 10

Platform Details

OS X Mojave

Any other relevant information

Error during committing data: ERROR #54000 index row requires 828856 bytes, maximum size is 8191

Ok, this is a strange one:

mock-windows-amd64-v2.4.exe database -a localhost -w foo -f -v -d gitlab
...
7 148 167 33 67 144 136 252 232 163 164 136 0 178 186 157 232 105 251 53 155 27 27 63 104 30 77 67 212 150 66 6 94 5 251 78 21 119 42 197 158 178 36 254 137 22 194 54 130 18 245 123 27 151 206 49 160 30 202 158 155 86 32 205 93 123 50 118 203 71 108 249 50 165 160 86 18 114 180 224 107 86 31 231 125 71 117 138 145 234 42 196 3 88 53 16 109 238 49 182 19 140 53 32 20 37 89 189 122 176 102 127 38 178 195 232 15 238 240 193 45 240 190 159 9 36 118 223 99 152 141 34 51 72 119 144 243 63 42 199 230 207 160 117 254 224 186 231 159 42 91 64 154 92 89 172 90 172 160 41 56 242 77 214 229 100 30 149 211 179 201 97 51 10 115 149 90 206 151 252 104 201 199 164 20 151 171 115 103 21 168 190 218 211 220 80 3 125 200 245 155 243 149 43 226 192 81 91 36 235 231 63 6 193 69 75 148 106 54 198 58 142 115 24 83 99 228 47 246 176 111 192 59 84 185 240 14 79 1 212 184 243 18 162 16 134 81 42 161 38 102 129 151 179 89 105 79 242 38 200 69 199 70 6 243 15 151 95 178 213 103 78 254 20 119 84 44 113 156 234 245 195 148 253 150 252 121 155 38 45 32 73 36 105 175 57 186 196 212 69 183 164 92 200 104 76 137 177 141 23 17 156 83 161 40 79 130 226 103 147 195 189 246 174 199 162 141 89 83 147 127 63 236 196 122 133 72 86 177 170 136 200 80 245 109 142 213 7 76 73 103 208 13 220 247 170 251 167 149 161 191 243 162 40 162 112 171 51 37 235 120 130 180 41 224 216 164 154 254 107 154 51 118 136 209 78 152 35 1 55 33 143 193 98 37 80 117 177 176 123 182 169 202 164 98 114 47 172 20 49 14 118 249 102 109 6 44 141 235 218 29 104 231 91 245 164 86 165 179 72 243 135 84 57 157 46 247 17 21 133 231 61 226 117 209 252 133 66 4 154 5 104 7 189 55 8 253 28 62 0 90 232 13 35 145 158 107 84 97 66 231 143 200 111 159 159 42 198 146 11 45 179 80 177 15 101 107 70 107 59 189 71 93 156 109 248 1 36 0 86 202 165 63 48 194 113 69 222 61 78 32 215 194 212 157 40 15 26 90 200 71 239 213 143 179 18 245 116 18 194 159 225 132 18 139 121 236 40 233 108 100 229 190 87 18 208 90 51 185 75 246 4 127 172 202 240 27 46 95 203 201 207 215 131 243 214 98 31 13 11 132 32 98 152 183 11 102 179 235 242 230 4 69 231 58 201 239 9 229 6 177 21 8 178 204 22 38 246 160 236 197 91 68 254 210 30 73 72 26 111 246 245 60 18 70 185 26 145 151 213 57 7 102 207 58 9 146 147 70 151 103 125 63 141 182 120 190 229 245 10 184 34 185 142 250 222 110 128 139 72 154 8 130 94 233 121 154 199 74 51 187 80 231 65 173 13 1 192 167 21 128 15 119 233 32 22 108 79 236 98 82 52 8 32 233 174 199 217 219 75 244 105 35 19 243 121 71 32 106 216 125 232 216 97 119 6 240 176 186 46 50 168 43 193 122 93 39 184 251 43 116 72 132 20 88 247 127 227 121 188 187 199 163 81 72 239 188 159 64 159 156 217 82 92 79 115 183 7 111 74 188 145 235 231 28 112 92 233 165 6 34 196 104 152 243 253 69 38 108 206 250 101 58 232 186 20 228 141 211 247 232 48 228 249 38 91 81 6 241 86 63 237 223 115 100 61 165 219 209 208 72 111 19 162 96 78 135 167 110 131 210 204 46 53 66 226 67 122 143 224 244 126 22 11 237 181 242 5 0 14 197 50 48 47 127 207 52 226 24 30 115 198 124 146 238 99 236 240 0 247 87 251 248 183 47 103 141 161 203 8 61 63 239 128 9 174 124 18 94 109 124 149 252 93 186 246 212 59 235 72 92 146 196 163 230 88 124 188 125 175 144 47 82 179 162 140 125 217 210 182 125 245 208 161 67 147 83 111 156 155 174 222 213 66 84 71 37 140 123 193 34 52 23 156 234 233 241 173 55 17 119 145 85 73 169 187 85 173 203 109 134 35 154 200 228 42 148 169 95 189 70 218 112 167 60 84 233 208 127 212 55 83 117 240 145 56 52 179 237 234 73 13 201 42 156 254 77 111 136 37 89 156 134 86 68 42 46 22 145 157 65 206 121 141 108 5 202 248 136 192 70 158 14 50 121 85 205 127 25 7 195 34 145 76 6 102 141 94 233 177 236 221 208 232 159 88 195 184 216 69 70 28 170 248 233 28 224 232 6 153 95 10 252 242 246 206 238 163 208 200 3 37 245 110 242 105 149 43 68 88 67 169 222 61 11 158 242 191 39 50 0 100 111 51 195 244 100 72 94 208 23 142 35 125 148 192 64 238 23 20 171 159 197 96 197 1 71 172 252 81 33 110 8 71 87 175 5 74 244 116 20 219 16 184 38 185 97 15 60 176 197 157 33 230 150 211 0 245 88 99 49 254 26 51 179 3 68 40 144 2 164 233 103 106 61 230 74 158 92 19 18 126 152 55 69 253 111 93 220 252 105 72 33 44 220 50 127 236 93 212 94 70 13 224 21 93 45 71 180 181 8 85 39 149 147 66 54 186 203 107 243 54 12 146 188 124 163 29 0 250 97 132 40 158 137 246 55 111 23 153 172 159 140 207 234 181 57 220 32 81 59 165 119 96 109 9 253 117 219 207 161 58 94 201 103 187 8 248 182 115 193 165 226 136 243 192 179 85 161 8 125 4 4 72 156 146 30 94 50 176 116 124 24 92 151 196 193 167 86 179 186 181 206 199 95 54 198 250 228 70 105 57 30 48 114 126 46 216 155 21 254 84 224 180 55 173 53 148 66 102 204 77 62 14 61 149 81 104 6 186 74 125 31 208 59 184 34 168 120 26 229 75 38 43 222 241 154 231 49 153 64 156 208 66 141 88 249 71 102 151 144 238 161 60 131 47 82 224 78 183 37 173 69 78 21 19 200 208 209 171 214 51 132 9 138 235 230 104 69 175 196 113 206 103 148 116 22 209 22 64 178 175 8 248 105 99 176 15 234 197 10 99 139 151 36 146 61 213 194 96 232 188 161 87 219 236 5 123 241 87 75 240 207 45 145 85 237 144 180 121 211 30 246 213 248 41 24 59 125 133 105 203 178 93 205 33 58 163 228 48 28 221 36 19 41 38 126 8 164 169 90 163 152 117 70 39 14 107 190 48 241 250 210 130 215 215 154 250 188 20 158 137 41 93 151 134 139 133 12 179 77 209 16 2 218 247 152 72 199 125 1 135 42 184 225 117 17 126 184 80 168 253 93 31 20 49 0 228 49 89 155 121 8 21 22 128 163 35 159 10 152 245 207 163 16 0 137 191 198 180 251 157 27 230 169 207 109 142 87 150 241 127 111 16 227 154 53 229 216 98 68 202 112 125 98 253 110 184 216 159 129 87 105 104 37 97 10 237 128 171 6 211 159 2 129 45 248 6 35 27 18 162 58 24 109 40 245 149 212 40 254 60 69 20 224 184 73 32 65 148 117 158 159 139 22 216 4 84 246 136 248 224 109 221 111 186 68 72 209 100 45 85 158 50 139 175 1 2 112 154 186 113 131 26 236 221 205 80 8 18 224 48 204 166 90 212 128 116 253 20 69 140 143 161 211 216 193 236 137 38 253 221 47 31 15 208 112 230 187 28 19 77 254 219 251 72 9 91 208 244 47 181 76 176 185 46 254 41 99 145 14 200 185 147 13 14 233 165 72 221 28 195 134 48 247 48 46 239 16 193 234 187 223 33 167 25 135 61 129 142 64 202 100 187 50 213 166 140 69 47 82 85 4 242 112 171 229 137 87 53 46 239 150 98 50 186 223 187 239 243 240 200 155 152 113 109 21 109 119 177 128 14 124 112 228 7 181 76 190 177 42 149 3 168 107 59 243 241 119 14 70 197 182 200 193 60 202 31 85 74 56 179 77 78 177 155 15 4 181 150 82 132 50 32 187 154 97 139 84 149 173 96 13 168 238 6 42 17 185 194 54 196 152 252 40 17 79 158 36 229 153 70 41 0 77 196 57 71 27 231 183 232 231 15 205 86 244 67 211 92 14 150 220 70 120 220 159 235 172 122 93 114 187 157 27 247 69 213 180 224 251 88 89 182 70 117 63 81 15 82 28 87 190 191 91 209 37 88 244 226 248 68 98 91 174 186 71 138 4 225 55 39 199 112 7 198 128 57 43 140 95 196 39 50 24 82 225 37 210 160 196 58 76 103 53 135 188 57 164 104 24 104 152 25 198 97 185 206 236 66 42 201 117 141 148 102 242 13 56 171 152 85 36 1 22 155 231 94 220 195 120 120 37 215 154 12 64 100 193 238 46 82 202 131 44 204 224 189 162 253 87 36 182 2 141 117 225 91 73 15 182 106 241 113 90 207 130 187 184 51 164 232 65 16 44 71 83 90 104 136 96 51 162 51 235 136 186 125 43 175 233 2 200 95 90 80 145 196 12 140 68 239 90 24 201 250 118 206 210 232 42 140 83]$tenetur dolore hic at excepturi. et numquam blanditiis quia molestiae rerum aut fugit eaque. molestiae animi ut ipsam ea aut. et quam ut omnis cum. vel adipisci dolores sit eius dolor. cumque alias nihil quis sit a amet ducimus temporibus.\tut quia et eius et vel nobis. accusantium ex ut qui ut. earum voluptatum quasi molestiae vel officia. nihil odit odit aut illum pariatur ipsa vel. blanditiis eveniet porro accusantium! error nostrum beatae perferendis ex est! similique et temporibus quidem alias dolores. minus vel nihil debitis impedit facilis rem aut aut.\tsapiente rem et sunt quam voluptatem. eum iste tenetur eum ut ut consequatur doloribus nihil. dolor sunt eum dicta est id. illum laborum vero ut. eius totam et pariatur qui aut ea adipisci. quis et facere ipsum non ratione. quis architecto odit quis quibusdam quod consequatur! asperiores ut aut ullam quaerat.$molestiae reiciendis nisi eaque repellat!$-2236$5158206" file="worker.go:170"
time="2020-03-08 16:50:37" level=fatal msg="Error during committing data: ERROR #54000 index row requires 828856 bytes, maximum size is 8191" file="worker.go:171"

Schema is https://github.com/prisma/database-schema-examples/blob/master/postgres/gitlab/schema.sql

(Output is unfortunately to long for my terminal, so I can not post more context here.)

Error when updating the foreign key for table \"public\".\"baseball_action_pitches\", err: ERROR #22P02 invalid input syntax for type integer: \"\"

mock-windows-amd64-v2.4.exe database -a localhost -w foo -f -v -d sportsdb
...
Fixing FOREIGN KEYS violation   6% [==>                                               ] (9/137) [5s:1m21s]time="2020-03-08 19:22:36" level=debug msg="Fixing the Primary / Unique Key" file="constraintsRestore.go:99"
time="2020-03-08 19:22:36" level=debug msg="Checking / Fixing FOREIGN KEY Violation table: \"public\".\"affiliations_events\", column: event_id, reference: events(id)" file="constraintsRestore.go:109"
time="2020-03-08 19:22:36" level=debug msg="Extracting the foreign violations for table \"public\".\"affiliations_events\" and column events" file="sql.go:517"
Fixing FOREIGN KEYS violation   7% [==>                                               ] (10/137) [6s:1m22s]time="2020-03-08 19:22:37" level=debug msg="Fixing the Primary / Unique Key" file="constraintsRestore.go:99"
time="2020-03-08 19:22:37" level=debug msg="Checking / Fixing FOREIGN KEY Violation table: \"public\".\"affiliations_media\", column: affiliation_id, reference: affiliations(id)" file="constraintsRestore.go:109"
time="2020-03-08 19:22:37" level=debug msg="Extracting the foreign violations for table \"public\".\"affiliations_media\" and column affiliations" file="sql.go:517"
Fixing FOREIGN KEYS violation   8% [===>                                              ] (11/137) [7s:1m19s]time="2020-03-08 19:22:37" level=debug msg="Fixing the Primary / Unique Key" file="constraintsRestore.go:99"
time="2020-03-08 19:22:37" level=debug msg="Checking / Fixing FOREIGN KEY Violation table: \"public\".\"affiliations_media\", column: media_id, reference: media(id)" file="constraintsRestore.go:109"
time="2020-03-08 19:22:38" level=debug msg="Extracting the foreign violations for table \"public\".\"affiliations_media\" and column media" file="sql.go:517"
Fixing FOREIGN KEYS violation   8% [===>                                              ] (12/137) [7s:1m21s]time="2020-03-08 19:22:38" level=debug msg="Fixing the Primary / Unique Key" file="constraintsRestore.go:99"
time="2020-03-08 19:22:38" level=debug msg="Checking / Fixing FOREIGN KEY Violation table: \"public\".\"american_football_action_participants\", column: american_football_action_play_id, reference: american_football_action_plays(id)" file="constraintsRestore.go:109"
time="2020-03-08 19:22:38" level=debug msg="Extracting the foreign violations for table \"public\".\"american_football_action_participants\" and column american_football_action_plays" file="sql.go:517"
Fixing FOREIGN KEYS violation   9% [===>                                              ] (13/137) [8s:1m21s]time="2020-03-08 19:22:39" level=debug msg="Fixing the Primary / Unique Key" file="constraintsRestore.go:99"
time="2020-03-08 19:22:39" level=debug msg="Checking / Fixing FOREIGN KEY Violation table: \"public\".\"american_football_action_participants\", column: person_id, reference: persons(id)" file="constraintsRestore.go:109"
time="2020-03-08 19:22:39" level=debug msg="Extracting the foreign violations for table \"public\".\"american_football_action_participants\" and column persons" file="sql.go:517"
Fixing FOREIGN KEYS violation  10% [====>                                             ] (14/137) [9s:1m19s]time="2020-03-08 19:22:39" level=debug msg="Fixing the Primary / Unique Key" file="constraintsRestore.go:99"
time="2020-03-08 19:22:39" level=debug msg="Checking / Fixing FOREIGN KEY Violation table: \"public\".\"american_football_action_plays\", column: american_football_event_state_id, reference: american_football_event_states(id)" file="constraintsRestore.go:109"
time="2020-03-08 19:22:40" level=debug msg="Extracting the foreign violations for table \"public\".\"american_football_action_plays\" and column american_football_event_states" file="sql.go:517"
Fixing FOREIGN KEYS violation  10% [====>                                             ] (15/137) [9s:1m19s]time="2020-03-08 19:22:40" level=debug msg="Fixing the Primary / Unique Key" file="constraintsRestore.go:99"
time="2020-03-08 19:22:40" level=debug msg="Checking / Fixing FOREIGN KEY Violation table: \"public\".\"american_football_event_states\", column: team_in_possession_id, reference: teams(id)" file="constraintsRestore.go:109"
time="2020-03-08 19:22:40" level=debug msg="Extracting the foreign violations for table \"public\".\"american_football_event_states\" and column teams" file="sql.go:517"
Fixing FOREIGN KEYS violation  11% [====>                                             ] (16/137) [10s:1m19s]time="2020-03-08 19:22:41" level=debug msg="Fixing the Primary / Unique Key" file="constraintsRestore.go:99"
time="2020-03-08 19:22:41" level=debug msg="Checking / Fixing FOREIGN KEY Violation table: \"public\".\"american_football_event_states\", column: event_id, reference: events(id)" file="constraintsRestore.go:109"
time="2020-03-08 19:22:41" level=debug msg="Extracting the foreign violations for table \"public\".\"american_football_event_states\" and column events" file="sql.go:517"
Fixing FOREIGN KEYS violation  12% [=====>                                            ] (17/137) [11s:1m19s]time="2020-03-08 19:22:42" level=debug msg="Fixing the Primary / Unique Key" file="constraintsRestore.go:99"
time="2020-03-08 19:22:42" level=debug msg="Checking / Fixing FOREIGN KEY Violation table: \"public\".\"baseball_action_contact_details\", column: baseball_action_pitch_id, reference: baseball_action_pitches(id)" file="constraintsRestore.go:109"
time="2020-03-08 19:22:42" level=debug msg="Extracting the foreign violations for table \"public\".\"baseball_action_contact_details\" and column baseball_action_pitches" file="sql.go:517"
Fixing FOREIGN KEYS violation  13% [=====>                                            ] (18/137) [12s:1m21s]time="2020-03-08 19:22:42" level=debug msg="Fixing the Primary / Unique Key" file="constraintsRestore.go:99"
time="2020-03-08 19:22:42" level=debug msg="Checking / Fixing FOREIGN KEY Violation table: \"public\".\"baseball_action_pitches\", column: baseball_action_play_id, reference: baseball_action_plays(id)" file="constraintsRestore.go:109"
time="2020-03-08 19:22:43" level=debug msg="Extracting the foreign violations for table \"public\".\"baseball_action_pitches\" and column baseball_action_plays" file="sql.go:517"
Fixing FOREIGN KEYS violation  13% [=====>                                            ] (19/137) [12s:1m21s]time="2020-03-08 19:22:43" level=debug msg="Fixing the Primary / Unique Key" file="constraintsRestore.go:99"
time="2020-03-08 19:22:43" level=debug msg="Checking / Fixing FOREIGN KEY Violation table: \"public\".\"baseball_action_pitches\", column: baseball_defensive_group_id, reference: baseball_defensive_group(id)" file="constraintsRestore.go:109"
time="2020-03-08 19:22:43" level=debug msg="Extracting the foreign violations for table \"public\".\"baseball_action_pitches\" and column baseball_defensive_group" file="sql.go:517"
time="2020-03-08 19:22:44" level=debug msg="Extracting the foreign violations for table \"public\".\"baseball_action_pitches\" and column baseball_defensive_group" file="sql.go:517"

time="2020-03-08 19:22:44" level=debug msg="query: \nUPDATE \"public\".\"baseball_action_pitches\" \nSET    baseball_defensive_group_id = \n       ( \n              SELECT id \n              FROM   baseball_defensive_group offset floor(random()*0) limit 1) \nWHERE  baseball_defensive_group_id = ''\n" file="sql.go:549"
time="2020-03-08 19:22:44" level=fatal msg="Error when updating the foreign key for table \"public\".\"baseball_action_pitches\", err: ERROR #22P02 invalid input syntax for type integer: \"\"" file="sql.go:550"

Schema: https://github.com/prisma/database-schema-examples/blob/master/postgres/sportsdb/schema.sql

Error during committing data: ERROR #42883 function periode_exist(text, integer) does not exist

mock-windows-amd64-v2.4.exe database -a localhost -w foo -f -v -d noalyss-folder
...
time="2020-03-08 19:00:12" level=debug msg="Removing constraints for table: \"public\".\"profile_sec_repository\"" file="constraintsBackup.go:96"
time="2020-03-08 19:00:12" level=debug msg="Extracting constraint info for table: \"public\".\"profile_sec_repository\"" file="sql.go:314"
Mocking Table "public"."profile_sec_repository" 100% [==================================================] (10/10) [0s:0s]
time="2020-03-08 19:00:12" level=debug msg="Removing constraints for table: \"public\".\"quant_purchase\"" file="constraintsBackup.go:96"
time="2020-03-08 19:00:12" level=debug msg="Extracting constraint info for table: \"public\".\"quant_purchase\"" file="sql.go:314"
Mocking Table "public"."quant_purchase" 100% [==================================================] (10/10) [0s:0s]
time="2020-03-08 19:00:13" level=debug msg="Removing constraints for table: \"public\".\"profile\"" file="constraintsBackup.go:96"
time="2020-03-08 19:00:13" level=debug msg="Extracting constraint info for table: \"public\".\"profile\"" file="sql.go:314"
Mocking Table "public"."profile" 100% [==================================================] (10/10) [0s:0s]
time="2020-03-08 19:00:13" level=debug msg="Removing constraints for table: \"public\".\"plan_analytique\"" file="constraintsBackup.go:96"
time="2020-03-08 19:00:13" level=debug msg="Extracting constraint info for table: \"public\".\"plan_analytique\"" file="sql.go:314"
Mocking Table "public"."plan_analytique" 100% [==================================================] (10/10) [0s:0s]
time="2020-03-08 19:00:14" level=debug msg="Removing constraints for table: \"public\".\"parm_periode\"" file="constraintsBackup.go:96"
time="2020-03-08 19:00:14" level=debug msg="Extracting constraint info for table: \"public\".\"parm_periode\"" file="sql.go:314"

time="2020-03-08 19:00:14" level=debug msg="Table: \"public\".\"parm_periode\"" file="worker.go:168"
time="2020-03-08 19:00:14" level=debug msg="Copy Statement: COPY \"public\".\"parm_periode\"(\"p_start\",\"p_end\",\"p_exercice\",\"p_closed\",\"p_central\") FROM STDIN WITH CSV DELIMITER '$' QUOTE e'\\x01'" file="worker.go:169"
time="2020-03-08 19:00:14" level=debug msg="Data: 2012-05-11$2014-12-06$aliquid quo debitis iusto quaerat eveniet quasi aut. deserunt facilis ad ea aut pariatur ut! at dolor iusto mollitia voluptas ea. at in ut rerum. omnis itaque ut consequatur necessitatibus sint. expedita sunt ad. dolor eum accusantium fugit architecto dolorum. tempore nesciunt qui facilis ipsam voluptatem aut non.\tomnis non quaerat maxime explicabo quos id. culpa ut consectetur. nobis necessitatibus suscipit ab voluptate sunt explicabo dolores ut vitae. mollitia veritatis aliquam debitis molestias inventore rerum laborum nesciunt. sed quidem eius. quos maxime voluptate ut dolores ipsum voluptatem distinctio aut.$true$true" file="worker.go:170"
time="2020-03-08 19:00:14" level=fatal msg="Error during committing data: ERROR #42883 function periode_exist(text, integer) does not exist" file="worker.go:171"

Schema: https://github.com/prisma/database-schema-examples/blob/master/postgres/noalyss-folder/schema.sql

Can't install: `no such file or directory`

Command

./mockd-mac postgres -help

What occurred

I'm in the desktop folder where the mockd-mac file is located. Somehow it is unable to find it.

desktop$ sudo ./mockd-mac postgres --help
Password:
sudo: ./mockd-mac: command not found
desktop$ bin/mockd-mac postgres -help
-bash: bin/mockd-mac: No such file or directory

What you expected to occur

To return help menu.

mock can't connect to db - dial tcp 127.0.0.1:5432: connect: connection refused

I verified that connection actually works fine:

pg_isready -d postgres -h localhost -p 5432 -U postgres:postgres
localhost:5432 - accepting connections

But mock returns an error:

mock tables -t 'table' -a localhost -d postgres -w password -p 5432 -u postgres
FATA[2023-10-25 14:47:07] Encountered error when connecting to the database, err: dial tcp 127.0.0.1:5432: connect: connection refused

mock tables -t 'table' --uri="postgres://postgres:postgres@localhost:5432/postgres"
FATA[2023-10-25 14:47:19] Encountered error when connecting to the database, err: dial tcp 127.0.0.1:5432: connect: connection refused

SSL mode verify-ca not supported

I was trying to connect to my remote server. with --uri command

--uri postgres://uname:pwd@localhost:port/db?ssl=true&sslmode=verify-ca&sslrootcert=localpathtosslca

at first it says err: pg: options other than 'sslmode' and 'application_name' are not supported

then i removed ssl=true&, if says err: pg: sslmode 'verify-ca' is not supported

So is it really not a valid feature in this tool? since go-pg seems support it. thanks.

Data generation fails with mixed upper/lowercase table and column names, succeeds with all lowercase

I have two databases, one is the original schema, and the other one is the same schema with all lowercased table and columns names (actuially: whole file):

original:

-- https://github.com/lerocha/chinook-database/wiki/Chinook-Schema

/*******************************************************************************
 Chinook Database - Version 1.4
 Script: Chinook_PostgreSql.sql
 Description: Creates and populates the Chinook database.
 DB Server: PostgreSql
 Author: Luis Rocha
 License: http://www.codeplex.com/ChinookDatabase/license
********************************************************************************/
/*******************************************************************************
 Create Tables
********************************************************************************/
CREATE TABLE "Album"
(
  "AlbumId" INT NOT NULL,
  "Title" VARCHAR(160) NOT NULL,
  "ArtistId" INT NOT NULL,
  CONSTRAINT "PK_Album" PRIMARY KEY  ("AlbumId")
);

CREATE TABLE "Artist"
(
  "ArtistId" INT NOT NULL,
  "Name" VARCHAR(120),
  CONSTRAINT "PK_Artist" PRIMARY KEY  ("ArtistId")
);

CREATE TABLE "Customer"
(
  "CustomerId" INT NOT NULL,
  "FirstName" VARCHAR(40) NOT NULL,
  "LastName" VARCHAR(20) NOT NULL,
  "Company" VARCHAR(80),
  "Address" VARCHAR(70),
  "City" VARCHAR(40),
  "State" VARCHAR(40),
  "Country" VARCHAR(40),
  "PostalCode" VARCHAR(10),
  "Phone" VARCHAR(24),
  "Fax" VARCHAR(24),
  "Email" VARCHAR(60) NOT NULL,
  "SupportRepId" INT,
  CONSTRAINT "PK_Customer" PRIMARY KEY  ("CustomerId")
);

CREATE TABLE "Employee"
(
  "EmployeeId" INT NOT NULL,
  "LastName" VARCHAR(20) NOT NULL,
  "FirstName" VARCHAR(20) NOT NULL,
  "Title" VARCHAR(30),
  "ReportsTo" INT,
  "BirthDate" TIMESTAMP,
  "HireDate" TIMESTAMP,
  "Address" VARCHAR(70),
  "City" VARCHAR(40),
  "State" VARCHAR(40),
  "Country" VARCHAR(40),
  "PostalCode" VARCHAR(10),
  "Phone" VARCHAR(24),
  "Fax" VARCHAR(24),
  "Email" VARCHAR(60),
  CONSTRAINT "PK_Employee" PRIMARY KEY  ("EmployeeId")
);

CREATE TABLE "Genre"
(
  "GenreId" INT NOT NULL,
  "Name" VARCHAR(120),
  CONSTRAINT "PK_Genre" PRIMARY KEY  ("GenreId")
);

CREATE TABLE "Invoice"
(
  "InvoiceId" INT NOT NULL,
  "CustomerId" INT NOT NULL,
  "InvoiceDate" TIMESTAMP NOT NULL,
  "BillingAddress" VARCHAR(70),
  "BillingCity" VARCHAR(40),
  "BillingState" VARCHAR(40),
  "BillingCountry" VARCHAR(40),
  "BillingPostalCode" VARCHAR(10),
  "Total" NUMERIC(10,2) NOT NULL,
  CONSTRAINT "PK_Invoice" PRIMARY KEY  ("InvoiceId")
);

CREATE TABLE "InvoiceLine"
(
  "InvoiceLineId" INT NOT NULL,
  "InvoiceId" INT NOT NULL,
  "TrackId" INT NOT NULL,
  "UnitPrice" NUMERIC(10,2) NOT NULL,
  "Quantity" INT NOT NULL,
  CONSTRAINT "PK_InvoiceLine" PRIMARY KEY  ("InvoiceLineId")
);

CREATE TABLE "MediaType"
(
  "MediaTypeId" INT NOT NULL,
  "Name" VARCHAR(120),
  CONSTRAINT "PK_MediaType" PRIMARY KEY  ("MediaTypeId")
);

CREATE TABLE "Playlist"
(
  "PlaylistId" INT NOT NULL,
  "Name" VARCHAR(120),
  CONSTRAINT "PK_Playlist" PRIMARY KEY  ("PlaylistId")
);

CREATE TABLE "PlaylistTrack"
(
  "PlaylistId" INT NOT NULL,
  "TrackId" INT NOT NULL,
  CONSTRAINT "PK_PlaylistTrack" PRIMARY KEY  ("PlaylistId", "TrackId")
);

CREATE TABLE "Track"
(
  "TrackId" INT NOT NULL,
  "Name" VARCHAR(200) NOT NULL,
  "AlbumId" INT,
  "MediaTypeId" INT NOT NULL,
  "GenreId" INT,
  "Composer" VARCHAR(220),
  "Milliseconds" INT NOT NULL,
  "Bytes" INT,
  "UnitPrice" NUMERIC(10,2) NOT NULL,
  CONSTRAINT "PK_Track" PRIMARY KEY  ("TrackId")
);
/*******************************************************************************
 Create Primary Key Unique Indexes
********************************************************************************/
/*******************************************************************************
 Create Foreign Keys
********************************************************************************/
ALTER TABLE "Album" ADD CONSTRAINT "FK_AlbumArtistId"
  FOREIGN KEY ("ArtistId") REFERENCES "Artist" ("ArtistId") ON DELETE NO ACTION ON UPDATE NO ACTION;
CREATE INDEX "IFK_AlbumArtistId" ON "Album" ("ArtistId");

ALTER TABLE "Customer" ADD CONSTRAINT "FK_CustomerSupportRepId"
  FOREIGN KEY ("SupportRepId") REFERENCES "Employee" ("EmployeeId") ON DELETE NO ACTION ON UPDATE NO ACTION;
CREATE INDEX "IFK_CustomerSupportRepId" ON "Customer" ("SupportRepId");

ALTER TABLE "Employee" ADD CONSTRAINT "FK_EmployeeReportsTo"
  FOREIGN KEY ("ReportsTo") REFERENCES "Employee" ("EmployeeId") ON DELETE NO ACTION ON UPDATE NO ACTION;
CREATE INDEX "IFK_EmployeeReportsTo" ON "Employee" ("ReportsTo");

ALTER TABLE "Invoice" ADD CONSTRAINT "FK_InvoiceCustomerId"
  FOREIGN KEY ("CustomerId") REFERENCES "Customer" ("CustomerId") ON DELETE NO ACTION ON UPDATE NO ACTION;
CREATE INDEX "IFK_InvoiceCustomerId" ON "Invoice" ("CustomerId");

ALTER TABLE "InvoiceLine" ADD CONSTRAINT "FK_InvoiceLineInvoiceId"
  FOREIGN KEY ("InvoiceId") REFERENCES "Invoice" ("InvoiceId") ON DELETE NO ACTION ON UPDATE NO ACTION;
CREATE INDEX "IFK_InvoiceLineInvoiceId" ON "InvoiceLine" ("InvoiceId");

ALTER TABLE "InvoiceLine" ADD CONSTRAINT "FK_InvoiceLineTrackId"
  FOREIGN KEY ("TrackId") REFERENCES "Track" ("TrackId") ON DELETE NO ACTION ON UPDATE NO ACTION;
CREATE INDEX "IFK_InvoiceLineTrackId" ON "InvoiceLine" ("TrackId");

ALTER TABLE "PlaylistTrack" ADD CONSTRAINT "FK_PlaylistTrackPlaylistId"
  FOREIGN KEY ("PlaylistId") REFERENCES "Playlist" ("PlaylistId") ON DELETE NO ACTION ON UPDATE NO ACTION;
ALTER TABLE "PlaylistTrack" ADD CONSTRAINT "FK_PlaylistTrackTrackId"
  FOREIGN KEY ("TrackId") REFERENCES "Track" ("TrackId") ON DELETE NO ACTION ON UPDATE NO ACTION;
CREATE INDEX "IFK_PlaylistTrackTrackId" ON "PlaylistTrack" ("TrackId");

ALTER TABLE "Track" ADD CONSTRAINT "FK_TrackAlbumId"
  FOREIGN KEY ("AlbumId") REFERENCES "Album" ("AlbumId") ON DELETE NO ACTION ON UPDATE NO ACTION;
CREATE INDEX "IFK_TrackAlbumId" ON "Track" ("AlbumId");

ALTER TABLE "Track" ADD CONSTRAINT "FK_TrackGenreId"
  FOREIGN KEY ("GenreId") REFERENCES "Genre" ("GenreId") ON DELETE NO ACTION ON UPDATE NO ACTION;
CREATE INDEX "IFK_TrackGenreId" ON "Track" ("GenreId");

ALTER TABLE "Track" ADD CONSTRAINT "FK_TrackMediaTypeId"
  FOREIGN KEY ("MediaTypeId") REFERENCES "MediaType" ("MediaTypeId") ON DELETE NO ACTION ON UPDATE NO ACTION;
CREATE INDEX "IFK_TrackMediaTypeId" ON "Track" ("MediaTypeId");

lowercased:

-- https://github.com/lerocha/chinook-database/wiki/chinook-schema

/*******************************************************************************
 chinook database - version 1.4
 script: chinook_postgresql.sql
 description: creates and populates the chinook database.
 db server: postgresql
 author: luis rocha
 license: http://www.codeplex.com/chinookdatabase/license
********************************************************************************/
/*******************************************************************************
 create tables
********************************************************************************/
create table "album"
(
  "albumid" int not null,
  "title" varchar(160) not null,
  "artistid" int not null,
  constraint "pk_album" primary key  ("albumid")
);

create table "artist"
(
  "artistid" int not null,
  "name" varchar(120),
  constraint "pk_artist" primary key  ("artistid")
);

create table "customer"
(
  "customerid" int not null,
  "firstname" varchar(40) not null,
  "lastname" varchar(20) not null,
  "company" varchar(80),
  "address" varchar(70),
  "city" varchar(40),
  "state" varchar(40),
  "country" varchar(40),
  "postalcode" varchar(10),
  "phone" varchar(24),
  "fax" varchar(24),
  "email" varchar(60) not null,
  "supportrepid" int,
  constraint "pk_customer" primary key  ("customerid")
);

create table "employee"
(
  "employeeid" int not null,
  "lastname" varchar(20) not null,
  "firstname" varchar(20) not null,
  "title" varchar(30),
  "reportsto" int,
  "birthdate" timestamp,
  "hiredate" timestamp,
  "address" varchar(70),
  "city" varchar(40),
  "state" varchar(40),
  "country" varchar(40),
  "postalcode" varchar(10),
  "phone" varchar(24),
  "fax" varchar(24),
  "email" varchar(60),
  constraint "pk_employee" primary key  ("employeeid")
);

create table "genre"
(
  "genreid" int not null,
  "name" varchar(120),
  constraint "pk_genre" primary key  ("genreid")
);

create table "invoice"
(
  "invoiceid" int not null,
  "customerid" int not null,
  "invoicedate" timestamp not null,
  "billingaddress" varchar(70),
  "billingcity" varchar(40),
  "billingstate" varchar(40),
  "billingcountry" varchar(40),
  "billingpostalcode" varchar(10),
  "total" numeric(10,2) not null,
  constraint "pk_invoice" primary key  ("invoiceid")
);

create table "invoiceline"
(
  "invoicelineid" int not null,
  "invoiceid" int not null,
  "trackid" int not null,
  "unitprice" numeric(10,2) not null,
  "quantity" int not null,
  constraint "pk_invoiceline" primary key  ("invoicelineid")
);

create table "mediatype"
(
  "mediatypeid" int not null,
  "name" varchar(120),
  constraint "pk_mediatype" primary key  ("mediatypeid")
);

create table "playlist"
(
  "playlistid" int not null,
  "name" varchar(120),
  constraint "pk_playlist" primary key  ("playlistid")
);

create table "playlisttrack"
(
  "playlistid" int not null,
  "trackid" int not null,
  constraint "pk_playlisttrack" primary key  ("playlistid", "trackid")
);

create table "track"
(
  "trackid" int not null,
  "name" varchar(200) not null,
  "albumid" int,
  "mediatypeid" int not null,
  "genreid" int,
  "composer" varchar(220),
  "milliseconds" int not null,
  "bytes" int,
  "unitprice" numeric(10,2) not null,
  constraint "pk_track" primary key  ("trackid")
);
/*******************************************************************************
 create primary key unique indexes
********************************************************************************/
/*******************************************************************************
 create foreign keys
********************************************************************************/
alter table "album" add constraint "fk_albumartistid"
  foreign key ("artistid") references "artist" ("artistid") on delete no action on update no action;
create index "ifk_albumartistid" on "album" ("artistid");

alter table "customer" add constraint "fk_customersupportrepid"
  foreign key ("supportrepid") references "employee" ("employeeid") on delete no action on update no action;
create index "ifk_customersupportrepid" on "customer" ("supportrepid");

alter table "employee" add constraint "fk_employeereportsto"
  foreign key ("reportsto") references "employee" ("employeeid") on delete no action on update no action;
create index "ifk_employeereportsto" on "employee" ("reportsto");

alter table "invoice" add constraint "fk_invoicecustomerid"
  foreign key ("customerid") references "customer" ("customerid") on delete no action on update no action;
create index "ifk_invoicecustomerid" on "invoice" ("customerid");

alter table "invoiceline" add constraint "fk_invoicelineinvoiceid"
  foreign key ("invoiceid") references "invoice" ("invoiceid") on delete no action on update no action;
create index "ifk_invoicelineinvoiceid" on "invoiceline" ("invoiceid");

alter table "invoiceline" add constraint "fk_invoicelinetrackid"
  foreign key ("trackid") references "track" ("trackid") on delete no action on update no action;
create index "ifk_invoicelinetrackid" on "invoiceline" ("trackid");

alter table "playlisttrack" add constraint "fk_playlisttrackplaylistid"
  foreign key ("playlistid") references "playlist" ("playlistid") on delete no action on update no action;
alter table "playlisttrack" add constraint "fk_playlisttracktrackid"
  foreign key ("trackid") references "track" ("trackid") on delete no action on update no action;
create index "ifk_playlisttracktrackid" on "playlisttrack" ("trackid");

alter table "track" add constraint "fk_trackalbumid"
  foreign key ("albumid") references "album" ("albumid") on delete no action on update no action;
create index "ifk_trackalbumid" on "track" ("albumid");

alter table "track" add constraint "fk_trackgenreid"
  foreign key ("genreid") references "genre" ("genreid") on delete no action on update no action;
create index "ifk_trackgenreid" on "track" ("genreid");

alter table "track" add constraint "fk_trackmediatypeid"
  foreign key ("mediatypeid") references "mediatype" ("mediatypeid") on delete no action on update no action;
create index "ifk_trackmediatypeid" on "track" ("mediatypeid");

For the lowercased database, everything works (except "There have been issue creating few constraints, all the constraints that failed has been saved on to file:...").

But for the original I get this:

λ mock-windows-amd64-v2.2.exe database -a localhost -d chinook_normal -w prisma -f -v
time="2020-02-27 21:48:04" level=debug msg="Checking the version of the database" file="sql.go:51"
time="2020-02-27 21:48:04" level=info msg="Version of the database: PostgreSQL 11.6, compiled by Visual C++ build 1914, 64-bit" file="sql.go:66"
time="2020-02-27 21:48:04" level=debug msg="Checking if this a greenplum or postgres DB" file="sql.go:72"
time="2020-02-27 21:48:04" level=info msg="The flavour of postgres is: postgres" file="sql.go:81"
time="2020-02-27 21:48:04" level=info msg="The database that will be used by mock program is: chinook_normal" file="cmd.go:70"
time="2020-02-27 21:48:04" level=info msg="Starting the program to mock full database" file="database.go:31"
time="2020-02-27 21:48:04" level=info msg="Extracting the tables in the database: chinook_normal" file="database.go:38"
time="2020-02-27 21:48:04" level=debug msg="Extracting the tables info from the postgres database" file="sql.go:86"
time="2020-02-27 21:48:05" level=debug msg="Total number of tables to mock: 11" file="worker.go:24"
time="2020-02-27 21:48:05" level=info msg="Beginning the mocking process for the tables" file="worker.go:36"
time="2020-02-27 21:48:05" level=debug msg="Promoting for yes or no confirmation" file="helpers.go:114"
Are you sure the program mock can continue loading the fake data? FYI, For faking data to the database chinook_normal the constraints on the database will be dropped.
NOTE:
 1. These constraints will be backed up & saved onto to directory
 2. At the end of the program there will be an attempt to restore it, unless ignore (-i) flag is set when the restore of constraints will be ignored.
Choose (Yy/Nn): y
time="2020-02-27 21:48:06" level=info msg="Extracting the columns and datatype information" file="worker.go:59"
time="2020-02-27 21:48:06" level=debug msg="Extracting the column information from postgres database for table: public.\"Artist\"" file="sql.go:164"
Extracting column information from tables   9% [===>                                              ] (1/11) [0s:3s]time="2020-02-27 21:48:07" level=debug msg="Extracting the column information from postgres database for table: public.\"Album\"" file="sql.go:164"
Extracting column information from tables  18% [========>                                         ] (2/11) [0s:3s]time="2020-02-27 21:48:07" level=debug msg="Extracting the column information from postgres database for table: public.\"Employee\"" file="sql.go:164"
Extracting column information from tables  27% [============>                                     ] (3/11) [1s:2s]time="2020-02-27 21:48:08" level=debug msg="Extracting the column information from postgres database for table: public.\"Customer\"" file="sql.go:164"
Extracting column information from tables  36% [=================>                                ] (4/11) [1s:2s]time="2020-02-27 21:48:08" level=debug msg="Extracting the column information from postgres database for table: public.\"Invoice\"" file="sql.go:164"
Extracting column information from tables  45% [=====================>                            ] (5/11) [1s:2s]time="2020-02-27 21:48:08" level=debug msg="Extracting the column information from postgres database for table: public.\"InvoiceLine\"" file="sql.go:164"
Extracting column information from tables  54% [==========================>                       ] (6/11) [2s:1s]time="2020-02-27 21:48:09" level=debug msg="Extracting the column information from postgres database for table: public.\"Track\"" file="sql.go:164"
Extracting column information from tables  63% [==============================>                   ] (7/11) [2s:1s]time="2020-02-27 21:48:09" level=debug msg="Extracting the column information from postgres database for table: public.\"Playlist\"" file="sql.go:164"
Extracting column information from tables  72% [===================================>              ] (8/11) [2s:1s]time="2020-02-27 21:48:09" level=debug msg="Extracting the column information from postgres database for table: public.\"PlaylistTrack\"" file="sql.go:164"
Extracting column information from tables  81% [=======================================>          ] (9/11) [3s:0s]time="2020-02-27 21:48:10" level=debug msg="Extracting the column information from postgres database for table: public.\"Genre\"" file="sql.go:164"
Extracting column information from tables  90% [============================================>     ] (10/11) [3s:0s]time="2020-02-27 21:48:10" level=debug msg="Extracting the column information from postgres database for table: public.\"MediaType\"" file="sql.go:164"
Extracting column information from tables 100% [==================================================] (11/11) [4s:0s]
time="2020-02-27 21:48:10" level=info msg="Saving all the backup files to the path: C:\\Users\\Jan/mock/20200227214804" file="constraintsBackup.go:21"
time="2020-02-27 21:48:10" level=debug msg="Backing up all the constraints from the database: chinook_normal" file="constraintsBackup.go:31"
time="2020-02-27 21:48:10" level=debug msg="Extracting the DDL of the p constraints" file="sql.go:244"
time="2020-02-27 21:48:11" level=debug msg="Extracting the DDL of the f constraints" file="sql.go:244"
time="2020-02-27 21:48:11" level=debug msg="Extracting the DDL of the u constraints" file="sql.go:244"
time="2020-02-27 21:48:12" level=debug msg="Extracting the DDL of the c constraints" file="sql.go:244"
time="2020-02-27 21:48:12" level=debug msg="Backing up all the unique indexes from the database: chinook_normal" file="constraintsBackup.go:53"
time="2020-02-27 21:48:12" level=debug msg="Extracting the unique indexes" file="sql.go:277"
time="2020-02-27 21:48:12" level=info msg="Total numbers of tables to mock: 11" file="worker.go:99"
time="2020-02-27 21:48:12" level=debug msg="Removing constraints for table: \"public\".\"Artist\"" file="constraintsBackup.go:96"
time="2020-02-27 21:48:12" level=debug msg="Extracting constraint info for table: \"public\".\"Artist\"" file="sql.go:310"
Mocking Table "public"."Artist" 100% [==================================================] (10/10) [0s:0s]
time="2020-02-27 21:48:14" level=debug msg="Removing constraints for table: \"public\".\"Album\"" file="constraintsBackup.go:96"
time="2020-02-27 21:48:14" level=debug msg="Extracting constraint info for table: \"public\".\"Album\"" file="sql.go:310"

time="2020-02-27 21:48:16" level=debug msg="Table: \"public\".\"Album\"" file="worker.go:168"
time="2020-02-27 21:48:16" level=debug msg="Copy Statement: COPY \"public\".\"Album\"(\"AlbumId\",\"Title\",\"ArtistId\") FROM STDIN WITH CSV DELIMITER '$' QUOTE e'\\x01'" file="worker.go:169"
time="2020-02-27 21:48:16" level=debug msg="Data: 6305390$DDuk71dr5KCg2aEbgVrWOlGHPHQ4PDJHiIXoZHySVucaxWWLvfn45M433k0Y6nVkndTRcWaMTL3BgXG6jS0WUfTEUvCMEHPKDGkx9NYUx607LcwG9jeB8PAi1LJCksYLPCmm2JqVTxuuYnOihay729iIcbBRn17w$1054861" file="worker.go:170"
time="2020-02-27 21:48:16" level=fatal msg="Error during committing data: ERROR #23503 insert or update on table \"Album\" violates foreign key constraint \"FK_AlbumArtistId\"" file="worker.go:171"

Error during committing data: ERROR #2201W LIMIT must not be negative

mock-windows-amd64-v2.4.exe database -a localhost -w foo -f -v -d canvas-lms
...
Mocking Table "public"."delayed_notifications" 100% [==================================================] (10/10) [0s:0s]
time="2020-03-08 16:37:20" level=debug msg="Removing constraints for table: \"public\".\"developer_keys\"" file="constraintsBackup.go:96"
time="2020-03-08 16:37:20" level=debug msg="Extracting constraint info for table: \"public\".\"developer_keys\"" file="sql.go:314"
Mocking Table "public"."developer_keys" 100% [==================================================] (10/10) [0s:0s]
time="2020-03-08 16:37:20" level=debug msg="Removing constraints for table: \"public\".\"custom_gradebook_column_data\"" file="constraintsBackup.go:96"
time="2020-03-08 16:37:20" level=debug msg="Extracting constraint info for table: \"public\".\"custom_gradebook_column_data\"" file="sql.go:314"
Mocking Table "public"."custom_gradebook_column_data" 100% [==================================================] (10/10) [0s:0s]
time="2020-03-08 16:37:21" level=debug msg="Removing constraints for table: \"public\".\"delayed_jobs\"" file="constraintsBackup.go:96"
time="2020-03-08 16:37:21" level=debug msg="Extracting constraint info for table: \"public\".\"delayed_jobs\"" file="sql.go:314"
Mocking Table "public"."delayed_jobs"  20% [=========>                                        ] (2/10) [0s:0s]
time="2020-03-08 16:37:21" level=debug msg="Table: \"public\".\"delayed_jobs\"" file="worker.go:168"
time="2020-03-08 16:37:21" level=debug msg="Copy Statement: COPY \"public\".\"delayed_jobs\"(\"priority\",\"attempts\",\"handler\",\"last_error\",\"queue\",\"run_at\",\"locked_at\",\"failed_at\",\"locked_by\",\"created_at\",\"updated_at\",\"tag\",\"max_attempts\",\"strand\",\"next_in_strand\",\"shard_id\",\"source\",\"max_concurrent\",\"expires_at\") FROM STDIN WITH CSV DELIMITER '$' QUOTE e'\\x01'" file="worker.go:169"
time="2020-03-08 16:37:21" level=debug msg="Data: -932083$150630$beatae quaerat perferendis ab occaecati eos saepe rerum. harum iure ex. sit incidunt libero accusamus architecto voluptas sit. voluptatem incidunt quibusdam architecto. et veniam harum est ipsam neque voluptate.$ducimus ut voluptas quasi. voluptates deleniti repellat suscipit nihil. eaque aut velit error asperiores impedit. quia recusandae delectus est. officiis eum perferendis qui quisquam ab. tenetur perspiciatis ab earum dolores aperiam hic minus voluptas. in consectetur vitae aspernatur iusto minus fugiat dolorem.\tnon autem dolor quos ea. cumque occaecati totam qui autem ut quas. minima omnis consectetur ullam animi. ducimus voluptates culpa. voluptate quia facere id voluptates possimus inventore odio sit ducimus! dolor quae molestias aut cumque officiis non. expedita consequatur at. quo beatae rerum iusto sint. quo ut nesciunt non delectus aliquid libero adipisci.\tet aliquam ad nostrum. vel natus eum nobis vitae praesentium est illo rerum. quaerat mollitia autem ut tempore.$YmWQb4m72kZWCGSgmudcNpNMUTZJzYeBWVx8I7R4IzkBSIJwayjk6sq16uVH7vEpSEwSd80too05Jm22c81vMCfYMsCrhWLcawecdLIoFkSODRGyUq0MGjrju6YceC0XYXk4NSCQKGwjB5U3GRI11s5rhqwmIeSgtCG86yCNeC9rs6U1muD5XsRblrslSCx0Wm6gXZPOwnlQbjgXvbMHWEPzVk3tV4TTl58vXgTx18cSZKGNk4qo1GBnXbnLGWd$2019-01-12 12:42:30$2016-11-19 22:39:11$2017-04-01 17:03:51$rwUsKT5vaXhdhx7fhRkhZ9gHueDgzMJrRdIY1e2rnVqvZTKRWiOtZd24vyIgzX99GmcBKdpkqZTx56uj1t4oM5SqY013jj5sapeqci8dBGzixFqSqHqIY4xD4auQdJ8vIbEbe427jJeE8san7iSeb7DrViQ313l1La6xy7qdwBlmJXl1Ah5FcmWhGJnCLlurrxw1WK2EEZYiWctAEuTJQK72zeNUiLtD5vvX3s8iIk9TiKUsIYbiaYpFtEu3S6L$2017-05-04 23:49:33$2024-12-20 00:40:50$Uw8qIqYkhksfHWdDb7Fx9HqbgEwjoakXdOC1J8V0aXTvRVqRcWvzj42zPR0FjGGPtF9pjexxm6tvGkknOuqTJAAVFXPYShHzQmekDfqAZ6IaJTWLoTs2v0Ym1fRkJabOyD7BhsXEKi2C15iUDKtSboNCh2itOvM6agGNEk3lcJJtT2bnXdcL8qtJUVuDiIESerDthLnuKbu1dQi3yWdZHGRfgaO3tzU4RATXZRtazafOnc25wepFbZuLRDRxQMY$-3975359$ELct3apub9Ct2qMhZCCZPzYA0hWi0uR8Z1LTjls73FjISFnsugezNu2EJSqkXKRZm7oiqfXKNYXCneutGxElA9I919YtyBQU642AO2bY2h4BVyEWZyCeFKQIE5uUi1k0RDLKvcdrRl2kubx7bicZ4acJLqWNCzBLuETM79TlWVvdexm4yFrCev8raWqqm9THFB38Kcsx82JztyyM8nG6elDDeZ21xNWA6P1WRCnZ7kW4SWx2KvaRbEkQpsPZyfn$true$-319138939565772$jQnw2Ktu3MnZHL6jInDEafzYbKmdkV9ROXMSS1xWW3yQ0yCPgGWOaaLIMmu0WBXbIaKxu3bBdz15DTpzJYAOtMb2GpTNPgDgDbNSZjnikfgEQDsQ9p2H5T5bnEhc5MgkZpLba9pgYrBnOHBLD0sElQq8GocozoeBZLA3sOFE2acwkaO3bWaL6UY6krEAjl1hTqviIwXmjx079J5Yv2ozgDiRQaRQJDlP3nmm2oNkWZswWfaIpfQ8cELPfTlofQL$-3078778$2014-09-09 23:07:38" file="worker.go:170"
time="2020-03-08 16:37:21" level=fatal msg="Error during committing data: ERROR #2201W LIMIT must not be negative" file="worker.go:171"

Schema is https://github.com/prisma/database-schema-examples/blob/master/postgres/canvas-lms/schema.sql

Currently this tool doesnot work for greenplum v7

Erro while importing sample DB

FATA[2024-04-10 15:18:03] Encountered error when getting all the tables from GPDB, err: ERROR #42703 column c.relstorage does not exist

There is no column exists in pg_catalog.pg_class table.

File: sql.go , line: 164

Support for enums

When a table has an enum field, mockd fials to lookup enum and populate data. Here is a simple demo.


CREATE TYPE rating as ENUM
  ('good', 'ok', 'bad')
;


ALTER TABLE author
ADD COLUMN rating rating;

Command

➜  Downloads mockd-mac postgres -n 10 -u anand -d test -t author
2019-02-10 18:24:41.762:INFO > Parsing all the command line arguments
2019-02-10 18:24:41.762:INFO > Timestamp of this mockd execution: 20190210182441
2019-02-10 18:24:41.762:INFO > Attempting to establish a connection to the postgres database
2019-02-10 18:24:41.762:INFO > Obtaining the version of the DB Engine: "postgres"
2019-02-10 18:24:41.809:INFO > Version of the DB Engine "postgres": PostgreSQL 9.6.10 on x86_64-apple-darwin18.0.0, compiled by Apple LLVM version 10.0.0 (clang-1000.10.43.1), 64-bit
2019-02-10 18:24:41.809:INFO > Checking for the existence of the table provided to the application, if exist extract all the column and datatype information
2019-02-10 18:24:41.812:INFO > Backup up all the constraint in the database: "test"
2019-02-10 18:24:41.822:INFO > Separating the input to tables, columns & datatypes and attempting to mock data to the table
2019-02-10 18:24:41.877:ERROR > Skipping table "author" due to error "Unsupported datatypes found: rating"
2019-02-10 18:24:41.877:INFO > Checking for any PRIMARY KEYS, fixing them if there is any violations
2019-02-10 18:24:41.880:INFO > Checking for any UNIQUE KEYS, fixing them if there is any violations
2019-02-10 18:24:41.881:INFO > Checking for any FOREIGN KEYS, fixing them if there is any violations
2019-02-10 18:24:41.881:INFO > Starting to recreating all the constraints of the table ...
2019-02-10 18:24:41.927:WARNING > These tables (below) are skipped, since it contain unsupported datatypes
2019-02-10 18:24:41.927:WARNING > author
2019-02-10 18:24:41.927:INFO > mockd program has successfully completed

Error when updating the foreign key for table \"public\".\"film_actor\", err: ERROR #23502 null value in column \"film_id\" violates not-null constraint

mock-windows-amd64-v2.4.exe database -a localhost -w foo -f -v -d sakila
...
Fixing UNIQUE KEYS violation  47% [======================>                           ] (8/17) [0s:0s]time="2020-03-08 19:14:21" level=debug msg="Fixing the Primary / Unique Key" file="constraintsRestore.go:50"
Fixing UNIQUE KEYS violation  52% [=========================>                        ] (9/17) [0s:0s]time="2020-03-08 19:14:21" level=debug msg="Fixing the Primary / Unique Key" file="constraintsRestore.go:50"
Fixing UNIQUE KEYS violation  58% [============================>                     ] (10/17) [0s:0s]time="2020-03-08 19:14:21" level=debug msg="Fixing the Primary / Unique Key" file="constraintsRestore.go:50"
Fixing UNIQUE KEYS violation  64% [===============================>                  ] (11/17) [1s:0s]time="2020-03-08 19:14:21" level=debug msg="Fixing the Primary / Unique Key" file="constraintsRestore.go:50"
Fixing UNIQUE KEYS violation  70% [==================================>               ] (12/17) [1s:0s]time="2020-03-08 19:14:21" level=debug msg="Fixing the Primary / Unique Key" file="constraintsRestore.go:50"
Fixing UNIQUE KEYS violation  76% [=====================================>            ] (13/17) [1s:0s]time="2020-03-08 19:14:21" level=debug msg="Fixing the Primary / Unique Key" file="constraintsRestore.go:50"
Fixing UNIQUE KEYS violation  82% [========================================>         ] (14/17) [1s:0s]time="2020-03-08 19:14:22" level=debug msg="Fixing the Primary / Unique Key" file="constraintsRestore.go:50"
Fixing UNIQUE KEYS violation  88% [===========================================>      ] (15/17) [1s:0s]time="2020-03-08 19:14:22" level=debug msg="Fixing the Primary / Unique Key" file="constraintsRestore.go:50"
Fixing UNIQUE KEYS violation  94% [==============================================>   ] (16/17) [1s:0s]time="2020-03-08 19:14:22" level=debug msg="Fixing the Primary / Unique Key" file="constraintsRestore.go:50"
Fixing UNIQUE KEYS violation 100% [==================================================] (17/17) [1s:0s]
time="2020-03-08 19:14:22" level=info msg="Found 18 violation of FOREIGN KEYS, attempting to fix them" file="constraintsRestore.go:26"
time="2020-03-08 19:14:22" level=debug msg="Fixing the Primary / Unique Key" file="constraintsRestore.go:99"
time="2020-03-08 19:14:22" level=debug msg="Checking / Fixing FOREIGN KEY Violation table: \"public\".\"address\", column: city_id, reference: city(city_id)" file="constraintsRestore.go:109"
time="2020-03-08 19:14:22" level=debug msg="Extracting the foreign violations for table \"public\".\"address\" and column city" file="sql.go:517"
Fixing FOREIGN KEYS violation   5% [=>                                                ] (1/18) [0s:10s]time="2020-03-08 19:14:22" level=debug msg="Fixing the Primary / Unique Key" file="constraintsRestore.go:99"
time="2020-03-08 19:14:23" level=debug msg="Checking / Fixing FOREIGN KEY Violation table: \"public\".\"city\", column: country_id, reference: country(country_id)" file="constraintsRestore.go:109"
time="2020-03-08 19:14:23" level=debug msg="Extracting the foreign violations for table \"public\".\"city\" and column country" file="sql.go:517"
Fixing FOREIGN KEYS violation  11% [====>                                             ] (2/18) [1s:9s]time="2020-03-08 19:14:23" level=debug msg="Fixing the Primary / Unique Key" file="constraintsRestore.go:99"
time="2020-03-08 19:14:23" level=debug msg="Checking / Fixing FOREIGN KEY Violation table: \"public\".\"customer\", column: address_id, reference: address(address_id)" file="constraintsRestore.go:109"
time="2020-03-08 19:14:23" level=debug msg="Extracting the foreign violations for table \"public\".\"customer\" and column address" file="sql.go:517"
Fixing FOREIGN KEYS violation  16% [=======>                                          ] (3/18) [1s:9s]time="2020-03-08 19:14:24" level=debug msg="Fixing the Primary / Unique Key" file="constraintsRestore.go:99"
time="2020-03-08 19:14:24" level=debug msg="Checking / Fixing FOREIGN KEY Violation table: \"public\".\"film\", column: language_id, reference: language(language_id)" file="constraintsRestore.go:109"
Fixing FOREIGN KEYS violation  22% [==========>                                       ] (4/18) [2s:8s]time="2020-03-08 19:14:24" level=debug msg="Fixing the Primary / Unique Key" file="constraintsRestore.go:99"
time="2020-03-08 19:14:24" level=debug msg="Checking / Fixing FOREIGN KEY Violation table: \"public\".\"film_actor\", column: film_id, reference: film(film_id)" file="constraintsRestore.go:109"
time="2020-03-08 19:14:24" level=debug msg="Extracting the foreign violations for table \"public\".\"film_actor\" and column film" file="sql.go:517"

time="2020-03-08 19:14:24" level=debug msg="query: \nUPDATE \"public\".\"film_actor\" \nSET    film_id = \n       ( \n              SELECT film_id \n              FROM   film offset floor(random()*0) limit 1) \nWHERE  film_id = '1902'\n" file="sql.go:549"
time="2020-03-08 19:14:24" level=fatal msg="Error when updating the foreign key for table \"public\".\"film_actor\", err: ERROR #23502 null value in column \"film_id\" violates not-null constraint" file="sql.go:550"

Schema: https://github.com/prisma/database-schema-examples/blob/master/mysql/sakila/schema.sql

Strategies to avoid constraint creation would fails?

The README states:

If you have a unique index on a foreign key column then there are chance the constraint creation would fail, since mockd doesn't pick up unique value for foriegn key value it picks up random values from the reference table.

For me this manifested in this query being listed in a log file:

ALTER TABLE public.playlisttrack ADD CONSTRAINT pk_playlisttrack PRIMARY KEY (playlistid, trackid);

On checking the data manually, I see this:
image

So yes indeed, this PK could not be recreated.


Are there any strategies to avoid this?

同学,您这个项目引入了201个开源组件,存在2个漏洞,辛苦升级一下

检测到 faisaltheparttimecoder/mock-data 一共引入了201个开源组件,存在2个漏洞

漏洞标题:jwt-go 安全漏洞
缺陷组件:github.com/dgrijalva/[email protected]+incompatible
漏洞编号:CVE-2020-26160
漏洞描述:jwt-go是个人开发者的一个Go语言的JWT实现。
jwt-go 4.0.0-preview1之前版本存在安全漏洞。攻击者可利用该漏洞在使用[]string{} for m[\"aud\"](规范允许)的情况下绕过预期的访问限制。
影响范围:(∞, 4.0.0-preview1)
最小修复版本:4.0.0-preview1
缺陷组件引入路径:github.com/pivotal-gss/mock-data@->github.com/dgrijalva/[email protected]+incompatible

另外还有2个漏洞,详细报告:https://mofeisec.com/jr?p=ad8812

More information in debug output `Fixing the Primary / Unique Key`

This could probably use some table information:

time="2020-03-10 20:39:40" level=debug msg="Fixing the Primary / Unique Key" file="constraintsRestore.go:50"
time="2020-03-10 20:39:40" level=debug msg="Fixing the Primary / Unique Key" file="constraintsRestore.go:50"
time="2020-03-10 20:39:40" level=debug msg="Fixing the Primary / Unique Key" file="constraintsRestore.go:50"
time="2020-03-10 20:39:40" level=debug msg="Fixing the Primary / Unique Key" file="constraintsRestore.go:50"
time="2020-03-10 20:39:40" level=debug msg="Fixing the Primary / Unique Key" file="constraintsRestore.go:50"
time="2020-03-10 20:39:40" level=debug msg="Fixing the Primary / Unique Key" file="constraintsRestore.go:50"
time="2020-03-10 20:39:40" level=debug msg="Fixing the Primary / Unique Key" file="constraintsRestore.go:50"
time="2020-03-10 20:39:40" level=debug msg="Fixing the Primary / Unique Key" file="constraintsRestore.go:50"
time="2020-03-10 20:39:40" level=debug msg="Fixing the Primary / Unique Key" file="constraintsRestore.go:50"
time="2020-03-10 20:39:40" level=debug msg="Fixing the Primary / Unique Key" file="constraintsRestore.go:50"
time="2020-03-10 20:39:40" level=debug msg="Fixing the Primary / Unique Key" file="constraintsRestore.go:50"
time="2020-03-10 20:39:40" level=debug msg="Fixing the Primary / Unique Key" file="constraintsRestore.go:50"
time="2020-03-10 20:39:40" level=debug msg="Fixing the Primary / Unique Key" file="constraintsRestore.go:50"
time="2020-03-10 20:39:40" level=debug msg="Fixing the Primary / Unique Key" file="constraintsRestore.go:50"
time="2020-03-10 20:39:40" level=debug msg="Fixing the Primary / Unique Key" file="constraintsRestore.go:50"
time="2020-03-10 20:39:40" level=debug msg="Fixing the Primary / Unique Key" file="constraintsRestore.go:50"
time="2020-03-10 20:39:40" level=debug msg="Fixing the Primary / Unique Key" file="constraintsRestore.go:50"
time="2020-03-10 20:39:41" level=debug msg="Fixing the Primary / Unique Key" file="constraintsRestore.go:50"
time="2020-03-10 20:39:41" level=debug msg="Extracting constraint column data type info for table: \"public\".\"members\"" file="sql.go:377"
time="2020-03-10 20:39:41" level=debug msg="Extracting the unique violations for table \"public\".\"members\" and column invite_token" file="sql.go:429"
time="2020-03-10 20:39:41" level=debug msg="Fixing the Primary / Unique Key" file="constraintsRestore.go:50"
time="2020-03-10 20:39:41" level=debug msg="Fixing the Primary / Unique Key" file="constraintsRestore.go:50"
time="2020-03-10 20:39:41" level=debug msg="Fixing the Primary / Unique Key" file="constraintsRestore.go:50"
time="2020-03-10 20:39:41" level=debug msg="Fixing the Primary / Unique Key" file="constraintsRestore.go:50"
time="2020-03-10 20:39:41" level=debug msg="Fixing the Primary / Unique Key" file="constraintsRestore.go:50"
time="2020-03-10 20:39:41" level=debug msg="Fixing the Primary / Unique Key" file="constraintsRestore.go:50"
time="2020-03-10 20:39:41" level=debug msg="Fixing the Primary / Unique Key" file="constraintsRestore.go:50"
time="2020-03-10 20:39:41" level=debug msg="Fixing the Primary / Unique Key" file="constraintsRestore.go:50"
time="2020-03-10 20:39:41" level=debug msg="Fixing the Primary / Unique Key" file="constraintsRestore.go:50"
time="2020-03-10 20:39:41" level=debug msg="Fixing the Primary / Unique Key" file="constraintsRestore.go:50"
time="2020-03-10 20:39:41" level=debug msg="Fixing the Primary / Unique Key" file="constraintsRestore.go:50"
time="2020-03-10 20:39:41" level=debug msg="Fixing the Primary / Unique Key" file="constraintsRestore.go:50"
time="2020-03-10 20:39:41" level=debug msg="Fixing the Primary / Unique Key" file="constraintsRestore.go:50"
time="2020-03-10 20:39:41" level=debug msg="Fixing the Primary / Unique Key" file="constraintsRestore.go:50"
time="2020-03-10 20:39:41" level=debug msg="Fixing the Primary / Unique Key" file="constraintsRestore.go:50"

Possibly missing quotes for schema in "Extracting the column information from postgres database for table" step

See this output:

time="2020-02-28 14:21:57" level=debug msg="Extracting the column information from postgres database for table: public.\"authors\"" file="sql.go:164"
Extracting column information from tables  25% [===========>                                      ] (1/4) [0s:1s]time="2020-02-28 14:21:57" level=debug msg="Extracting the column information from postgres database for table: public.\"authors_blogs\"" file="sql.go:164"
Extracting column information from tables  50% [========================>                         ] (2/4) [0s:0s]time="2020-02-28 14:21:57" level=debug msg="Extracting the column information from postgres database for table: public.\"blogs\"" file="sql.go:164"
Extracting column information from tables  75% [====================================>             ] (3/4) [1s:0s]time="2020-02-28 14:21:58" level=debug msg="Extracting the column information from postgres database for table: public.\"posts\"" file="sql.go:164"
Extracting column information from tables 100% [==================================================] (4/4) [1s:0s]

The missing \" for public might indicate this might crash if someone has an uppercase schema name.

[2.3] Encountered error when getting constraints for table \"public\".\"AO_0A5972_NOTIFICATION_SETTING\" from database, err: ERROR #42602 invalid name syntax

Trying to use it on this schema: https://github.com/prisma/database-schema-examples/blob/master/postgres/jira/schema.sql

I get this output:

mock-windows-amd64-v2.3.exe database -a localhost -d jira -w foo -f -v
...
time="2020-02-28 13:01:09" level=debug msg="Backing up all the constraints from the database: jira" file="constraintsBackup.go:31"
time="2020-02-28 13:01:09" level=debug msg="Extracting the DDL of the p constraints" file="sql.go:244"
time="2020-02-28 13:01:11" level=debug msg="Extracting the DDL of the f constraints" file="sql.go:244"
time="2020-02-28 13:01:11" level=debug msg="Extracting the DDL of the u constraints" file="sql.go:244"
time="2020-02-28 13:01:11" level=debug msg="Extracting the DDL of the c constraints" file="sql.go:244"
time="2020-02-28 13:01:12" level=debug msg="Backing up all the unique indexes from the database: jira" file="constraintsBackup.go:53"
time="2020-02-28 13:01:12" level=debug msg="Extracting the unique indexes" file="sql.go:279"
time="2020-02-28 13:01:14" level=info msg="Total numbers of tables to mock: 211" file="worker.go:99"
time="2020-02-28 13:01:14" level=debug msg="Removing constraints for table: \"public\".\"AO_0A5972_NOTIFICATION_SETTING\"" file="constraintsBackup.go:96"
time="2020-02-28 13:01:14" level=debug msg="Extracting constraint info for table: \"public\".\"AO_0A5972_NOTIFICATION_SETTING\"" file="sql.go:314"
time="2020-02-28 13:01:14" level=debug msg="query: \nSELECT * \nFROM   (SELECT n.nspname \n               || '.' \n               || c.relname                                   tablename, \n               con.conname
                      constraintname, \n               pg_catalog.Pg_get_constraintdef(con.oid, TRUE) constraintcol, \n               'constraint'                                   constrainttype \n        FROM   pg_catalog.pg_class c, \n               pg_catalog.pg_constraint con, \n               pg_namespace n \n        WHERE  c.oid = '\"\"public\".\"AO_0A5972_NOTIFICATION_SETTING\"\"' :: regclass \n               AND conrelid = c.oid \n               AND n.oid = c.relnamespace \n               AND contype IN ( 'u', 'f', 'c', 'p' ) \n        UNION \n        SELECT schemaname \n               || '.' \n               || tablename tablename, \n               indexname    conname, \n               indexdef     concol, \n               'index'      contype \n        FROM   pg_indexes \n        WHERE  schemaname IN (SELECT nspname \n                              FROM   pg_namespace \n
    WHERE  nspname NOT IN ( \n                                     'pg_catalog', 'information_schema' \n                                     , \n                                     'pg_aoseg', \n
   'gp_toolkit', \n                                     'pg_toast', 'pg_bitmapindex' )) \n               AND indexdef LIKE 'CREATE UNIQUE%' \n               AND '\"' || schemaname || '\"'\n                   || '.\"' \n
        || tablename || '\"' = '\"public\".\"AO_0A5972_NOTIFICATION_SETTING\"') a \nORDER  BY constrainttype \n" file="sql.go:362"
time="2020-02-28 13:01:14" level=fatal msg="Encountered error when getting constraints for table \"public\".\"AO_0A5972_NOTIFICATION_SETTING\" from database, err: ERROR #42602 invalid name syntax" file="sql.go:363"

[2.3] "Error during committing data: ERROR #23502 null value in column \"EXPRESSION\" violates not-null constraint"

Trying to use it on this schema: https://github.com/prisma/database-schema-examples/blob/master/postgres/jira/schema.sql

I get this output:

mock-windows-amd64-v2.3.exe database -a localhost -d jira -w foo -f -v
...
time="2020-02-28 13:29:29" level=info msg="Saving all the backup files to the path: C:\\Users\\Jan/mock/20200228132758" file="constraintsBackup.go:21"
time="2020-02-28 13:29:29" level=debug msg="Backing up all the constraints from the database: jira" file="constraintsBackup.go:31"
time="2020-02-28 13:29:29" level=debug msg="Extracting the DDL of the p constraints" file="sql.go:244"
time="2020-02-28 13:29:31" level=debug msg="Extracting the DDL of the f constraints" file="sql.go:244"
time="2020-02-28 13:29:31" level=debug msg="Extracting the DDL of the u constraints" file="sql.go:244"
time="2020-02-28 13:29:31" level=debug msg="Extracting the DDL of the c constraints" file="sql.go:244"
time="2020-02-28 13:29:32" level=debug msg="Backing up all the unique indexes from the database: jira" file="constraintsBackup.go:53"
time="2020-02-28 13:29:32" level=debug msg="Extracting the unique indexes" file="sql.go:279"
time="2020-02-28 13:29:34" level=info msg="Total numbers of tables to mock: 211" file="worker.go:99"
time="2020-02-28 13:29:34" level=debug msg="Removing constraints for table: \"public\".\"AO_0A5972_NOTIFICATION_SETTING\"" file="constraintsBackup.go:96"
time="2020-02-28 13:29:34" level=debug msg="Extracting constraint info for table: \"public\".\"AO_0A5972_NOTIFICATION_SETTING\"" file="sql.go:314"
Mocking Table "public"."AO_0A5972_NOTIFICATION_SETTING" 100% [==================================================] (10/10) [0s:0s]
time="2020-02-28 13:29:35" level=debug msg="Removing constraints for table: \"public\".\"AO_0A5972_PUSH_REGISTRATION\"" file="constraintsBackup.go:96"
time="2020-02-28 13:29:35" level=debug msg="Extracting constraint info for table: \"public\".\"AO_0A5972_PUSH_REGISTRATION\"" file="sql.go:314"
Mocking Table "public"."AO_0A5972_PUSH_REGISTRATION" 100% [==================================================] (10/10) [0s:0s]
time="2020-02-28 13:29:37" level=debug msg="Removing constraints for table: \"public\".\"AO_0AC321_RECOMMENDATION_AO\"" file="constraintsBackup.go:96"
time="2020-02-28 13:29:37" level=debug msg="Extracting constraint info for table: \"public\".\"AO_0AC321_RECOMMENDATION_AO\"" file="sql.go:314"
Mocking Table "public"."AO_0AC321_RECOMMENDATION_AO" 100% [==================================================] (10/10) [0s:0s]
time="2020-02-28 13:29:39" level=debug msg="Removing constraints for table: \"public\".\"AO_21D670_WHITELIST_RULES\"" file="constraintsBackup.go:96"
time="2020-02-28 13:29:39" level=debug msg="Extracting constraint info for table: \"public\".\"AO_21D670_WHITELIST_RULES\"" file="sql.go:314"
Mocking Table "public"."AO_21D670_WHITELIST_RULES"  60% [=============================>                    ] (6/10) [0s:0s]
time="2020-02-28 13:29:40" level=debug msg="Table: \"public\".\"AO_21D670_WHITELIST_RULES\"" file="worker.go:168"
time="2020-02-28 13:29:40" level=debug msg="Copy Statement: COPY \"public\".\"AO_21D670_WHITELIST_RULES\"(\"ALLOWINBOUND\",\"EXPRESSION\",\"TYPE\") FROM STDIN WITH CSV DELIMITER '$' QUOTE e'\\x01'" file="worker.go:169"
time="2020-02-28 13:29:40" level=debug msg="Data: true$$I71Glsvl3Rb0BDMJQRiohMXm1EHH4Sn9CVW9eeYvW4mMcHeFiU40nFU9apvvmUqu1ty3fT08NOVlc82nOx8Q8tcWKpOjLRBHFAiUT8Tyj4ARslrjaYHFoeGjLWgWnV5FLmWAmUMx9lUdQmjkCPNmJccCGK0CEITx3lYfd9yuv1Way2iKuS1Jin2yzYMneyMl7vj1Zi4S9h7gHtoKTnU4EFxHOMHKS9KPTToIzZSijL1dtPCS9PlWBFis8lpmkJi" file="worker.go:170"
time="2020-02-28 13:29:40" level=fatal msg="Error during committing data: ERROR #23502 null value in column \"EXPRESSION\" violates not-null constraint" file="worker.go:171"

Might very well be that expression is some keyword maybe?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.