Problema no nome da tabela
Eu criei as tabelas de uma aplicação node com postgres através do sequelize, todas as tabelas com os nomes minúsculos, porém quando vou tentar dar um insert ou select ele procura a tabela que começa com a primeira letra maiúscula, e por esse motivo não encontra e quebra a api, alguém sabe o que pode ser?
sql: ''''INSERT INTO "Admin" ("id","cnpj","razao_social","nome_fantasia","email","senha","created_at","updated_at") VALUES (DEFAULT,$1,$2,$3,$4,$5,$6,$7) RETURNING *;''''
parameters: [
''''0000000'''',
''''4pa ltda'''',
''''4Pa'''',
''''4pa@4pa.com.br'''',
''''1230'''',
''''2020-05-04 23:59:12.951 +00:00'''',
''''2020-05-04 23:59:12.951 +00:00''''
]
original: error: relation "Admin" does not exist
at Connection.parseE (D:\www\facilita+\backend\node_modules\pg\lib\connection.js:581:48)
at Connection.parseMessage (D:\www\facilita+\backend\node_modules\pg\lib\connection.js:380:19)
at Socket.<anonymous> (D:\www\facilita+\backend\node_modules\pg\lib\connection.js:116:22)
at Socket.emit (events.js:321:20)
at addChunk (_stream_readable.js:297:12)
at readableAddChunk (_stream_readable.js:273:9)
at Socket.Readable.push (_stream_readable.js:214:10)
at TCP.onStreamRead (internal/stream_base_commons.js:186:23) {
name: ''''error'''',
length: 164,
severity: ''''ERROR'''',
code: ''''42P01'''',
detail: undefined,
hint: undefined,
position: ''''13'''',
internalPosition: undefined,
internalQuery: undefined,
where: undefined,
schema: undefined,
table: undefined,
column: undefined,
dataType: undefined,
constraint: undefined,
file: ''''d:\\pginstaller.auto\\postgres.windows-x64\\src\\backend\\parser\\parse_relation.c'''',
line: ''''1180'''',
routine: ''''parserOpenTable'''',
sql: ''''INSERT INTO "Admin" ("id","cnpj","razao_social","nome_fantasia","email","senha","created_at","updated_at") VALUES (DEFAULT,$1,$2,$3,$4,$5,$6,$7) RETURNING *;''''
parameters: [
''''0000000'''',
''''4pa ltda'''',
''''4Pa'''',
''''4pa@4pa.com.br'''',
''''1230'''',
''''2020-05-04 23:59:12.951 +00:00'''',
''''2020-05-04 23:59:12.951 +00:00''''
]
original: error: relation "Admin" does not exist
at Connection.parseE (D:\www\facilita+\backend\node_modules\pg\lib\connection.js:581:48)
at Connection.parseMessage (D:\www\facilita+\backend\node_modules\pg\lib\connection.js:380:19)
at Socket.<anonymous> (D:\www\facilita+\backend\node_modules\pg\lib\connection.js:116:22)
at Socket.emit (events.js:321:20)
at addChunk (_stream_readable.js:297:12)
at readableAddChunk (_stream_readable.js:273:9)
at Socket.Readable.push (_stream_readable.js:214:10)
at TCP.onStreamRead (internal/stream_base_commons.js:186:23) {
name: ''''error'''',
length: 164,
severity: ''''ERROR'''',
code: ''''42P01'''',
detail: undefined,
hint: undefined,
position: ''''13'''',
internalPosition: undefined,
internalQuery: undefined,
where: undefined,
schema: undefined,
table: undefined,
column: undefined,
dataType: undefined,
constraint: undefined,
file: ''''d:\\pginstaller.auto\\postgres.windows-x64\\src\\backend\\parser\\parse_relation.c'''',
line: ''''1180'''',
routine: ''''parserOpenTable'''',
Pedro Neto
Curtidas 0