Migration and sanitisation of strings prior to switch

willhallmusic - October 20, 2009 - 15:28

Within migration to drupal it obviously requires some sanitisation of the strings from one database to the other. are there any modules specifically build for this process? For example enabling multiple database connections and sanitising strings, be it through preg_replace or something like that, then inserting into the drupal database, either as a node type or such like? Obviously it could be used specifically when migrating from bespoke database systems.

Migrate module

CAZephyr - October 20, 2009 - 16:32

There is a Migrate module that you should take a look at.

I'm not sure what you have in mind in terms of sanitizing. Certainly you need to escape or filter input to ensure that it can't be interpreted as SQL. But, beyond that it's the drupal philosophy to accept input, store it in a harmless fashion, and then output it (also in a harmless fashion.
If you're looking for specific types of input then validating input makes sense. But, for text fields it often makes much more sense to validate the output.

 
 

Drupal is a registered trademark of Dries Buytaert.