Comments (4)
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.
any answers to this ?
from typeorm-fixtures.
try to use
auth:
email: [email protected]
from typeorm-fixtures.
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)
- [Feature request] Please hardcode faker package to 5.5.3 HOT 4
- Selectively apply Load Processor values to fixture items
- [Feature request] "Scenario": load fixtures from a single file and that can extend each other HOT 1
- [Bug] Lodash dependency pin
- [Bug] Postgres 'timestamptz' column failing at parsing long date HOT 4
- [Feature request] Add support for typeorm ^0.3.0 HOT 18
- [Bug] Update dependencies HOT 2
- [Bug] $current not working on array fields
- [Bug] class-validator entities may be incorrectly "unserialized/initialized" HOT 1
- [Bug] HOT 2
- [Bug] fix faker deprecation warning
- [Bug] Null ID when referencing another fixture HOT 1
- [Bug] glob is broken in Windows and cannot iterate by folder HOT 2
- [Feature request] Add support for regular expressions/glob patterns when setting fixtures location HOT 1
- [Bug]
- [Feature request] Add TsLoader for fixture
- Problem with @Exclude HOT 2
- [Feature request] Add faker examples with parameters in README
- [Feature request] Reference one field to generate another
- [Feature request] access to entity name in processor HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from typeorm-fixtures.