Integrated Manticore sync, assuming responsibility from traxxx core/legacy.

This commit is contained in:
2026-06-08 05:18:11 +02:00
parent a048970be6
commit 1bc7dd3a43
15 changed files with 776 additions and 7 deletions

View File

@@ -0,0 +1,42 @@
import { knexOwner as knex } from '../src/knex.js';
import { utilsApi } from '../src/manticore.js';
import { syncStashes } from '../src/sync.js';
async function init() {
await utilsApi.sql('drop table if exists scenes_stashed');
await utilsApi.sql(`create table if not exists scenes_stashed (
scene_id int,
stash_id int,
user_id int,
created_at timestamp
)`);
await utilsApi.sql('drop table if exists movies_stashed');
await utilsApi.sql(`create table if not exists movies_stashed (
movie_id int,
stash_id int,
user_id int,
created_at timestamp
)`);
await utilsApi.sql('drop table if exists actors_stashed');
await utilsApi.sql(`create table if not exists actors_stashed (
actor_id int,
stash_id int,
user_id int,
created_at timestamp
)`);
console.log('Recreated stash tables, syncing stashes...');
await syncStashes('scene');
await syncStashes('actor');
await syncStashes('movie');
knex.destroy();
}
init();