-
Notifications
You must be signed in to change notification settings - Fork 91
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
Oracle producer add missing functions #143
Oracle producer add missing functions #143
Conversation
…nd added alter_create_constraint and alter_drop_constraint functions.
…::Diff object. Can be an issue if SQL::Translator::Diff::schema_diff is called directly.
…ings. Also fixed 90% of quoting issues that I think I introduced. Added additional testing.
…rver producers. FK constraint generation works properly and additional testing has been cleaned up.
…elds. Updated tests for fix of FK drop and Not Null to Null.
|
@mohawk2 The code you reviewed was from a few commits back. This is the first time I am attempting to contribute to a project like this so I am betting that I messed a few things up. I have been using DBIx::Class and DBIx::Class::Schema::Versioned for another project and while working on that I discovered functionality that was missing from the Oracle producer. I added in the missing functionality and submitted the pull request. I continued with my project, made changes to the data model, attempted to generate the DDL, and discovered a few more things missing from the Oracle producer. So I added those things into the same branch because it seemed reasonable and pushed the changes. I did that whole process one more time and now I am like 97% sure that all of the missing functionality has been implemented and I won't make any more changes to the branch. Please check out the latest commit b14da74 and let me know if you see any issues. |
|
Thanks for the updates. The current list of commits sort of meanders, which isn't a criticism, but does highlight a possible process-improvement, especially to help reviewers. Since this is on a branch belonging to you, it's safe to force-push it. The way I work is to end up with the branch I'm making having a series of small commits, each of which meaningfully transforms the starting code towards the desired end-state. This often involves squashing together (using The alternative (which isn't fatal) is that this set of commits will either (if merged in as-is) be slightly untidy for future people looking to see why a piece of code is as it is, or (if squash-merged) a single quite large commit which can take longer to comprehend. Tagging in @rabbiveesh. |
|
@mohawk2 Thank you for the pointers. I will try to clean up my commits to be more concise in the future. I found one last issue with altering constraints for Oracle while working on my personal project (dropping an unnamed primary key constraint) and have pushed the change to this branch. At this point, I have personally tested all of the constraint alteration functionality in my other project (as well as adding tests for this project) and am confident in them. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey, I only ran through a little bit, but then I saw that tests are failing on my box.
I suggest you make sure that all tests pass.
Here's the list of failing files:
t/54-oracle-sql-diff.t
t/30sqlt-new-diff-mysql.t
t/30sqlt-new-diff-pgsql.t
t/30sqlt-new-diff-sqlite.t
t/51-xml-to-oracle.t
t/51-xml-to-oracle_quoted.t
|
@rabbiveesh after reverting the change in Diff.pm (and fixing one of my test plans) all of the tests are passing on my box except for t/60roundtrip.t. It is looking for t/data/roundtrip_autogen.yaml which I am unable to locate in my branch or in the current project master. |
|
Yeah, to get the roundtrip test working you need some script. You can run Makefile.PL, and |
…o-oracle.t to work with slight changes to output.
…for slight changes in output and fixed tabbing to be more readable.
|
@rabbiveesh Sorry about that, I did not realize I had introduced an issue. With the latest commit (74c0312) the tests all pass on my box (including roundtrip). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you just remove the debug statements from the Oracle producer?
I mean, unless you think we should keep them?
|
@rabbiveesh I added them following how they were used in the MySQL producer, tagged them with "ORA" at the start, and included them sparingly figuring they could be useful for someone debugging their code in the future. Since they only generate output if the user specifies |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
K, wasnt sure if you had missed some in the last commit.
@mohawk2 any thoughts?
|
Hey @mohawk2, can you please take a look at this when you get a minute? |
|
@mohawk2 Happy New Year!!! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm a bit surprised by the tests being removed from the XML-related tests. If @rabbiveesh is content it's for a good reason then so am I. Otherwise, all looks fine.
@mohawk2 The only things I removed from the XML tests were the checks looking for the triggers that previously got created for all timestamp fields. Since there is no reason to create that trigger for all timestamp fields I commented out the code in commit ab42ef8. I then removed the commented-out code in commit b14da74. |
|
sorry for the delay on this; we're good to go |
Adds functionality to Producer/Oracle.pm to:
Related tests have been added to prove changes and all existing tests pass.
Automatic creation of trigger to insert sysdate to all timestamp fields has been commented out. That should not be done automatically.
Changes were modeled after the structure of Producer/MySQL.pm.
This branch also includes changes from pull request #142