# Issue after upgrade from 1.8 to 1.9.4 : Numeric value out of range

I just upgraded magento from 1.8 to 1.9.4, but I get this error below. I tried to change the type of attribute_id from smallint to bigint but then I get this error "Error on rename of './magento/#sql-65cb_4e6d' to './magento/eav_attribute' (errno: 150)".

Appreciate any help. Thanks.

    a:5:{i:0;s:567:"Error in file: "/home/xxxx/public_html/app/code/core/Mage/Customer/sql/customer_setup/upgrade-1.6.2.0.5-1.6.2.0.6.php" - SQLSTATE[22003]: Numeric value out of range: 167 Out of range value for column 'attribute_id' at row 1, query was: INSERT INTO eav_attribute (entity_type_id, attribute_code, backend_model, backend_type, backend_table, frontend_model, frontend_input, frontend_label, frontend_class, source_model, is_required, is_user_defined, default_value, is_unique, note) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)";i:1;s:994:"#0 /home/xxxxx/public_html/app/code/core/Mage/Core/Model/Resource/Setup.php(644): Mage::exception('Mage_Core', 'Error in file: ...')