Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Solve UniqueConstraintError on twitter import #608

Open
MicrowaveDev opened this issue Jan 20, 2023 · 0 comments
Open

Solve UniqueConstraintError on twitter import #608

MicrowaveDev opened this issue Jan 20, 2023 · 0 comments

Comments

@MicrowaveDev
Copy link
Member

| Executing (default): SELECT id, name, userId, groupId, staticId, publicKey, isRemote, encryptedPrivateKey, createdAt, updatedAt FROM accounts AS account WHERE account.name = 'leni_kotik-1674238887-a336f' AND account.isRemote = 0 LIMIT 1;
geesome | Executing (default): UPDATE accounts SET name=$1,updatedAt=$2 WHERE name = $3 AND isRemote = $4
geesome | publishPostAndRelated error UniqueConstraintError [SequelizeUniqueConstraintError]: Validation error
geesome | at Query.formatError (/geesome-node/node_modules/sequelize/lib/dialects/sqlite/query.js:397:16)
geesome | at Query._handleQueryResponse (/geesome-node/node_modules/sequelize/lib/dialects/sqlite/query.js:72:18)
geesome | at Statement.afterExecute (/geesome-node/node_modules/sequelize/lib/dialects/sqlite/query.js:238:27) {
geesome | errors: [
geesome | ValidationErrorItem {
geesome | message: 'name must be unique',
geesome | type: 'unique violation',
geesome | path: 'name',
geesome | value: null,
geesome | origin: 'DB',
geesome | instance: null,
geesome | validatorKey: 'not_unique',
geesome | validatorName: null,
geesome | validatorArgs: []
geesome | },
geesome | ValidationErrorItem {
geesome | message: 'isRemote must be unique',
geesome | type: 'unique violation',
geesome | path: 'isRemote',
geesome | value: null,
geesome | origin: 'DB',
geesome | instance: null,
geesome | validatorKey: 'not_unique',
geesome | validatorName: null,
geesome | validatorArgs: []
geesome | }
geesome | ],
geesome | fields: [ 'name', 'isRemote' ],
geesome | parent: [Error: SQLITE_CONSTRAINT: UNIQUE constraint failed: accounts.name, accounts.isRemote] {
geesome | errno: 19,
geesome | code: 'SQLITE_CONSTRAINT',
geesome | sql: 'UPDATE accounts SET name=$1,updatedAt=$2 WHERE name = $3 AND isRemote = $4'
geesome | },
geesome | original: [Error: SQLITE_CONSTRAINT: UNIQUE constraint failed: accounts.name, accounts.isRemote] {
geesome | errno: 19,
geesome | code: 'SQLITE_CONSTRAINT',
geesome | sql: 'UPDATE accounts SET name=$1,updatedAt=$2 WHERE name = $3 AND isRemote = $4'
geesome | },
geesome | sql: 'UPDATE accounts SET name=$1,updatedAt=$2 WHERE name = $3 AND isRemote = $4'
geesome | }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant