Project

General

Profile

Actions

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.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Target version:
Start date:
05/20/2010
Due date:
% Done:

100%

Estimated time:
Affected Version:
Show in known bugs:
Workaround:

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.


Related issues 1 (0 open1 closed)

Related to Appion - Bug #486: appion tables not initializedClosedAmber Herold05/15/2010

Actions
Actions #1

Updated by Anchi Cheng over 14 years ago

  • 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.

Actions #2

Updated by Neil Voss over 14 years ago

  • 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.

Actions #3

Updated by Anchi Cheng over 14 years ago

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.

Actions #4

Updated by Anchi Cheng over 14 years ago

  • 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

Actions #5

Updated by Neil Voss over 14 years ago

  • Status changed from In Code Review to In Test
  • Assignee changed from Neil Voss to Anchi Cheng

Code looks good. Thanks for the change.

Actions #6

Updated by Anchi Cheng over 14 years ago

  • Status changed from In Test to Closed
Actions

Also available in: Atom PDF