ALTER TABLE sma_users ADD jwt_key varchar(10) NULL;
ALTER TABLE sma_users ADD host_url varchar(30) NULL;
ALTER TABLE sma_users ADD company_folder varchar(30) NULL;
ALTER TABLE sma_users ADD db_name varchar(30) NULL;
-- https://stackoverflow.com/questions/15965166/what-are-the-lengths-of-location-coordinates-latitude-and-longitude
ALTER TABLE sma_addresses ADD latitude DECIMAL(10,7) NULL AFTER vat_no;
ALTER TABLE sma_addresses ADD longitude DECIMAL(10,7) NULL AFTER vat_no;





ALTER TABLE sma_preferences_categories ADD `selection_limit` int(5) DEFAULT NULL;

ALTER TABLE sma_preferences_categories ADD `required` int(1) DEFAULT NULL COMMENT '1. Se requiere al menos una, 0. No es obligatorio';

-- to delete previusly used field geolocation
ALTER TABLE sma_addresses DROP COLUMN geo_location;

ALTER TABLE sma_settings ADD `ciiu_code` MEDIUMTEXT;

ALTER TABLE sma_settings ADD product_preferences_management tinyint(2) NOT NULL DEFAULT '0';
