bgatellier / scodi

A command-line tool to industrialize web quality measurement
MIT License
1 stars 0 forks source link

Fix the logoUrl field from the migration #54

Closed bgatellier closed 2 months ago

bgatellier commented 2 months ago

Error log:

[22:25:41.137] ERROR (34806): insert into `service` (`name`, `logo_url`) values ('Google Lighthouse', 'https://raw.githubusercontent.com/bgatellier/scodi/main/assets/images/logos/Lighthouse.png?v=20221126') - Unknown column 'logo_url' in 'field list'
    err: {
      "type": "InvalidFieldNameException",
      "message": "insert into `service` (`name`, `logo_url`) values ('Google Lighthouse', 'https://raw.githubusercontent.com/bgatellier/scodi/main/assets/images/logos/Lighthouse.png?v=20221126') - Unknown column 'logo_url' in 'field list'",
      "stack":
          InvalidFieldNameException: insert into `service` (`name`, `logo_url`) values ('Google Lighthouse', 'https://raw.githubusercontent.com/bgatellier/scodi/main/assets/images/logos/Lighthouse.png?v=20221126') - Unknown column 'logo_url' in 'field list'
              at MySqlExceptionConverter.convertException (/home/bgatellier/scodi/node_modules/.pnpm/@mikro-orm+knex@6.3.4_@mikro-orm+core@6.3.4_mysql2@3.11.0/node_modules/@mikro-orm/knex/dialects/mysql/MySqlExceptionConverter.js:39:24)
              at MySqlDriver.convertException (/home/bgatellier/scodi/node_modules/.pnpm/@mikro-orm+core@6.3.4/node_modules/@mikro-orm/core/drivers/DatabaseDriver.js:344:54)
              at /home/bgatellier/scodi/node_modules/.pnpm/@mikro-orm+core@6.3.4/node_modules/@mikro-orm/core/drivers/DatabaseDriver.js:348:24
              at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
              at async MySqlDriver.nativeInsertMany (/home/bgatellier/scodi/node_modules/.pnpm/@mikro-orm+knex@6.3.4_@mikro-orm+core@6.3.4_mysql2@3.11.0/node_modules/@mikro-orm/knex/AbstractSqlDriver.js:439:21)
              at async MySqlDriver.nativeInsertMany (/home/bgatellier/scodi/node_modules/.pnpm/@mikro-orm+mysql@6.3.4_@mikro-orm+core@6.3.4/node_modules/@mikro-orm/mysql/MySqlDriver.js:22:21)
              at async ChangeSetPersister.persistNewEntity (/home/bgatellier/scodi/node_modules/.pnpm/@mikro-orm+core@6.3.4/node_modules/@mikro-orm/core/unit-of-work/ChangeSetPersister.js:97:21)
              at async ChangeSetPersister.executeInserts (/home/bgatellier/scodi/node_modules/.pnpm/@mikro-orm+core@6.3.4/node_modules/@mikro-orm/core/unit-of-work/ChangeSetPersister.js:40:13)
              at async ChangeSetPersister.runForEachSchema (/home/bgatellier/scodi/node_modules/.pnpm/@mikro-orm+core@6.3.4/node_modules/@mikro-orm/core/unit-of-work/ChangeSetPersister.js:80:13)
              at async UnitOfWork.commitCreateChangeSets (/home/bgatellier/scodi/node_modules/.pnpm/@mikro-orm+core@6.3.4/node_modules/@mikro-orm/core/unit-of-work/UnitOfWork.js:768:9)

              at Packet.asError (/home/bgatellier/scodi/node_modules/.pnpm/mysql2@3.11.0/node_modules/mysql2/lib/packets/packet.js:738:17)
              at Query.execute (/home/bgatellier/scodi/node_modules/.pnpm/mysql2@3.11.0/node_modules/mysql2/lib/commands/command.js:29:26)
              at Connection.handlePacket (/home/bgatellier/scodi/node_modules/.pnpm/mysql2@3.11.0/node_modules/mysql2/lib/connection.js:481:34)
              at PacketParser.onPacket (/home/bgatellier/scodi/node_modules/.pnpm/mysql2@3.11.0/node_modules/mysql2/lib/connection.js:97:12)
              at PacketParser.executeStart (/home/bgatellier/scodi/node_modules/.pnpm/mysql2@3.11.0/node_modules/mysql2/lib/packet_parser.js:75:16)
              at Socket.<anonymous> (/home/bgatellier/scodi/node_modules/.pnpm/mysql2@3.11.0/node_modules/mysql2/lib/connection.js:104:25)
              at Socket.emit (node:events:517:28)
              at addChunk (node:internal/streams/readable:368:12)
              at readableAddChunk (node:internal/streams/readable:341:9)
              at Readable.push (node:internal/streams/readable:278:10)
      "code": "ER_BAD_FIELD_ERROR",
      "errno": 1054,
      "sqlState": "42S22",
      "sqlMessage": "Unknown column 'logo_url' in 'field list'",
      "sql": "insert into `service` (`name`, `logo_url`) values ('Google Lighthouse', 'https://raw.githubusercontent.com/bgatellier/scodi/main/assets/images/logos/Lighthouse.png?v=20221126')",
      "name": "InvalidFieldNameException"
    }