Skip to content

Commit

Permalink
Make schema suffixes work correctly for files with explicitly overrid…
Browse files Browse the repository at this point in the history
…den schemas. (#281)

* Make schema suffixes work correctly for files with explicitly overridden schemas.

* cleanup

* bump df version
  • Loading branch information
BenBirt authored and probot-auto-merge[bot] committed Jun 26, 2019
1 parent 1f4daea commit 9c2d571
Show file tree
Hide file tree
Showing 3 changed files with 205 additions and 175 deletions.
13 changes: 5 additions & 8 deletions core/session.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,14 +129,11 @@ export class Session {
}
}
})();
if (actionOptions.sqlxConfig.schema) {
action.proto.target.schema = actionOptions.sqlxConfig.schema;
}
if (actionOptions.sqlxConfig.name) {
action.proto.name = actionOptions.sqlxConfig.name;
if (action.proto.target) {
action.proto.target.name = actionOptions.sqlxConfig.name;
}
if (action.proto.target) {
action.proto.target = this.target(
actionOptions.sqlxConfig.name,
actionOptions.sqlxConfig.schema
);
}
return action;
}
Expand Down
Loading

0 comments on commit 9c2d571

Please sign in to comment.