removed legacy entities and repository

This commit is contained in:
zadam
2021-05-17 22:05:35 +02:00
parent 04f249e800
commit 8bd3e17a3b
28 changed files with 30 additions and 1431 deletions

View File

@@ -3,6 +3,7 @@ const sourceIdService = require('./source_id');
const dateUtils = require('./date_utils');
const log = require('./log');
const cls = require('./cls');
const becca = require("./becca/becca.js");
let maxEntityChangeId = 0;
@@ -82,7 +83,6 @@ function cleanupEntityChangesForMissingEntities(entityName, entityPrimaryKey) {
function fillEntityChanges(entityName, entityPrimaryKey, condition = '') {
try {
cleanupEntityChangesForMissingEntities(entityName, entityPrimaryKey);
const repository = require("./repository.js");
sql.transactional(() => {
const entityIds = sql.getColumn(`SELECT ${entityPrimaryKey} FROM ${entityName}`
@@ -97,7 +97,7 @@ function fillEntityChanges(entityName, entityPrimaryKey, condition = '') {
if (existingRows === 0) {
createdCount++;
const entity = repository.getEntity(`SELECT * FROM ${entityName} WHERE ${entityPrimaryKey} = ?`, [entityId]);
const entity = becca.getEntity(entityName, entityId);
addEntityChange({
entityName,