Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions reverse_engineering/helpers/oracleHelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -587,8 +587,8 @@ const execute = (command, options = {}, binds = []) => {
};

const getDbVersion = async logger => {
const versions = ['12c', '18c', '19c', '21c', '23ai'];
const defaultVersion = '21c';
const versions = ['12c', '18c', '19c', '21c', '23ai', '26ai'];
const fallbackDbVersion = '21c';

try {
const versionTable = await execute(
Expand All @@ -600,15 +600,15 @@ const getDbVersion = async logger => {
const majorVersion = versionTable?.[0]?.[0]?.split('.').shift();

if (!majorVersion) {
return defaultVersion;
return fallbackDbVersion;
}

const currentVersion = versions.find(version => version.startsWith(majorVersion));
const foundDbVersion = versions.find(version => version.startsWith(majorVersion));

return currentVersion || defaultVersion;
return foundDbVersion || fallbackDbVersion;
} catch (e) {
logger.log('error', { message: e.message, stack: e.stack }, 'Error of getting DB Version');
return defaultVersion;
return fallbackDbVersion;
}
};

Expand Down