Skip to content

Commit

Permalink
HCK-9173: comment out inactive schema statement in script (#41)
Browse files Browse the repository at this point in the history
* HCK-9173: comment out inactive schema statement in script

* fix
  • Loading branch information
AlikRakhmonov authored Dec 19, 2024
1 parent ef3aa47 commit d3870e4
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions forward_engineering/ddlProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ module.exports = (baseProvider, options, app) => {

createDatabase({
databaseName,
isActivated,
isActivated = true,
db_account,
db_default_map,
db_permanent_storage_size,
Expand All @@ -187,21 +187,19 @@ module.exports = (baseProvider, options, app) => {
db_default_journal_db,
});

const databaseStatement = commentIfDeactivated(
assignTemplates(templates.createDatabase, {
name: databaseName,
databaseOptions,
}),
{
isActivated,
},
);
const databaseStatement = assignTemplates(templates.createDatabase, {
name: databaseName,
databaseOptions,
});

const createSessionStatement = assignTemplates(templates.createSession, {
name: databaseName,
});

return [databaseStatement, createSessionStatement].join('\n');
return commentIfDeactivated(
[databaseStatement, createSessionStatement].join('\n'),
{ isActivated },
);
},

createUdt(udt, dbData) {
Expand Down

0 comments on commit d3870e4

Please sign in to comment.