Esempio n. 1
0
    def execute(my):    
        search_type_obj = SearchType.get(my.search_type)
        database = search_type_obj.get_database()
        table = search_type_obj.get_table()

        alter = AlterTable(my.search_type)
        alter.drop(my.attr_name)

        # log it first before committing
        AlterTableUndo.log_drop(database,table, my.attr_name)
        alter.commit()  
Esempio n. 2
0
    def execute(my):    
        search_type_obj = SearchType.get(my.search_type)
        database = search_type_obj.get_database()
        table = search_type_obj.get_table()

        alter = AlterTable(my.search_type)
        #TODO: check the varchar length and put it in
        alter.modify(my.attr_name, my.data_type, not_null=not my.nullable)

        # log it first before committing to get the corrent from and to data type
        AlterTableUndo.log_modify(database,table, my.attr_name, \
             my.data_type, not my.nullable)
        alter.commit()
Esempio n. 3
0
    def execute(self):    
        search_type_obj = SearchType.get(self.search_type)
        database = search_type_obj.get_database()
        table = search_type_obj.get_table()

        alter = AlterTable(self.search_type)
        alter.drop(self.attr_name)

        # log it first before committing
        AlterTableUndo.log_drop(database,table, self.attr_name)
        alter.commit()  
Esempio n. 4
0
    def execute(self):    
        search_type_obj = SearchType.get(self.search_type)
        database = search_type_obj.get_database()
        table = search_type_obj.get_table()

        alter = AlterTable(self.search_type)
        #TODO: check the varchar length and put it in
        alter.modify(self.attr_name, self.data_type, not_null=not self.nullable)

        # log it first before committing to get the corrent from and to data type
        AlterTableUndo.log_modify(database,table, self.attr_name, \
             self.data_type, not self.nullable)
        alter.commit()