How you can add field to an entity programmatically in Drupal 7.
Source code viewer
'field_name' => 'field1', 'cadinality' => 1, 'type' => 'number_integer', //number_decimal, text_long, text )); 'field_name' => 'field1', 'label' => 'this is an instance for field 1', 'entity_type' => 'imported_tables', 'bundle' => 'bundle_name', ));Programming Language: PHP