Changes between Version 10 and Version 11 of GSOC2012/DatabaseMigration/Userguildlines


Ignore:
Timestamp:
08/16/12 16:08:45 (12 years ago)
Author:
anubhav
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • GSOC2012/DatabaseMigration/Userguildlines

    v10 v11  
    55
    66Methods in migration_scripts file
    7 === migrating_to_unique_field ===
    8 ==== Purpose of the migration====
    9 
    10 
    11 ==== Method of Calling ====
    12 {{{#!python
    13 import migration_scripts
    14 import mapping_function
    15 migration_scripts.migrating_to_unique_field( web2py_path, app ,field_to_update , changed_table , list_of_tables)
    16 }}}
    17 
    18 ==== Description of arguments ====
    19 ||= Argument =||= Description =||
    20 ||web2py_path ||The path to the web2py congaing the Eden app  (i.e "/home/web2py")||
    21 ||app ||The name of the eden application of whose database needs to be migrated (i.e "eden")||
    22 ||field_to_update ||The name of the field with the unique and notnull property||
    23 ||changed_table ||The name of the original table in which the new unique field id added||
    24 ||list_of_tables ||These contains the list of tables which the changed_tables references||
    25 
    267=== migration_renaming_field ===
    278==== Purpose of the migration====
    28 Renaming a particular table , Thus if any fields point to that table that should be handled too.
     9Renaming a particular field , while keeping the other properties of the field same. Also if there are some index on that table that should be recreated and other constraints should remain unchanged too.
    2910
    3011==== Method of Calling ====
     
    4627=== migration_renaming_table ===
    4728==== Purpose of the migration====
    48 Renaming a particular field , while keeping the other properties of the field same. Also if there are some index on that table that should be recreated and other constraints should remain unchanged too.
     29Renaming a particular table , Thus if any fields point to that table that should be handled too.
    4930
    5031==== Method of Calling ====
     
    6142||new_table_name ||The name of the table after renaming||
    6243
     44
     45=== migrating_to_unique_field ===
     46==== Purpose of the migration====
     47Adding values to a new field , or update an existing field through the mappings given through the mapping_funation
     48
     49==== Method of Calling ====
     50{{{#!python
     51import migration_scripts
     52import mapping_function
     53migration_scripts.migrating_to_unique_field( web2py_path, app ,field_to_update , changed_table , list_of_tables)
     54}}}
     55
     56==== Description of arguments ====
     57||= Argument =||= Description =||
     58||web2py_path ||The path to the web2py congaing the Eden app  (i.e "/home/web2py")||
     59||app ||The name of the eden application of whose database needs to be migrated (i.e "eden")||
     60||field_to_update ||The name of the field to be updated according to the mapping||
     61||changed_table ||The name of the original table in which the new unique field id added||
     62||list_of_tables ||These contains the list of tables which the changed_tables references||
    6363
    6464=== list_field_to_reference ===