36 lines
784 B
JavaScript
36 lines
784 B
JavaScript
const config = require('config');
|
|
const manticore = require('manticoresearch');
|
|
|
|
const mantiClient = new manticore.ApiClient();
|
|
|
|
mantiClient.basePath = `http://${config.database.manticore.host}:${config.database.manticore.httpPort}`;
|
|
|
|
const utilsApi = new manticore.UtilsApi(mantiClient);
|
|
|
|
exports.up = async () => {
|
|
await utilsApi.sql(`create table scenes (
|
|
id int,
|
|
title text,
|
|
entry_id text,
|
|
channel_id int,
|
|
channel_name text,
|
|
channel_slug text,
|
|
network_id int,
|
|
network_name text,
|
|
network_slug text,
|
|
actor_ids multi,
|
|
actors text,
|
|
tag_ids multi,
|
|
tags text,
|
|
meta text,
|
|
date timestamp,
|
|
created_at timestamp,
|
|
effective_date timestamp,
|
|
stashed int
|
|
)`);
|
|
};
|
|
|
|
exports.down = async () => {
|
|
await utilsApi.sql('drop table scenes');
|
|
};
|