-- https://www.phpmyadmin.net/
--

START TRANSACTION;



--
-- Database: `wifisocial`
--

-- --------------------------------------------------------

--
-- Table structure for table `advertisings`
--

CREATE TABLE `advertisings` (
  `id_advertising` int(10) UNSIGNED NOT NULL,
  `keyword` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `type` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `media_file` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `position` int(11) NOT NULL,
  `id_device` int(11) NOT NULL,
  `id_user` int(11) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `advertisings`
--

INSERT INTO `advertisings` (`id_advertising`, `keyword`, `type`, `media_file`, `position`, `id_device`, `id_user`, `created_at`, `updated_at`) VALUES
(7, 'Banner de Bienvenida', '0', '56052.jpg', 1, 2, 2, '2016-11-16 05:48:14', '2018-06-09 22:23:29'),
(8, 'first', '0', '75471.jpg', 2, 2, 2, '2016-11-16 22:07:26', '2016-12-01 00:25:18'),
(9, 'second', '0', '34624.jpg', 2, 2, 2, '2016-11-16 22:07:50', '2016-12-01 00:42:04'),
(10, 'Fondo de pagina', '0', '52255.jpg', 3, 2, 2, '2016-11-17 06:31:05', '2016-12-01 01:08:52'),
(11, 'third', '0', '55417.jpg', 2, 2, 2, '2016-12-01 00:33:59', '2016-12-01 00:34:13'),
(12, 'four', '0', '47831.jpg', 2, 2, 2, '2016-12-01 00:34:30', '2016-12-01 00:34:30'),
(13, 'five', '0', '71598.jpg', 2, 2, 2, '2016-12-01 00:42:45', '2016-12-01 00:42:45'),
(14, 'colombia coffe', '1', '34346.mp4', 2, 2, 2, '2016-12-01 01:59:21', '2016-12-01 01:59:21');

-- --------------------------------------------------------

--
-- Table structure for table `client_devices`
--

CREATE TABLE `client_devices` (
  `id_device` int(10) UNSIGNED NOT NULL,
  `id_user` int(10) UNSIGNED NOT NULL,
  `mac` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `ip` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `device_username` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `device_password` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `client_devices`
--

INSERT INTO `client_devices` (`id_device`, `id_user`, `mac`, `name`, `ip`, `device_username`, `device_password`, `created_at`, `updated_at`) VALUES
(2, 2, 'F4F26DF4ADA6', 'TP LINK 740N', '192.168.50.2', 'root', '', '2016-11-11 08:12:55', '2016-11-11 08:12:55'),
(3, 2, '30B5C20B390A', 'TP LINK 841ND', '192.168.50.3', '2', '', '2016-12-10 07:59:21', '2016-12-10 07:59:21');

-- --------------------------------------------------------

--
-- Table structure for table `facebook_consumers`
--

CREATE TABLE `facebook_consumers` (
  `id_consumer` int(11) NOT NULL,
  `id_fb_user` varchar(250) COLLATE utf8_unicode_ci NOT NULL,
  `first_name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `last_name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `email` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `gender` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `birthday` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `age_range` varchar(11) COLLATE utf8_unicode_ci NOT NULL,
  `religion` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `political` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `profile_link` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `website` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `locale` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `lacation` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `hometown` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `post_id` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `access_token` text COLLATE utf8_unicode_ci NOT NULL,
  `mac` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `google_consumers`
--

CREATE TABLE `google_consumers` (
  `id_consumer` int(11) NOT NULL,
  `id_goo_user` int(11) NOT NULL,
  `full_name` varchar(250) COLLATE utf8_bin NOT NULL,
  `profile_picture` varchar(250) COLLATE utf8_bin NOT NULL,
  `email` text COLLATE utf8_bin NOT NULL,
  `id_user` int(11) NOT NULL,
  `mac` varchar(200) COLLATE utf8_bin NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

-- --------------------------------------------------------

--
-- Table structure for table `groups`
--

CREATE TABLE `groups` (
  `id` int(10) UNSIGNED NOT NULL,
  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `permissions` text COLLATE utf8_unicode_ci,
  `protected` tinyint(1) NOT NULL DEFAULT '0',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `groups`
--

INSERT INTO `groups` (`id`, `name`, `permissions`, `protected`, `created_at`, `updated_at`) VALUES
(1, 'superadmin', '{\"_superadmin\":1}', 0, '2016-11-06 19:32:48', '2016-11-08 07:53:21'),
(4, 'Member', '{\"_member\":1}', 0, '2016-11-06 19:40:20', '2016-11-08 07:52:15');

-- --------------------------------------------------------

--
-- Table structure for table `instagram_consumers`
--

CREATE TABLE `instagram_consumers` (
  `id_consumer` int(200) NOT NULL,
  `id_ig_user` varchar(250) CHARACTER SET latin1 NOT NULL,
  `full_name` varchar(200) CHARACTER SET latin1 NOT NULL,
  `profile_picture` varchar(250) CHARACTER SET latin1 NOT NULL,
  `website` varchar(250) CHARACTER SET latin1 NOT NULL,
  `bio` text CHARACTER SET latin1 NOT NULL,
  `username` varchar(250) CHARACTER SET latin1 NOT NULL,
  `access_token` text CHARACTER SET latin1 NOT NULL,
  `mac` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `date` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `migrations`
--

CREATE TABLE `migrations` (
  `id` int(10) UNSIGNED NOT NULL,
  `migration` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `batch` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `migrations`
--

INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES
(1, '2012_12_06_225988_migration_cartalyst_sentry_install_throttle', 1),
(2, '2014_02_19_095545_create_users_table', 1),
(3, '2014_02_19_095623_create_user_groups_table', 1),
(4, '2014_02_19_095637_create_groups_table', 1),
(5, '2014_02_19_160516_create_permission_table', 1),
(6, '2014_02_26_165011_create_user_profile_table', 1),
(7, '2014_05_06_122145_create_profile_field_types', 1),
(8, '2014_05_06_122155_create_profile_field', 1),
(9, '2014_10_12_100000_create_password_resets_table', 1),
(10, '2016_11_06_171457_create_client_devices_table', 2),
(11, '2016_11_07_134509_create_facebook_consumers_table', 3),
(12, '2016_11_08_120137_create_advertisings_table', 4),
(13, '2016_11_08_121000_create_advertisings_table', 5),
(14, '2016_11_08_153445_create_advertisings_table', 6),
(15, '2016_11_08_154207_create_advertisings_table', 7),
(16, '2016_11_09_112205_create_portals_table', 8);

-- --------------------------------------------------------

--
-- Table structure for table `password_resets`
--

CREATE TABLE `password_resets` (
  `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `token` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `permission`
--

CREATE TABLE `permission` (
  `id` int(10) UNSIGNED NOT NULL,
  `description` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `permission` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `protected` tinyint(1) NOT NULL DEFAULT '0',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `permission`
--

INSERT INTO `permission` (`id`, `description`, `permission`, `protected`, `created_at`, `updated_at`) VALUES
(1, 'superadmin', '_superadmin', 0, '2016-11-06 19:32:48', '2016-11-06 19:32:48'),
(6, 'member', '_member', 0, '2016-11-08 05:23:09', '2016-11-08 05:23:09');

-- --------------------------------------------------------

--
-- Table structure for table `portals`
--

CREATE TABLE `portals` (
  `id_portal` int(10) UNSIGNED NOT NULL,
  `title` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `display_popup` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `close_popup_time` int(11) NOT NULL,
  `close_popup_time_seconds` int(11) NOT NULL,
  `redirect_url` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `access_code` varchar(10) COLLATE utf8_unicode_ci NOT NULL,
  `fb_page_id` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `fb_page_name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `share_action` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `share_message` text COLLATE utf8_unicode_ci NOT NULL,
  `like_us_popup` varchar(250) COLLATE utf8_unicode_ci NOT NULL,
  `close_popup_like_time` int(11) NOT NULL,
  `close_popup_like_time_seconds` int(11) NOT NULL,
  `id_device` int(10) NOT NULL,
  `id_user` int(11) NOT NULL,
  `css` text COLLATE utf8_unicode_ci,
  `connect_fb` int(20) NOT NULL DEFAULT '0',
  `connect_ig` int(20) NOT NULL DEFAULT '0',
  `connect_tw` int(20) NOT NULL DEFAULT '0',
  `connect_go` int(20) NOT NULL DEFAULT '0',
  `connect_wa` int(20) NOT NULL DEFAULT '0',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `portals`
--

INSERT INTO `portals` (`id_portal`, `title`, `display_popup`, `close_popup_time`, `close_popup_time_seconds`, `redirect_url`, `access_code`, `fb_page_id`, `fb_page_name`, `share_action`, `share_message`, `like_us_popup`, `close_popup_like_time`, `close_popup_like_time_seconds`, `id_device`, `id_user`, `css`, `connect_fb`, `connect_ig`, `connect_tw`, `connect_go`, `connect_wa`, `created_at`, `updated_at`) VALUES
(2, 'Café Sorrento', '1', 0, 2, 'https://www.facebook.com/cafesorrentoarmenia', '5555', '1374285526139276', 'Café Sorrento', '1', 'share our site', '0', 0, 5, 2, 2, '', 1, 1, 1, 1, 0, '2016-11-17 07:27:57', '2018-06-09 22:16:14');

-- --------------------------------------------------------

--
-- Table structure for table `portals_users_instagram`
--

CREATE TABLE `portals_users_instagram` (
  `id_ig_user` int(11) UNSIGNED NOT NULL,
  `id_user` int(10) NOT NULL,
  `id_portal` int(10) NOT NULL,
  `full_name` varchar(200) NOT NULL,
  `profile_picture` varchar(250) NOT NULL,
  `website` varchar(250) NOT NULL,
  `bio` text NOT NULL,
  `username` varchar(250) NOT NULL,
  `access_token` text NOT NULL,
  `date` datetime NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `portals_users_twitter`
--

CREATE TABLE `portals_users_twitter` (
  `id_tw_user` int(11) NOT NULL,
  `full_name` varchar(255) COLLATE utf8_bin NOT NULL,
  `profile_picture` varchar(255) COLLATE utf8_bin NOT NULL,
  `email` varchar(200) COLLATE utf8_bin NOT NULL,
  `username` varchar(200) COLLATE utf8_bin NOT NULL,
  `access_token` text COLLATE utf8_bin NOT NULL,
  `mac` varchar(200) COLLATE utf8_bin NOT NULL,
  `id_portal` int(11) NOT NULL,
  `id_user` int(11) NOT NULL,
  `date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

-- --------------------------------------------------------

--
-- Table structure for table `profile_field`
--

CREATE TABLE `profile_field` (
  `id` int(10) UNSIGNED NOT NULL,
  `profile_id` int(10) UNSIGNED NOT NULL,
  `profile_field_type_id` int(10) UNSIGNED NOT NULL,
  `value` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `profile_field_type`
--

CREATE TABLE `profile_field_type` (
  `id` int(10) UNSIGNED NOT NULL,
  `description` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `throttle`
--

CREATE TABLE `throttle` (
  `id` int(10) UNSIGNED NOT NULL,
  `user_id` int(10) UNSIGNED DEFAULT NULL,
  `ip_address` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `attempts` int(11) NOT NULL DEFAULT '0',
  `suspended` tinyint(1) NOT NULL DEFAULT '0',
  `banned` tinyint(1) NOT NULL DEFAULT '0',
  `last_attempt_at` timestamp NULL DEFAULT NULL,
  `suspended_at` timestamp NULL DEFAULT NULL,
  `banned_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `throttle`
--

INSERT INTO `throttle` (`id`, `user_id`, `ip_address`, `attempts`, `suspended`, `banned`, `last_attempt_at`, `suspended_at`, `banned_at`) VALUES
(3, 1, '::1', 0, 0, 0, NULL, NULL, NULL),
(4, 2, '::1', 0, 0, 0, NULL, NULL, NULL),
(5, 3, '::1', 0, 0, 0, NULL, NULL, NULL),
(6, 1, '181.60.34.243', 0, 0, 0, NULL, NULL, NULL),
(7, 3, '181.60.34.243', 5, 1, 0, '2016-11-16 04:19:46', '2016-11-16 04:19:46', NULL),
(8, 2, '181.60.34.243', 0, 0, 0, NULL, NULL, NULL),
(9, 1, '190.9.208.186', 0, 0, 0, NULL, NULL, NULL),
(10, 2, '181.51.186.112', 0, 0, 0, NULL, NULL, NULL),
(11, 1, '127.0.0.1', 1, 0, 0, '2018-06-09 20:07:57', NULL, NULL),
(12, 2, '127.0.0.1', 0, 0, 0, NULL, NULL, NULL),
(13, 3, '127.0.0.1', 0, 0, 0, NULL, NULL, NULL);

-- --------------------------------------------------------

--
-- Table structure for table `tokens`
--

CREATE TABLE `tokens` (
  `token` char(40) NOT NULL,
  `date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `platform` varchar(100) DEFAULT NULL,
  `id_fb_user` varchar(250) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `tokens`
--

INSERT INTO `tokens` (`token`, `date`, `platform`, `id_fb_user`) VALUES
('1822783a5ceb082823786e098c55adacdb4b4ebb', '2018-06-09 18:09:01', 'facebook', '10154208364573131');

-- --------------------------------------------------------

--
-- Table structure for table `twitter_consumers`
--

CREATE TABLE `twitter_consumers` (
  `id_consumer` int(11) NOT NULL,
  `id_tw_user` int(11) NOT NULL,
  `full_name` varchar(255) COLLATE utf8_bin NOT NULL,
  `profile_picture` varchar(255) COLLATE utf8_bin NOT NULL,
  `email` varchar(200) COLLATE utf8_bin NOT NULL,
  `username` varchar(200) COLLATE utf8_bin NOT NULL,
  `access_token` text COLLATE utf8_bin NOT NULL,
  `mac` varchar(200) COLLATE utf8_bin NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

-- --------------------------------------------------------

--
-- Table structure for table `users`
--

CREATE TABLE `users` (
  `id` int(10) UNSIGNED NOT NULL,
  `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `password` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `permissions` text COLLATE utf8_unicode_ci,
  `activated` tinyint(1) NOT NULL DEFAULT '0',
  `banned` tinyint(1) NOT NULL DEFAULT '0',
  `activation_code` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `activated_at` timestamp NULL DEFAULT NULL,
  `last_login` timestamp NULL DEFAULT NULL,
  `persist_code` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `reset_password_code` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `protected` tinyint(1) NOT NULL DEFAULT '0',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `users`
--

INSERT INTO `users` (`id`, `email`, `password`, `permissions`, `activated`, `banned`, `activation_code`, `activated_at`, `last_login`, `persist_code`, `reset_password_code`, `protected`, `created_at`, `updated_at`) VALUES
(1, 'alex.rivera.ws@gmail.com', '$2y$10$tEnwYFHG3JmqXEDSfDtEKOblslP.3LTwOjZd38gB2lTY4si824Z.a', NULL, 1, 0, NULL, NULL, '2016-12-10 07:49:23', '$2y$10$6clMEZKKcZ97ipvI9Nd4yOTjqBoFqE6/SZsiFdEp018D7YYaMl2uC', NULL, 0, '2016-11-06 19:32:48', '2016-12-10 07:49:23'),
(2, 'client@gmail.com', '$2y$10$tEnwYFHG3JmqXEDSfDtEKOblslP.3LTwOjZd38gB2lTY4si824Z.a', '{\"_member\":1}', 1, 0, NULL, NULL, '2018-06-09 20:09:17', '$2y$10$8Qp9bEo7J1eKC64wXwyU4OZjAL86sNf22lHwn.Bh.qXvJaGtY.9ZG', NULL, 0, '2016-11-06 19:42:56', '2018-06-09 20:09:17'),
(3, 'admin@gmail.com', '$2y$10$tEnwYFHG3JmqXEDSfDtEKOblslP.3LTwOjZd38gB2lTY4si824Z.a', '{\"_superadmin\":1}', 1, 0, 'Uc8hhzjGBfkxAyk5DR4MfhowceUSVnA9VLbviYJ8LW', NULL, '2018-06-09 23:12:33', '$2y$10$BAXSoEx.PzCWM8UzX2h8zevdtGi37LetXSZHucQSXscFCbK/ARz2W', NULL, 0, '2016-11-10 04:20:59', '2018-06-09 23:12:33');

-- --------------------------------------------------------

--
-- Table structure for table `users_devices_connections`
--

CREATE TABLE `users_devices_connections` (
  `id_device` int(11) NOT NULL,
  `id_fb_user` varchar(250) NOT NULL,
  `gw_address` varchar(250) NOT NULL,
  `gw_port` varchar(10) NOT NULL,
  `gw_id` varchar(50) NOT NULL,
  `ip` varchar(50) NOT NULL,
  `mac` varchar(50) NOT NULL,
  `platform` varchar(200) NOT NULL,
  `date` datetime NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `users_devices_connections`
--

INSERT INTO `users_devices_connections` (`id_device`, `id_fb_user`, `gw_address`, `gw_port`, `gw_id`, `ip`, `mac`, `platform`, `date`) VALUES
(1, '3412492687', '10.0.0.1', '2060', 'F4F26DF4ADA6', '10.0.0.148', '58:7f:66:e2:b0:6c', 'instagram', '2016-12-09 06:56:25'),
(2, '3412492687', '10.0.0.1', '2060', 'F4F26DF4ADA6', '10.0.0.148', '58:7f:66:e2:b0:6c', 'instagram', '2016-12-09 08:38:48'),
(3, '381358448878489', '10.0.0.1', '2060', 'F4F26DF4ADA6', '10.0.0.160', '24:df:6a:d8:45:16', 'facebook', '2016-12-09 11:23:58'),
(4, '10154208364573131', '10.0.0.3', '2060', 'F4F26DF4ADA6', '10.0.0.176', '4c:66:41:8b:bf:a0', 'facebook', '2016-12-10 10:35:42');

-- --------------------------------------------------------

--
-- Table structure for table `users_groups`
--

CREATE TABLE `users_groups` (
  `user_id` int(10) UNSIGNED NOT NULL,
  `group_id` int(10) UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `users_groups`
--

INSERT INTO `users_groups` (`user_id`, `group_id`) VALUES
(1, 1),
(2, 4),
(3, 4);

-- --------------------------------------------------------

--
-- Table structure for table `user_profile`
--

CREATE TABLE `user_profile` (
  `id` int(10) UNSIGNED NOT NULL,
  `user_id` int(10) UNSIGNED NOT NULL,
  `code` varchar(25) COLLATE utf8_unicode_ci DEFAULT NULL,
  `vat` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL,
  `first_name` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
  `last_name` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
  `phone` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL,
  `state` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL,
  `city` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
  `country` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
  `zip` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL,
  `address` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
  `avatar` blob,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `user_profile`
--

INSERT INTO `user_profile` (`id`, `user_id`, `code`, `vat`, `first_name`, `last_name`, `phone`, `state`, `city`, `country`, `zip`, `address`, `avatar`, `created_at`, `updated_at`) VALUES
(1, 1, '1112768143', NULL, 'Jhon Alexander', 'Grisales Rivera', '3165053657', 'Quindio', 'Armenia', 'Colombia', '630001', 'cra 14 ', 0x[encoded data, 12004 characters], '2016-11-06 19:32:48', '2016-11-06 19:39:21'),
(2, 2, '11127681432', NULL, 'Manuela', 'Rivera', '675303127', 'BU', 'Chile', 'Antofagasta', '09400', 'Calle', 0x[encoded data, 14978 characters], '2016-11-06 19:42:56', '2016-11-06 19:44:37');
INSERT INTO `user_profile` (`id`, `user_id`, `code`, `vat`, `first_name`, `last_name`, `phone`, `state`, `city`, `country`, `zip`, `address`, `avatar`, `created_at`, `updated_at`) VALUES
(3, 3, '11127681438', NULL, 'Jhon Alexander', 'Rivera', '675303127', 'BU', 'Acapulco', 'Mexico', '09800', 'Calle', 0x[encoded data, 33442 characters], '2016-11-10 04:20:59', '2016-11-10 22:40:15');

--
-- Indexes for dumped tables
--

--
-- Indexes for table `advertisings`
--
ALTER TABLE `advertisings`
  ADD PRIMARY KEY (`id_advertising`);

--
-- Indexes for table `client_devices`
--
ALTER TABLE `client_devices`
  ADD PRIMARY KEY (`id_device`),
  ADD UNIQUE KEY `mac` (`mac`),
  ADD KEY `client_devices_id_user_foreign` (`id_user`);

--
-- Indexes for table `facebook_consumers`
--
ALTER TABLE `facebook_consumers`
  ADD PRIMARY KEY (`id_consumer`);

--
-- Indexes for table `google_consumers`
--
ALTER TABLE `google_consumers`
  ADD PRIMARY KEY (`id_consumer`);

--
-- Indexes for table `groups`
--
ALTER TABLE `groups`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `groups_name_unique` (`name`);

--
-- Indexes for table `instagram_consumers`
--
ALTER TABLE `instagram_consumers`
  ADD PRIMARY KEY (`id_consumer`);

--
-- Indexes for table `migrations`
--
ALTER TABLE `migrations`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `password_resets`
--
ALTER TABLE `password_resets`
  ADD KEY `password_resets_email_index` (`email`),
  ADD KEY `password_resets_token_index` (`token`);

--
-- Indexes for table `permission`
--
ALTER TABLE `permission`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `portals`
--
ALTER TABLE `portals`
  ADD PRIMARY KEY (`id_portal`);

--
-- Indexes for table `portals_users_instagram`
--
ALTER TABLE `portals_users_instagram`
  ADD PRIMARY KEY (`id_ig_user`);

--
-- Indexes for table `portals_users_twitter`
--
ALTER TABLE `portals_users_twitter`
  ADD PRIMARY KEY (`id_tw_user`);

--
-- Indexes for table `profile_field`
--
ALTER TABLE `profile_field`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `profile_field_profile_id_profile_field_type_id_unique` (`profile_id`,`profile_field_type_id`),
  ADD KEY `profile_field_profile_field_type_id_foreign` (`profile_field_type_id`);

--
-- Indexes for table `profile_field_type`
--
ALTER TABLE `profile_field_type`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `throttle`
--
ALTER TABLE `throttle`
  ADD PRIMARY KEY (`id`),
  ADD KEY `throttle_user_id_index` (`user_id`);

--
-- Indexes for table `tokens`
--
ALTER TABLE `tokens`
  ADD PRIMARY KEY (`token`),
  ADD UNIQUE KEY `token` (`token`);

--
-- Indexes for table `twitter_consumers`
--
ALTER TABLE `twitter_consumers`
  ADD PRIMARY KEY (`id_consumer`);

--
-- Indexes for table `users`
--
ALTER TABLE `users`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `users_email_unique` (`email`),
  ADD KEY `users_activation_code_index` (`activation_code`),
  ADD KEY `users_reset_password_code_index` (`reset_password_code`);

--
-- Indexes for table `users_devices_connections`
--
ALTER TABLE `users_devices_connections`
  ADD PRIMARY KEY (`id_device`);

--
-- Indexes for table `users_groups`
--
ALTER TABLE `users_groups`
  ADD PRIMARY KEY (`user_id`,`group_id`);

--
-- Indexes for table `user_profile`
--
ALTER TABLE `user_profile`
  ADD PRIMARY KEY (`id`),
  ADD KEY `user_profile_user_id_foreign` (`user_id`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `advertisings`
--
ALTER TABLE `advertisings`
  MODIFY `id_advertising` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=15;

--
-- AUTO_INCREMENT for table `client_devices`
--
ALTER TABLE `client_devices`
  MODIFY `id_device` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `facebook_consumers`
--
ALTER TABLE `facebook_consumers`
  MODIFY `id_consumer` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=21;

--
-- AUTO_INCREMENT for table `google_consumers`
--
ALTER TABLE `google_consumers`
  MODIFY `id_consumer` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `groups`
--
ALTER TABLE `groups`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT for table `instagram_consumers`
--
ALTER TABLE `instagram_consumers`
  MODIFY `id_consumer` int(200) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=14;

--
-- AUTO_INCREMENT for table `migrations`
--
ALTER TABLE `migrations`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=17;

--
-- AUTO_INCREMENT for table `permission`
--
ALTER TABLE `permission`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;

--
-- AUTO_INCREMENT for table `portals`
--
ALTER TABLE `portals`
  MODIFY `id_portal` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `portals_users_twitter`
--
ALTER TABLE `portals_users_twitter`
  MODIFY `id_tw_user` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `profile_field`
--
ALTER TABLE `profile_field`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `profile_field_type`
--
ALTER TABLE `profile_field_type`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `throttle`
--
ALTER TABLE `throttle`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=14;

--
-- AUTO_INCREMENT for table `twitter_consumers`
--
ALTER TABLE `twitter_consumers`
  MODIFY `id_consumer` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `users`
--
ALTER TABLE `users`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `users_devices_connections`
--
ALTER TABLE `users_devices_connections`
  MODIFY `id_device` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT for table `user_profile`
--
ALTER TABLE `user_profile`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- Constraints for dumped tables
--

--
-- Constraints for table `client_devices`
--
ALTER TABLE `client_devices`
  ADD CONSTRAINT `client_devices_id_user_foreign` FOREIGN KEY (`id_user`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `profile_field`
--
ALTER TABLE `profile_field`
  ADD CONSTRAINT `profile_field_profile_field_type_id_foreign` FOREIGN KEY (`profile_field_type_id`) REFERENCES `profile_field_type` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `profile_field_profile_id_foreign` FOREIGN KEY (`profile_id`) REFERENCES `user_profile` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `user_profile`
--
ALTER TABLE `user_profile`
  ADD CONSTRAINT `user_profile_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
COMMIT;

