-
Notifications
You must be signed in to change notification settings - Fork 83
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
add alter() & preview_alter() #559
Conversation
failing because of indentation error. haven't updated test cases for alter yet. |
still need to do something about make methods, add strict mode support to avoid data corruption. |
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.
add nosetests
Like this? Should i include tests for all(dj.imported,dj.computed,dj.manual) as well? datajoint-python/tests/test_relation.py Lines 246 to 299 in d807be0
|
-rename 'preview_alter' to 'make_alter'. -raise datajoint error for unsupported modifications(PK,FK,Index,External) -support reordering for supported(non foreign, non index, non external secondary) attributes
the alter commands generated by my code are the same for each version of python. I am trying to find the cause but if anyone would like to take a look on my forked builds: there 2 separate alters. 1 to alter and 2nd to reverse the first alter. I am getting error when executing the 2nd alter. #17 is passing without modifying enum values, but with reorder support.(python 3.6) oddly enough, as std output in the job log shows, table contents for each python are the same after the 1st alter and there's no '0000-00-00' date value, despite the error. |
closing for a pending resubmission |
A method for altering the definitions of tables with data #110
Only supports table comment, and secondary attribute changes (ADD,DROP,CHANGE).
new attributes are nullable if no default value is specified.
This is the best approach I have aside from maybe using a third party library or doing the same parsing on mysql ddl.