Bug #522
closed
myamiweb/xml/appion_extra.xml can not be created directly from sinedon/maketables.py
Added by Anchi Cheng over 14 years ago.
Updated over 14 years ago.
Description
Too much hand editing is required to remove tables that is already created by defaultprocessingtables.xml. The latter has specialized type set to varchar that sinedon can not handle.
- Status changed from Assigned to In Code Review
- Assignee changed from Anchi Cheng to Neil Voss
- % Done changed from 0 to 100
r14068 make the procedure more automatic. created makeNonExistingTables function in maketables.py so that schema13713.py can call it. The function checks for table existance so that it does not alter existing table. Therefore, it should only be used at the end of appion database upgrade.
For future appiondata.py change, these steps should be taken to update appion_extra.xml
1. Modify myamiweb/project/getproject.php so that the part that importTables from appion_extra.xml is commented out.
2. Create an appion processing database by linking a project to a non-existing ap% database such as aptest
3. Run maketables.py like this in sinedon directory:
maketables.py --sinedon-name=appiondata --module-name=appionlib.appiondata --xml-file=appion_extra.xml --db-name=aptest
4. Move the resulting appion_extra.xml to myamiweb/xml/ folder
5. Change myamiweb/project/getproject.php back
6. You can test the new appion_extra.xml by unlink and link the same project to aptest
7. commit the new appion_extra.xml
A new schema upgrade script should be updated similarly in the future.
- Status changed from In Code Review to Assigned
- Assignee changed from Neil Voss to Anchi Cheng
Code is okay. But what if we need to add columns to existing tables. You have removed that functionality.
If you want to add a separate path to add columns to existing tables, please do so, although I think we should have proper schema-rxxxxx.py for that.
- Status changed from Assigned to In Code Review
- Assignee changed from Anchi Cheng to Neil Voss
make check table exists an input to the function. Set it to True if xml file is output or called from schema upgrade script. r14103
- Status changed from In Code Review to In Test
- Assignee changed from Neil Voss to Anchi Cheng
Code looks good. Thanks for the change.
- Status changed from In Test to Closed
Also available in: Atom
PDF