Not much clear what you want to do really. Anyway this is the script to create a product attribute after you created the attribute set.
<?php
$th = new Mage_Catalog_Model_Resource_Setup();
$th->addAttribute(Mage_Catalog_Model_Product::ENTITY, 'your_custom_attribute_code', array(
'group' => 'Prices',
'type' => 'text',
'attribute_set' => 'Default', // Your custom Attribute set
'backend' => '',
'frontend' => '',
'label' => 'My Custom Attribute',
'input' => 'text',
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL,
'visible' => true,
'required' => false,
'user_defined' => true,
'default' => '1',
'searchable' => false,
'filterable' => true,
'comparable' => false,
'visible_on_front' => true,
'visible_in_advanced_search' => true,
'used_in_product_listing' => true,
'unique' => false,
'apply_to' => 'simple', // Apply to simple product type
) );
Note : For further info please refer http://www.magentocommerce.com/wiki/5_-_modules_and_development/catalog/programmatically_adding_attributes_and_attribute_sets
You could try inserting the data manually by exporting the data from your local database, and running a SQL command like this for each of the tables you need to import with the data from your local table.
INSERT INTO catalog_eav_attribute
(attribute_id
, frontend_input_renderer
, is_global
, is_visible
, is_searchable
, is_filterable
, is_comparable
, is_visible_on_front
, is_html_allowed_on_front
, is_used_for_price_rules
, is_filterable_in_search
, used_in_product_listing
, used_for_sort_by
, apply_to
, is_visible_in_advanced_search
, position
, is_wysiwyg_enabled
, is_used_for_promo_rules
, is_required_in_admin_store
, is_used_in_grid
, is_visible_in_grid
, is_filterable_in_grid
, search_weight
, additional_data
) VALUES
There are obviously more than just one table that will require your attention, but this is the fastest solution that I found.
Best Answer
1.Find id of "Attribute Set" in database column
eav_attribute_set.attribute_set_id
2.
UPDATE `eav_entity_type` SET `default_attribute_set_id` = '
%YOUR_Attribute_Set_ID%' WHERE `eav_entity_type`.`entity_type_code` = 'catalog_product';
3. reindex and clear cache