Giter Site home page Giter Site logo

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

faisaltheparttimecoder avatar faisaltheparttimecoder commented on June 3, 2024
[2.3] "Error during committing data: ERROR #23502 null value in column \"EXPRESSION\" violates not-null constraint"

from mock-data.

Comments (4)

faisaltheparttimecoder avatar faisaltheparttimecoder commented on June 3, 2024 1

hmmm, seems like the fake library ("github.com/icrowley/fake") I have been using via fake.DigitN(1) sometimes return 0 which make the null paragraphs my bad

If you change it to like this might help to overcome the problem, RandomInt picks random value b/w 1 & 5

// Random Paragraphs
func RandomParagraphs() string {
	n := RandomInt(1, 5)
	return fake.ParagraphsN(n)
}

@janpio do you want to open a pull request on that change I have provided above over here (https://github.com/pivotal-gss/mock-data/blob/master/randomizer.go#L139)

from mock-data.

janpio avatar janpio commented on June 3, 2024

Ok sure. Give me a bit.

Update: #19

from mock-data.

janpio avatar janpio commented on June 3, 2024

Possibly same problem:

time="2020-02-28 14:35:32" level=debug msg="Removing constraints for table: \"public\".\"users\"" file="constraintsBackup.go:96"
time="2020-02-28 14:35:32" level=debug msg="Extracting constraint info for table: \"public\".\"users\"" file="sql.go:314"
Mocking Table "public"."users"  30% [==============>                                   ] (3/10) [0s:0s]
time="2020-02-28 14:35:34" level=debug msg="Table: \"public\".\"users\"" file="worker.go:168"
time="2020-02-28 14:35:34" level=debug msg="Copy Statement: COPY \"public\".\"users\"(\"id\",\"name\",\"handle\",\"created_at\",\"updated_at\") FROM STDIN WITH CSV DELIMITER '$' QUOTE e'\\x01'" file="worker.go:169"
time="2020-02-28 14:35:34" level=debug msg="Data: 5a919733-cf47-4e7b-a6c9-47a0219298b1$dolores natus ut fugiat. architecto adipisci non ea non doloribus. qui eos recusandae aliquam quia accusamus expedita voluptate eveniet magnam tempore. culpa maxime nobis! magnam illo enim soluta fuga veniam est et eveniet.\tmodi doloremque minus impedit voluptatem voluptatem voluptatem! asperiores molestias placeat! odit consequatur sit quia quia quidem. enim accusantium facere amet fugit ipsam doloribus numquam. iste culpa ea. quas in rem accusamus deleniti temporibus quos. eos esse et eum. impedit eaque aut laboriosam eum id. nihil asperiores aut hic facilis occaecati.\tvelit dolor nam dicta suscipit. ex libero maiores vero suscipit. ducimus qui voluptatem quod et rerum. repellat aut sapiente sed. omnis error iure soluta laudantium. doloremque sint non id est. eos eaque dolor doloremque distinctio earum.\tsunt id dolore ipsa est cumque cupiditate culpa repellat omnis. sed maxime ipsum pariatur aut voluptatem. qui quaerat expedita est ad doloribus nesciunt. quod quae repudiandae quo.\tut rerum recusandae. eum consectetur optio ut.$$2028-06-23 02:57:57$2017-10-25 16:43:38" file="worker.go:170"
time="2020-02-28 14:35:34" level=fatal msg="Error during committing data: ERROR #23502 null value in column \"handle\" violates not-null constraint" file="worker.go:171"

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

from mock-data.

janpio avatar janpio commented on June 3, 2024

Ok, for these schemas it happens every time now so is not usable :/ Will wait for merge and release then

from mock-data.

Related Issues (20)

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.