QueryError: create table "devices" ("id" serial primary key) - relation "devices_pkey" already exists
š This seems to be an execution error, which means that your request syntax seems okay,
but the resulting statement cannot be executed ā Probably not a pg-mem error.
*ļøā£ Failed SQL statement: create table "devices" ("id" serial primary key);
š You can file an issue at https://github.com/oguimbal/pg-mem along with a way to reproduce this error (if you can), and the stacktrace:
at MemoryTable.determineIndexRelName (/node_modules/pg-mem/index.js:8387:23)
at MemoryTable.createIndex (/node_modules/pg-mem/index.js:8354:32)
at ColRef.addConstraints (/node_modules/pg-mem/index.js:9880:32)
at MemoryTable.addColumn (/node_modules/pg-mem/index.js:8007:22)
at new MemoryTable (/node_modules/pg-mem/index.js:7918:18)
at DbSchema.declareTable (/node_modules/pg-mem/index.js:6701:21)
at /node_modules/pg-mem/index.js:10982:25
at checkExistence (/node_modules/pg-mem/index.js:2179:5)
at ExecuteCreateTable.execute (/node_modules/pg-mem/index.js:10981:41)
at /node_modules/pg-mem/index.js:5975:42 {
data: { error: 'relation "devices_pkey" already exists', code: undefined },
code: undefined,
location: { start: 0, end: 0 },
[Symbol(errorDetailsIncluded)]: true
}
Describe the bug
To Reproduce
package.json:
index.js:
pg-mem version
2.6.13