.
This commit is contained in:
parent
960e1cdd1a
commit
885bc7f301
@ -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) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user