Update method modified

key attributes will check and alter.
only last attribute added in the database and break, but now any places can be add attributes
add .gitignore as this is public repository.
migration xml updated but very minor changes, can be ignore
suggestions: as in php isn't data type dependent, so arr, str before variable isn't a good idea if we check php standard coding convention