previous SqliteError: insert into `program` (`created_at`, `duration`, `episode`, `external_key`, `external_source_id`, `file_path`, `grandparent_external_key`, `parent_external_key`, `plex_file_path`, `plex_rating_key`, `show_title`, `source_type`, `summary`, `title`, `type`, `updated_at`, `uuid`) select 1707049284592 as `created_at`, 450838 as `duration`, 1499 as `episode`, '/library/metadata/20318' as `external_key`, 'dionysus' as `external_source_id`, '/data/youtube/Kid Crew/Season 2022/s2022.e01499 - 🎄 Christmas for kids! Cutting tree, decorating, gingerbread, holiday lights | Kid Crew.mp4' as `file_path`, '20297' as `grandparent_external_key`, '20298' as `parent_external_key`, '/library/parts/20389/1697234134/file.mp4' as `plex_file_path`, '20318' as `plex_rating_key`, 'Kid Crew' as `show_title`, 'plex' as `source_type`, '' as `summary`, 'Episode 1499' as `title`, 'episode' as `type`, 1707049284592 as `updated_at`, '4f595a34-3b66-48ad-9013-403e214e4b54' as `uuid` union all select 1707049284593 as `created_at`, 189056 as `duration`, 2199 as `episode`, '/library/metadata/20319' as `external_key`, 'dionysus' as `external_source_id`, '/data/youtube/Kid Crew/Season 2022/s2022.e02199 - Tow truck tug of war challenge and power wheels tug of war tournament. How traction works | Kid Crew.mp4' as `file_path`, '20297' as `grandparent_external_key`, '20298' as `parent_external_key`, '/library/parts/20390/1697234082/file.mp4' as `plex_file_path`, '20319' as `plex_rating_key`, 'Kid Crew' as `show_title`, 'plex' as `source_type`, '' as `summary`, 'Episode 2199' as `title`, 'episode' as `type`, 1707049284593 as `updated_at`, '0ef0a5a3-60d8-48f6-b3de-efdcc96ce1ac' as `uuid` union all select 1707049284593 as `created_at`, 360373 as `duration`, 2899 as `episode`, '/library/metadata/20320' as `external_key`, 'dionysus' as `external_source_id`, '/data/youtube/Kid Crew/Season 2022/s2022.e02899 - Tow truck rescue with kids ride on toy truck and tractor. Educational how winches work | Kid Crew.mp4' as `file_path`, '20297' as `grandparent_external_key`, '20298' as `parent_external_key`, '/library/parts/20391/1697234042/file.mp4' as `plex_file_path`, '20320' as `plex_rating_key`, 'Kid Crew' as `show_title`, 'plex' as `source_type`, '' as `summary`, 'Episode 2899' as `title`, 'episode' as `type`, 1707049284593 as `updated_at`, '2b73eb08-403b-4158-9e64-9881b2cb0272' as `uuid` union all select 1707049284593 as `created_at`, 322339 as `duration`, 3599 as `episode`, '/library/metadata/20321' as `external_key`, 'dionysus' as `external_source_id`, '/data/youtube/Kid Crew/Season 2022/s2022.e03599 - Airplanes for kids with pretend play in a real cockpit. Educational how planes fly | Kid Crew.mp4' as `file_path`, '20297' as `grandparent_external_key`, '20298' as `parent_external_key`, '/library/parts/20392/1697233992/file.mp4' as `plex_file_path`, '20321' as `plex_rating_key`, 'Kid Crew' as `show_title`, 'plex' as `source_type`, '' as `summary`, 'Episode 3599' as `title`, 'episode' as `type`, 1707049284593 as `updated_at`, '41f3ab1c-9c10-4798-a516-85c2ebe0301b' as `uuid` union all select 1707049284593 as `created_at`, 360443 as `duration`, 4299 as `episode`, '/library/metadata/20299' as `external_key`, 'dionysus' as `external_source_id`, '/data/youtube/Kid Crew/Season 2022/s2022.e04299 - Helping farm animals with kids toy truck and tractor. Educational how milking cows work | Kid Crew.mp4' as `file_path`, '20297' as `grandparent_external_key`, '20298' as `parent_external_key`, '/library/parts/20371/1697233951/file.mp4' as `plex_file_path`, '20299' as `plex_rating_key`, 'Kid Crew' as `show_title`, 'plex' as `source_type`, '' as `summary`, 'Episode 4299' as `title`, 'episode' as `type`, 1707049284593 as `updated_at`, '5a76c403-e409-443a-b97e-415da365bddf' as `uuid` union all select 1707049284593 as `created_at`, 480629 as `duration`, 5099 as `episode`, '/library/metadata/20300' as `external_key`, 'dionysus' as `external_source_id`, '/data/youtube/Kid Crew/Season 2022/s2022.e05099 - Caring for chickens with kids ride on truck, collect eggs, feed. Educational cooking eggs | Kid Crew.mp4' as `file_path`, '20297' as `grandparent_external_key`, '20298' as `parent_external_key`, '/library/parts/20372/1697233888/file.mp4' as `plex_file_path`, '20300' as `plex_rating_key`, 'Kid Crew' as `show_title`, 'plex' as `source_type`, '' as `summary`, 'Episode 5099' as `title`, 'episode' as `type`, 1707049284593 as `updated_at`, '3f5c331e-6bd3-4ace-b33d-1512fde047ff' as `uuid` union all select 1707049284593 as `created_at`, 607991 as `duration`, 5799 as `episode`, '/library/metadata/20301' as `external_key`, 'dionysus' as `external_source_id`, '/data/youtube/Kid Crew/Season 2022/s2022.e05799 - Camping adventure in Power Wheels RV, roof tent on Barbie car Dream Camper, campfire | Kid Crew.mp4' as `file_path`, '20297' as `grandparent_external_key`, '20298' as `parent_external_key`, '/library/parts/20373/1697233831/file.mp4' as `plex_file_path`, '20301' as `plex_rating_key`, 'Kid Crew' as `show_title`, 'plex' as `source_type`, '' as `summary`, 'Episode 5799' as `title`, 'episode' as `type`, 1707049284593 as `updated_at`, '49ebcd1b-71c8-4e9b-9371-3b5e72f657d6' as `uuid` union all select 1707049284593 as `created_at`, 360280 as `duration`, 6499 as `episode`, '/library/metadata/20302' as `external_key`, 'dionysus' as `external_source_id`, '/data/youtube/Kid Crew/Season 2022/s2022.e06499 - Harvesting vegetables from the garden with kids tractor. Educational how greenhouses work | Kid Crew.mp4' as `file_path`, '20297' as `grandparent_external_key`, '20298' as `parent_external_key`, '/library/parts/20374/1697233758/file.mp4' as `plex_file_path`, '20302' as `plex_rating_key`, 'Kid Crew' as `show_title`, 'plex' as `source_type`, '' as `summary`, 'Episode 6499' as `title`, 'episode' as `type`, 1707049284593 as `updated_at`, '22398d53-a5aa-4e05-864f-9a6551277845' as `uuid` union all select 1707049284593 as `created_at`, 265032 as `duration`, 7799 as `episode`, '/library/metadata/20303' as `external_key`, 'dionysus' as `external_source_id`, '/data/youtube/Kid Crew/Season 2022/s2022.e07799 - Fixing our ride on power wheels 1 8V toy truck. Educational how gears work | Kid Crew.mp4' as `file_path`, '20297' as `grandparent_external_key`, '20298' as `parent_external_key`, '/library/parts/20375/1697233696/file.mp4' as `plex_file_path`, '20303' as `plex_rating_key`, 'Kid Crew' as `show_title`, 'plex' as `source_type`, '' as `summary`, 'Episode 7799' as `title`, 'episode' as `type`, 1707049284593 as `updated_at`, 'ab60e6dc-2a97-4afd-a1bd-f6df2467fec8' as `uuid` union all select 1707049284593 as `created_at`, 302857 as `duration`, 8499 as `episode`, '/library/metadata/20304' as `external_key`, 'dionysus' as `external_source_id`, '/data/youtube/Kid Crew/Season 2022/s2022.e08499 - Kids use construction vehicles! Educational how excavators ⧸ diggers ⧸ backhoes work | Kid Crew.mp4' as `file_path`, '20297' as `grandparent_external_key`, '20298' as `parent_external_key`, '/library/parts/20376/1697233654/file.mp4' as `plex_file_path`, '20304' as `plex_rating_key`, 'Kid Crew' as `show_title`, 'plex' as `source_type`, '' as `summary`, 'Episode 8499' as `title`, 'episode' as `type`, 1707049284593 as `updated_at`, 'c43a968a-ae02-4b81-ad0c-2d6d7951c8ee' as `uuid` where true on conflict (`uuid`) do update set `created_at` = excluded.`created_at`, `updated_at` = excluded.`updated_at`, `source_type` = excluded.`source_type`, `duration` = excluded.`duration`, `episode` = excluded.`episode`, `file_path` = excluded.`file_path`, `external_source_id` = excluded.`external_source_id`, `external_key` = excluded.`external_key`, `plex_rating_key` = excluded.`plex_rating_key`, `plex_file_path` = excluded.`plex_file_path`, `parent_external_key` = excluded.`parent_external_key`, `grandparent_external_key` = excluded.`grandparent_external_key`, `show_title` = excluded.`show_title`, `summary` = excluded.`summary`, `title` = excluded.`title`, `type` = excluded.`type` returning `original_air_date`, `episode_icon`, `icon`, `rating`, `season`, `season_icon`, `show_icon`, `year`, `custom_order` - UNIQUE constraint failed: program.source_type, program.external_source_id, program.external_key
at Client_BetterSQLite3._query (/Users/christianbenincasa/Code/projects/dizquetv/node_modules/.pnpm/[email protected][email protected]/node_modules/knex/lib/dialects/better-sqlite3/index.js:39:40)
at Object.executeQuery (/Users/christianbenincasa/Code/projects/dizquetv/node_modules/.pnpm/[email protected][email protected]/node_modules/knex/lib/execution/internal/query-executioner.js:37:17)
at Client_BetterSQLite3.Client.query (/Users/christianbenincasa/Code/projects/dizquetv/node_modules/.pnpm/@[email protected]_@[email protected][email protected]/node_modules/@mikro-orm/knex/AbstractSqlConnection.js:199:71)
at Runner.query (/Users/christianbenincasa/Code/projects/dizquetv/node_modules/.pnpm/[email protected][email protected]/node_modules/knex/lib/execution/runner.js:141:36)
at ensureConnectionCallback (/Users/christianbenincasa/Code/projects/dizquetv/node_modules/.pnpm/[email protected][email protected]/node_modules/knex/lib/execution/internal/ensure-connection-callback.js:13:17)
at Runner.ensureConnection (/Users/christianbenincasa/Code/projects/dizquetv/node_modules/.pnpm/[email protected][email protected]/node_modules/knex/lib/execution/runner.js:318:20)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Runner.run (/Users/christianbenincasa/Code/projects/dizquetv/node_modules/.pnpm/[email protected][email protected]/node_modules/knex/lib/execution/runner.js:30:19)
at async executeQuery.query (/Users/christianbenincasa/Code/projects/dizquetv/node_modules/.pnpm/@[email protected]_@[email protected][email protected]/node_modules/@mikro-orm/knex/AbstractSqlConnection.js:119:25)
at async BetterSqliteConnection.executeQuery (/Users/christianbenincasa/Code/projects/dizquetv/node_modules/.pnpm/@[email protected]/node_modules/@mikro-orm/core/connections/Connection.js:102:25)
at async QueryBuilder.execute (/Users/christianbenincasa/Code/projects/dizquetv/node_modules/.pnpm/@[email protected]_@[email protected][email protected]/node_modules/@mikro-orm/knex/query/QueryBuilder.js:601:21)
at async SqlEntityManager.upsertMany (/Users/christianbenincasa/Code/projects/dizquetv/node_modules/.pnpm/@[email protected]/node_modules/@mikro-orm/core/EntityManager.js:816:21)
at async SqlEntityManager.upsertMany (/Users/christianbenincasa/Code/projects/dizquetv/node_modules/.pnpm/@[email protected]/node_modules/@mikro-orm/core/EntityManager.js:738:29)
at async Object.<anonymous> (file:///Users/christianbenincasa/Code/projects/dizquetv/server/api/v2/channelsApiV2.ts:264:32) {
code: 'SQLITE_CONSTRAINT_UNIQUE',
errno: undefined,
sqlState: undefined,
sqlMessage: undefined,
errmsg: undefined
}