Giter Club home page Giter Club logo

Comments (4)

brussee avatar brussee commented on May 23, 2024

If I remove the part:

        auth:
            authEmail: [email protected]

then I get:

$ node -r tsconfig-paths/register -r ts-node/register node_modules/.bin/fixtures --config ./apps/my-api/src/db.config.ts --sync ./fixtures
Progress  [██████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░] 20% | ETA: 1s | 1/5 user1 
Fail fixture loading: null value in column "authEmail" violates not-null constraint
QueryFailedError: null value in column "authEmail" violates not-null constraint
    at new QueryFailedError (/nest-pkgs/src/error/QueryFailedError.ts:9:9)
    at Query.callback (/nest-pkgs/src/driver/postgres/PostgresQueryRunner.ts:178:30)
    at Query.handleError (/nest-pkgs/node_modules/pg/lib/query.js:146:19)
    at Connection.connectedErrorMessageHandler (/nest-pkgs/node_modules/pg/lib/client.js:233:17)
    at Connection.emit (events.js:315:20)
    at /nest-pkgs/node_modules/pg/lib/connection.js:109:10
    at Parser.parse (/nest-pkgs/node_modules/pg-protocol/src/parser.ts:107:9)
    at TLSSocket.<anonymous> (/nest-pkgs/node_modules/pg-protocol/src/index.ts:7:48)
    at TLSSocket.emit (events.js:315:20)
    at addChunk (_stream_readable.js:302:12) {
  length: 381,
  severity: 'ERROR',
  code: '23502',
  detail: 'Failing row contains (6c6f9867-9fa8-48a7-aec1-431a4de02f83, null, null).',
  hint: undefined,
  position: undefined,
  internalPosition: undefined,
  internalQuery: undefined,
  where: undefined,
  schema: 'public',
  table: 'user',
  column: 'authEmail',
  dataType: undefined,
  constraint: undefined,
  file: 'execMain.c',
  line: '1960',
  routine: 'ExecConstraints',
  query: 'INSERT INTO "user"("uuid", "authEmail", "authEmail_verified_at") VALUES (DEFAULT, DEFAULT, DEFAULT) RETURNING "uuid"',
  parameters: []
}
error Command failed with exit code 1.

from typeorm-fixtures.

uRTLy avatar uRTLy commented on May 23, 2024

any answers to this ?

from typeorm-fixtures.

singlesly avatar singlesly commented on May 23, 2024

try to use

auth:
  email: [email protected]

from typeorm-fixtures.

brussee avatar brussee commented on May 23, 2024

try to use

auth:
  email: [email protected]

Nothing is saved in the database if I try that.

I've worked around this issue by creating a separate fixture file for entity: LocalAuth.

from typeorm-fixtures.

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.