create table mapCareers (id int unsigned not null auto_increment primary key, title varchar(255) null, description longtext null) - ER_TABLE_EXISTS_ERROR: Table 'mapcareers' already exists
Error: ER_TABLE_EXISTS_ERROR: Table 'mapcareers' already exists
at Query.Sequence._packetToError (C:\Users\Hussain\Desktop\backend-clone\node_modules\mysql\lib\protocol\sequences\Sequence.js:47:14)
at Query.ErrorPacket (C:\Users\Hussain\Desktop\backend-clone\node_modules\mysql\lib\protocol\sequences\Query.js:79:18)
at Protocol._parsePacket (C:\Users\Hussain\Desktop\backend-clone\node_modules\mysql\lib\protocol\Protocol.js:291:23)
at Parser._parsePacket (C:\Users\Hussain\Desktop\backend-clone\node_modules\mysql\lib\protocol\Parser.js:433:10)
at Parser.write (C:\Users\Hussain\Desktop\backend-clone\node_modules\mysql\lib\protocol\Parser.js:43:10)
at Protocol.write (C:\Users\Hussain\Desktop\backend-clone\node_modules\mysql\lib\protocol\Protocol.js:38:16)
at Socket. (C:\Users\Hussain\Desktop\backend-clone\node_modules\mysql\lib\Connection.js:88:28)
at Socket. (C:\Users\Hussain\Desktop\backend-clone\node_modules\mysql\lib\Connection.js:526:10)
at Socket.emit (node:events:394:28)
at Socket.emit (node:domain:475:12)
at addChunk (node:internal/streams/readable:315:12)
at readableAddChunk (node:internal/streams/readable:289:9)
at Socket.Readable.push (node:internal/streams/readable:228:10)
at TCP.onStreamRead (node:internal/stream_base_commons:199:23)
at Protocol._enqueue (C:\Users\Hussain\Desktop\backend-clone\node_modules\mysql\lib\protocol\Protocol.js:144:48)
at Connection.query (C:\Users\Hussain\Desktop\backend-clone\node_modules\mysql\lib\Connection.js:198:25)
at C:\Users\Hussain\Desktop\backend-clone\node_modules\@strapi\database\node_modules\knex\lib\dialects\mysql\index.js:126:18
at new Promise (<anonymous>)
at Client_MySQL._query (C:\Users\Hussain\Desktop\backend-clone\node_modules\@strapi\database\node_modules\knex\lib\dialects\mysql\index.js:120:12)
at executeQuery (C:\Users\Hussain\Desktop\backend-clone\node_modules\@strapi\database\node_modules\knex\lib\execution\internal\query-executioner.js:37:17)
at Client_MySQL.query (C:\Users\Hussain\Desktop\backend-clone\node_modules\@strapi\database\node_modules\knex\lib\client.js:134:12)
at C:\Users\Hussain\Desktop\backend-clone\node_modules\@strapi\database\node_modules\knex\lib\execution\transaction.js:363:24
at new Promise (<anonymous>)
at Client_MySQL.trxClient.query (C:\Users\Hussain\Desktop\backend-clone\node_modules\@strapi\database\node_modules\knex\lib\execution\transaction.js:358:12)
at Runner.query (C:\Users\Hussain\Desktop\backend-clone\node_modules\@strapi\database\node_modules\knex\lib\execution\run at Runner.queryArray (C:\Users\Hussain\Desktop\backend-clone\node_modules\@strapi\database\node_modules\knex\lib\execution\runner.js:224:21)
at ensureConnectionCallback (C:\Users\Hussain\Desktop\backend-clone\node_modules\@strapi\database\node_modules\knex\lib\execution\internal\ensure-connection-callback.js:11:19)
at Runner.ensureConnection (C:\Users\Hussain\Desktop\backend-clone\node_modules\@strapi\database\node_modules\knex\lib\execution\runner.js:272:20)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
error Command failed with exit code 1.
Node.js version: 16.9.1
Strapi version: 4.1.2
Database: mysql
Operating system: windows
Describe the bug
I am migrating my strapi version from v3 to v4. I have followed the documentation and used codemods to change the folder structure and to update the schemas. Once I change the dependencies and build and run the project with my database I am getting this error. I am not understanding why it is creating the tables again.
Bug report
Required System information
create table (C:\Users\Hussain\Desktop\backend-clone\node_modules\mysql\lib\Connection.js:88:28)
at Socket. (C:\Users\Hussain\Desktop\backend-clone\node_modules\mysql\lib\Connection.js:526:10)
at Socket.emit (node:events:394:28)
at Socket.emit (node:domain:475:12)
at addChunk (node:internal/streams/readable:315:12)
at readableAddChunk (node:internal/streams/readable:289:9)
at Socket.Readable.push (node:internal/streams/readable:228:10)
at TCP.onStreamRead (node:internal/stream_base_commons:199:23)
mapCareers
(id
int unsigned not null auto_increment primary key,title
varchar(255) null,description
longtext null) - ER_TABLE_EXISTS_ERROR: Table 'mapcareers' already exists Error: ER_TABLE_EXISTS_ERROR: Table 'mapcareers' already exists at Query.Sequence._packetToError (C:\Users\Hussain\Desktop\backend-clone\node_modules\mysql\lib\protocol\sequences\Sequence.js:47:14) at Query.ErrorPacket (C:\Users\Hussain\Desktop\backend-clone\node_modules\mysql\lib\protocol\sequences\Query.js:79:18)at Protocol._parsePacket (C:\Users\Hussain\Desktop\backend-clone\node_modules\mysql\lib\protocol\Protocol.js:291:23)
at Parser._parsePacket (C:\Users\Hussain\Desktop\backend-clone\node_modules\mysql\lib\protocol\Parser.js:433:10) at Parser.write (C:\Users\Hussain\Desktop\backend-clone\node_modules\mysql\lib\protocol\Parser.js:43:10) at Protocol.write (C:\Users\Hussain\Desktop\backend-clone\node_modules\mysql\lib\protocol\Protocol.js:38:16) at Socket.
error Command failed with exit code 1.
Describe the bug
I am migrating my strapi version from v3 to v4. I have followed the documentation and used codemods to change the folder structure and to update the schemas. Once I change the dependencies and build and run the project with my database I am getting this error. I am not understanding why it is creating the tables again.