CREATE TABLE IF NOT EXISTS `#__sr_customfield_values` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `context` text NOT NULL,
  `value` text NOT NULL,
  `storage` text,
  `field_id` int(11) unsigned NOT NULL default 0,
  PRIMARY KEY (`id`) )
ENGINE = InnoDB DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci;

CREATE TABLE IF NOT EXISTS `#__sr_customfields` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `title` varchar(255) DEFAULT NULL,
  `field_name` varchar(255) NOT NULL,
  `state` tinyint(1) DEFAULT '1',
  `type` varchar(255) DEFAULT NULL,
  `optional` tinyint(1) DEFAULT '1',
  `created` datetime DEFAULT NULL,
  `created_by` int(10) unsigned DEFAULT '0',
  `checked_out` int(10) unsigned NOT NULL DEFAULT '0',
  `checked_out_time` datetime NULL DEFAULT NULL,
  `default` tinyint(1) unsigned DEFAULT '0',
  `context` varchar(255) DEFAULT NULL,
  `attribs` text,
  `ordering` int(10) unsigned DEFAULT '1',
  `access` int(10) unsigned NOT NULL DEFAULT 0,
  `description` text,
  `is_searchable` tinyint(1) unsigned NOT NULL DEFAULT 0,
  PRIMARY KEY (`id`) )
ENGINE = InnoDB DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci;

INSERT INTO `#__sr_customfields` VALUES ('0', 'Title', 'customer_title', '1', 'select', '1', '2015-12-03 07:28:48', '0', '0', '0000-00-00 00:00:00', '1', 'com_solidres.customer', '{\"multiple\":\"0\",\"options\":[{\"text\":\"Mr.\",\"value\":\"Mr.\"},{\"text\":\"Mrs.\",\"value\":\"Mrs.\"},{\"text\":\"Ms.\",\"value\":\"Ms.\"}],\"format\":\"dd-mm-yy\"}', '1', 0, null, 0);
INSERT INTO `#__sr_customfields` VALUES ('0', 'First name', 'customer_firstname', '1', 'text', '0', '2015-12-03 09:06:03', '0', '0', '0000-00-00 00:00:00', '1', 'com_solidres.customer', null, '2', 0, null, 0);
INSERT INTO `#__sr_customfields` VALUES ('0', 'Middlename', 'customer_middlename', '1', 'text', '1', '2015-12-03 09:06:35', '0', '0', '0000-00-00 00:00:00', '1', 'com_solidres.customer', null, '3', 0, null, 0);
INSERT INTO `#__sr_customfields` VALUES ('0', 'Last name', 'customer_lastname', '1', 'text', '0', '2015-12-03 09:07:18', '0', '0', '0000-00-00 00:00:00', '1', 'com_solidres.customer', null, '4', 0, null, 0);
INSERT INTO `#__sr_customfields` VALUES ('0', 'Email', 'customer_email', '1', 'email', '0', '2015-12-03 09:07:37', '0', '0', '0000-00-00 00:00:00', '1', 'com_solidres.customer', null, '5', 0, null, 0);
INSERT INTO `#__sr_customfields` VALUES ('0', 'Confirm Email', 'customer_email2', '1', 'email', '0', '2015-12-03 09:07:37', '0', '0', '0000-00-00 00:00:00', '1', 'com_solidres.customer', null, '6', 0, 'Confirm your email address.', 0);
INSERT INTO `#__sr_customfields` VALUES ('0', 'Landline number', 'customer_phonenumber', '1', 'text', '0', '2015-12-03 09:08:03', '0', '0', '0000-00-00 00:00:00', '1', 'com_solidres.customer', null, '7', 0, null, 0);
INSERT INTO `#__sr_customfields` VALUES ('0', 'Mobile phone', 'customer_mobilephone', '1', 'text', '1', '2015-12-03 09:08:13', '0', '0', '0000-00-00 00:00:00', '1', 'com_solidres.customer', null, '8', 0, null, 0);
INSERT INTO `#__sr_customfields` VALUES ('0', 'Company', 'customer_company', '1', 'text', '1', '2015-12-03 09:08:26', '0', '0', '0000-00-00 00:00:00', '1', 'com_solidres.customer', null, '9', 0, null, 0);
INSERT INTO `#__sr_customfields` VALUES ('0', 'Address 1', 'customer_address1', '1', 'text', '0', '2015-12-03 09:08:46', '0', '0', '0000-00-00 00:00:00', '1', 'com_solidres.customer', null, '10', 0, null, 0);
INSERT INTO `#__sr_customfields` VALUES ('0', 'Address 2', 'customer_address2', '1', 'text', '1', '2015-12-03 09:09:14', '0', '0', '0000-00-00 00:00:00', '1', 'com_solidres.customer', null, '11', 0, null, 0);
INSERT INTO `#__sr_customfields` VALUES ('0', 'VAT number', 'customer_vat_number', '1', 'text', '1', '2015-12-03 09:09:38', '0', '0', '0000-00-00 00:00:00', '1', 'com_solidres.customer', null, '12', 0, null, 0);
INSERT INTO `#__sr_customfields` VALUES ('0', 'City', 'customer_city', '1', 'text', '0', '2015-12-03 09:09:54', '0', '0', '0000-00-00 00:00:00', '1', 'com_solidres.customer', null, '13', 0, null, 0);
INSERT INTO `#__sr_customfields` VALUES ('0', 'Zip/Postal code', 'customer_zipcode', '1', 'text', '1', '2015-12-03 09:10:07', '0', '0', '0000-00-00 00:00:00', '1', 'com_solidres.customer', null, '14', 0, null, 0);
INSERT INTO `#__sr_customfields` VALUES ('0', 'Country', 'customer_country_id', '1', 'country', '0', '2015-12-03 09:10:49', '0', '0', '0000-00-00 00:00:00', '1', 'com_solidres.customer', null, '15', 0, null, 0);
INSERT INTO `#__sr_customfields` VALUES ('0', 'State/Province', 'customer_geo_state_id', '1', 'zone_state', '1', '2015-12-03 09:11:23', '0', '0', '0000-00-00 00:00:00', '1', 'com_solidres.customer', null, '16', 0, null, 0);
INSERT INTO `#__sr_customfields` VALUES ('0', 'Note', 'customer_note', '1', 'textarea', '1', '2015-12-03 09:11:49', '0', '0', '0000-00-00 00:00:00', '1', 'com_solidres.customer', null, '17', 0, null, 0);
