10 | | ==== Example ==== |
| 10 | |
| 11 | ==== Method of Calling ==== |
| 12 | {{{#!python |
| 13 | import migration_scripts |
| 14 | migration_scripts.migrating_to_unique_field(web2py_path,app,field_to_update,changed_table,list_of_tables_for_query) |
| 15 | }}} |
| 16 | |
| 17 | ==== Description of arguments ==== |
| 18 | ||= Argument =||= Description =|| |
| 19 | ||web2py_path ||The path to the web2py congaing the Eden app (i.e "/home/web2py")|| |
| 20 | ||app ||The name of the eden application of whose database needs to be migrated (i.e "eden")|| |
| 21 | ||field_to_update ||The name of the new table to which the list field needs to migrated|| |
| 22 | ||changed_table ||The name of the original table|| |
| 23 | ||list_of_tables_for_query||list_of_tables_for_query|| |
| 24 | |
| 25 | === migration_renaming_field === |
| 26 | ==== Purpose of the migration==== |
| 27 | |
| 28 | ==== Method of Calling ==== |
| 29 | {{{#!python |
| 30 | import migration_scripts |
| 31 | migration_scripts.migration_renaming_field(web2py_path, app, old_table, old_field_name , new_field_name ,attributes_to_copy) |
| 32 | }}} |
| 33 | |
| 34 | ==== Description of arguments ==== |
| 35 | ||= Argument =||= Description =|| |
| 36 | ||web2py_path ||The path to the web2py congaing the Eden app (i.e "/home/web2py")|| |
| 37 | ||app ||The name of the eden application of whose database needs to be migrated (i.e "eden")|| |
| 38 | ||old_table ||The name of the original table|| |
| 39 | ||old_field_name ||The name of the field in the new table which will hold the content of the list field|| |
| 40 | ||new_field_name ||The name of the list field in the original table|| |
| 41 | ||attributes_to_copy ||The name of the id field in the original table|| |
| 42 | |
| 43 | |
| 44 | === migration_renaming_table(web2py_path, app ,old_table_name,new_table_name) === |
| 45 | ==== Purpose of the migration==== |
| 46 | |
| 47 | ==== Example of the migration ==== |
| 65 | |
| 66 | |
| 67 | === list_field_to_reference === |
| 68 | ==== Purpose of the migration==== |
| 69 | |
| 70 | ==== Example of the migration ==== |
| 71 | http://pastebin.ubuntu.com/1142568/ |
| 72 | |
| 73 | ==== Method of Calling ==== |
| 74 | {{{#!python |
| 75 | import migration_scripts |
| 76 | migration_scripts.list_field_to_reference(web2py_path,app,new_table_name , new_list_field , list_field_name , old_table_id_field , old_table) |
| 77 | }}} |
| 78 | |
| 79 | ==== Description of arguments ==== |
| 80 | ||= Argument =||= Description =|| |
| 81 | ||web2py_path ||The path to the web2py congaing the Eden app (i.e "/home/web2py")|| |
| 82 | ||app ||The name of the eden application of whose database needs to be migrated (i.e "eden")|| |
| 83 | ||new_table_name ||The name of the new table to which the list field needs to migrated|| |
| 84 | ||new_list_field ||The name of the field in the new table which will hold the content of the list field|| |
| 85 | ||list_field_name ||The name of the list field in the original table|| |
| 86 | ||old_table_id_field ||The name of the id field in the original table|| |
| 87 | ||old_table ||The name of the original table|| |