http://rafb.net/paste/results/ay4rme65.html
here is my work in progress you just setup the database details for the project , and then you have the option to remove prefixes from tablenames, or add prefixes to them, change parts of fieldnames to "_id" (for example i always used <modelname>id as foreignkey field, so i set let the script replace id by _id. I've tested this a bit and it works to me. the last feature is to search for fields that contains int values, ask the user if this field contains a unix timestamp and should be converted (this works), but the actuall conversion itself is not 100% complete. i figured out 2 solutions but they seem pretty ugly to me, maybe somebody knows something more efficient (like an sql query to do this all) solution 1) read the whole column with the FROM_UNIXTIME directive, but then i don't really know how i could insert all the datetimes back in the right rows 2) read _every_ field, delete the whole table, recreate it with the column changed, and insert all the right values. this should work, but it seems to me that it requires too many code for a simple operation --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~----------~----~----~----~------~----~------~--~---
