This commit is contained in:
David Arranz 2024-09-12 19:41:51 +02:00
parent 960e1cdd1a
commit 885bc7f301

View File

@ -13,8 +13,7 @@ const createCatalogTableIfNotExists = async (sequelize: Sequelize) => {
WHERE table_schema = DATABASE()
AND table_name = 'catalog';`;
const [result] = await sequelize.query(checkTableQuery);
const [result]: any = await sequelize.query(checkTableQuery);
const tableExists = result[0]["COUNT(*)"] > 0;
if (!tableExists) {
@ -63,7 +62,7 @@ const createCatalogTranslationsTableIfNotExists = async (sequelize: Sequelize) =
AND table_name = 'catalog_translations';
`;
const [result] = await sequelize.query(checkTableQuery);
const [result]: any = await sequelize.query(checkTableQuery);
const tableExists = result[0]["COUNT(*)"] > 0;
if (!tableExists) {
@ -111,7 +110,7 @@ const createVCatalogViewIfNotExists = async (sequelize: Sequelize) => {
AND table_name = 'v_catalog';
`;
const [result] = await sequelize.query(checkViewQuery);
const [result]: any = await sequelize.query(checkViewQuery);
const viewExists = result[0]["COUNT(*)"] > 0;
if (!viewExists) {