-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reverse engineering existing database : triggers in its own folder #232
Comments
A use case for our database is we have logon triggers which sets the session specific configs. So this dont belong to a table. |
We do allow triggers in separate files in their own folder named /trigger. It is not enabled by default for all dbms types; I'll have to enable it for Oracle. Assuming the trigger does belong to a schema or user, the existing logic should work for it. If not, then we need a little more work on it, but no problem to do |
Yes same as in #219 |
Fix committed - you can give this snapshot a try - https://oss.sonatype.org/content/repositories/snapshots/com/goldmansachs/obevo/obevo-cli/master-SNAPSHOT/obevo-cli-master-20190501.001845-17-dist.zip (This is the same link as for your other ticket #231) FYI on the trigger code - you may want to leverage the in-built tokens to specify the schema of your trigger, in case the Sql actually requires it. For an example, see this code: |
We had good improvemnts. But looks like we missed a few. EX: //// CHANGE name=change0 //// CHANGE name=change1 //// CHANGE name=change2 ON "ATLANTIS"."FP_SCORE_ANSWERS#" FOR EACH ROW DECLARE
ELSIF UPDATING THEN / //// CHANGE name=change3 ON "ATLANTIS"."FP_SCORE_CHOICES#" FOR EACH ROW DECLARE
ELSIF UPDATING THEN / //// CHANGE INDEX name=STYP_PK //// CHANGE name=change4 |
Is that all in the same reverse-engineered file? I'm surprised to see the trigger and the indexes in the table file If it is not a problem, can you send over the interim/output.sql file that the reverse-engineering generates? That would be the ideal test case for me. However, in case that is not possible (e.g. if you have any sensitive content in that file), I should be able to work with the sample you provided here |
@shantstepanian can I email you ? |
You can get my email from here - https://github.com/goldmansachs/obevo/blob/master/Obevo_Javasig.pdf |
@shantstepanian sorry. I thought I can email. Our info sec team has some issues with this. Can you please work with the example above. |
Hi, please try this snapshot I added a minor fix around the view names that may be throwing things off; it may or may not work. If it does not, please execute the NEWREVENG command with this flag added: -debugLogEnabled This will add additional information to your output to help analyze what is going on. Thanks for your patience with this as we iron out these issues. With the new debugLogEnabled feature, we hopefully won't need as many iterations like this to resolve issues |
@shantstepanian I am getting file not found when I try to download the file. |
Sorry, try this link - https://github.com/goldmansachs/obevo/releases/download/master-SNAPSHOT/obevo-cli-master-SNAPSHOT-dist.zip It should also be available from the Releases page (master-SNAPSHOT) |
The link doesnt work. I went to releases pages. I only get the source code but not jars. Can you please provide a link with the cli jar files ? |
Apologies again - the link should be fine now, and the release page corrected Worst-case, try this link: https://oss.sonatype.org/content/repositories/snapshots/com/goldmansachs/obevo/obevo-cli/master-SNAPSHOT/obevo-cli-master-20190506.220347-19-dist.zip |
Got it. @shantstepanian I am still seeing few examples where the trigger is in a separate file. I added the debug enabled. Can I know where is the diagnostic information ? Is it in the output.sql in interim folder ? |
Clarifying the requirement - I do expect that triggers should be in a separate folder separate from the table file (as per your original requirement around the login triggers not belonging to a table). This is how Obevo currently works (i.e. no distinguishing between triggers belonging to a table and triggers that don't). We have it as a separate file as it allows us to modify the trigger file in place (as of today, any //// CHANGE in a table file cannot be edited in place, which makes it more cumbersome to manage triggers there) I would not rule out a future enhancement to allow triggers to be defined either way (e.g. co-located with the table file vs. in a separate file entirely, and to remove the constraint mentioned above). We can create this under a separate issue if you'd like, though it is a larger change and thus won't happen in the near-term. In terms of the debug information, that shows up as a line like so within the file:
This information is more useful for the index issues you saw in your other ticket, where indices were not getting grouped to the correct file. I'll post more comments on that ticket |
Just wanted to check if this is still an issue, after the rerun that you did in issue #231? |
Closing this ticket. Let us know if you face further issues on this issue |
I am using the obevo cli for reverse engineering on oracle database. Currently the reveng tool puts all the triggers and tables in the same file. What is Obevo recommendation on this ? Is it possible to separate the triggers in to separate files by table ? We have a legacy database which lot of DDL for tables with indices. By separating triggers in a separate file will it cause any issues with changes ?
The text was updated successfully, but these errors were encountered: