-- https://www.phpmyadmin.net/
--
-- Servidor: localhost:3306
-- Tiempo de generación: 29-01-2022 a las 12:52:30
-- Versión del servidor: 8.0.27-0ubuntu0.20.04.1
-- Versión de PHP: 7.4.3

START TRANSACTION;



--
-- Base de datos: `autoclaim`
--

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

--
-- Estructura de tabla para la tabla `autoclaims`
--

CREATE TABLE `autoclaims` (
  `id` bigint UNSIGNED NOT NULL,
  `user_id` bigint UNSIGNED NOT NULL,
  `coin_id` bigint UNSIGNED NOT NULL,
  `frequency` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `boost` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `status` enum('running','completed','expired') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'running',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Volcado de datos para la tabla `autoclaims`
--

INSERT INTO `autoclaims` (`id`, `user_id`, `coin_id`, `frequency`, `boost`, `status`, `created_at`, `updated_at`) VALUES
(15, 1, 1, '1', '1', 'expired', '2021-11-17 07:43:10', '2021-11-17 07:49:32'),
(16, 1, 2, '1', '1', 'expired', '2021-11-17 07:43:11', '2021-11-17 07:49:32');

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

--
-- Estructura de tabla para la tabla `autoclaims_histories`
--

CREATE TABLE `autoclaims_histories` (
  `id` bigint UNSIGNED NOT NULL,
  `energy` int NOT NULL DEFAULT '0',
  `claimed` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `autoclaim_id` bigint UNSIGNED NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Volcado de datos para la tabla `autoclaims_histories`
--

INSERT INTO `autoclaims_histories` (`id`, `energy`, `claimed`, `autoclaim_id`, `created_at`, `updated_at`) VALUES
(12, 50, '0.10000000', 15, '2021-11-17 07:43:12', '2021-11-17 07:43:12'),
(13, 30, '0.00500000', 16, '2021-11-17 07:43:13', '2021-11-17 07:43:13'),
(14, 50, '0.10000000', 15, '2021-11-17 07:45:15', '2021-11-17 07:45:15'),
(15, 30, '0.00500000', 16, '2021-11-17 07:45:16', '2021-11-17 07:45:16'),
(16, 50, '0.10000000', 15, '2021-11-17 07:47:19', '2021-11-17 07:47:19'),
(17, 30, '0.00500000', 16, '2021-11-17 07:47:19', '2021-11-17 07:47:19'),
(18, 50, '0.10000000', 15, '2021-11-17 07:49:20', '2021-11-17 07:49:20'),
(19, 30, '0.00500000', 16, '2021-11-17 07:49:20', '2021-11-17 07:49:20');

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

--
-- Estructura de tabla para la tabla `balances`
--

CREATE TABLE `balances` (
  `id` bigint UNSIGNED NOT NULL,
  `balance` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `user_id` bigint UNSIGNED NOT NULL,
  `coin_id` bigint UNSIGNED NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Volcado de datos para la tabla `balances`
--

INSERT INTO `balances` (`id`, `balance`, `user_id`, `coin_id`, `created_at`, `updated_at`) VALUES
(1, '0.198008', 1, 1, '2021-11-16 02:25:40', '2021-11-18 01:56:01'),
(2, '0.02', 1, 2, '2021-11-17 06:49:14', '2021-11-17 07:49:20');

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

--
-- Estructura de tabla para la tabla `deposit_histories`
--

CREATE TABLE `deposit_histories` (
  `id` bigint UNSIGNED NOT NULL,
  `amount` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '0',
  `status` enum('pending','completed','expired') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'pending',
  `coin_id` bigint UNSIGNED NOT NULL,
  `user_id` bigint UNSIGNED NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Volcado de datos para la tabla `deposit_histories`
--

INSERT INTO `deposit_histories` (`id`, `amount`, `status`, `coin_id`, `user_id`, `created_at`, `updated_at`) VALUES
(1, '0.001', 'pending', 1, 1, '2022-01-29 08:42:36', '2022-01-29 08:42:36');

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

--
-- Estructura de tabla para la tabla `failed_jobs`
--

CREATE TABLE `failed_jobs` (
  `id` bigint UNSIGNED NOT NULL,
  `uuid` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `connection` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `queue` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `payload` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
  `exception` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
  `failed_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Estructura de tabla para la tabla `login_histories`
--

CREATE TABLE `login_histories` (
  `id` bigint UNSIGNED NOT NULL,
  `ip` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `asn` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `provider` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `country` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `proxy` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `type` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `risk` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `user_id` bigint UNSIGNED NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Volcado de datos para la tabla `login_histories`
--

INSERT INTO `login_histories` (`id`, `ip`, `asn`, `provider`, `country`, `proxy`, `type`, `risk`, `user_id`, `created_at`, `updated_at`) VALUES
(1, '127.0.0.1', NULL, NULL, NULL, NULL, NULL, NULL, 1, '2021-11-18 03:35:39', '2021-11-18 03:35:39'),
(2, '127.0.0.1', '0', NULL, NULL, NULL, NULL, NULL, 1, '2021-11-18 05:16:22', '2021-11-18 05:16:22'),
(3, '127.0.0.1', 'AS16276', NULL, NULL, NULL, NULL, NULL, 1, '2021-11-18 05:19:33', '2021-11-18 05:19:33'),
(4, '127.0.0.1', 'AS16276', 'OVH SAS', 'France', 'yes', 'VPN', '66', 1, '2021-11-18 05:39:01', '2021-11-18 05:39:01'),
(5, '127.0.0.1', 'AS16276', 'OVH SAS', 'France', 'yes', 'VPN', '66', 1, '2021-11-18 05:59:58', '2021-11-18 05:59:58'),
(6, '37.60.48.2', 'AS16276', 'OVH SAS', 'France', 'yes', 'VPN', '66', 1, '2021-11-18 06:24:00', '2021-11-18 06:24:00'),
(7, '37.60.48.2', 'AS16276', 'OVH SAS', 'France', 'yes', 'VPN', '66', 1, '2021-11-18 06:24:35', '2021-11-18 06:24:35'),
(8, '37.60.48.2', 'AS16276', 'OVH SAS', 'France', 'yes', 'VPN', '66', 1, '2021-11-18 06:43:57', '2021-11-18 06:43:57'),
(9, '37.60.48.2', 'AS16276', 'OVH SAS', 'France', 'yes', 'VPN', '66', 1, '2021-11-18 06:44:38', '2021-11-18 06:44:38');

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

--
-- Estructura de tabla para la tabla `migrations`
--

CREATE TABLE `migrations` (
  `id` int UNSIGNED NOT NULL,
  `migration` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `batch` int NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Volcado de datos para la tabla `migrations`
--

INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES
(87, '2014_10_12_000000_create_users_table', 1),
(88, '2014_10_12_100000_create_password_resets_table', 1),
(89, '2019_08_19_000000_create_failed_jobs_table', 1),
(90, '2019_12_14_000001_create_personal_access_tokens_table', 1),
(91, '2021_10_12_201511_create_tickets_table', 1),
(92, '2021_10_14_155101_create_ticket_answers_table', 1),
(93, '2021_10_14_182705_create_referrals_table', 1),
(94, '2021_10_14_222230_create_coins_table', 1),
(95, '2021_10_14_233853_create_balances_table', 1),
(96, '2021_10_15_152603_create_withdraws_table', 1),
(97, '2021_10_16_225822_create_settings_table', 1),
(98, '2021_10_17_190723_create_shortlinks_table', 1),
(99, '2021_10_18_193125_create_shortlinks_histories_table', 1),
(100, '2021_10_19_192923_create_autoclaims_table', 1),
(101, '2021_10_20_153605_create_autoclaims_histories_table', 1),
(111, '2021_11_12_234750_create_staking_plans_table', 2),
(112, '2021_11_13_184329_create_staking_histories_table', 2),
(113, '2021_11_17_211542_create_login_histories_table', 3),
(114, '2021_11_18_181505_create_deposit_histories_table', 4);

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

--
-- Estructura de tabla para la tabla `referrals`
--

CREATE TABLE `referrals` (
  `id` bigint UNSIGNED NOT NULL,
  `refers_to` bigint UNSIGNED NOT NULL,
  `referred_by` bigint UNSIGNED NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Estructura de tabla para la tabla `settings`
--

CREATE TABLE `settings` (
  `id` bigint UNSIGNED NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `value` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Volcado de datos para la tabla `settings`
--

INSERT INTO `settings` (`id`, `name`, `value`, `created_at`, `updated_at`) VALUES
(1, 'referral_earning', '20', '2021-10-27 18:48:35', '2021-11-18 06:47:41'),
(2, 'hcaptcha_key', 'YOUR_KEY', '2021-10-27 18:48:35', '2021-11-18 06:47:41'),
(3, 'hcaptcha_secret', 'YOUR_SECRET', '2021-10-27 18:49:14', '2021-11-18 06:47:41'),
(4, 'level_1', '0', '2021-10-28 17:27:45', '2021-11-18 06:47:41'),
(5, 'level_2', '500', '2021-10-28 17:27:45', '2021-11-18 06:47:41'),
(6, 'level_3', '1000', '2021-10-28 17:28:31', '2021-11-18 06:47:41'),
(7, 'level_4', '1500', '2021-10-28 17:28:31', '2021-11-18 06:47:42'),
(8, 'level_5', '3000', '2021-10-28 17:29:15', '2021-11-18 06:47:42'),
(9, 'level_6', '6000', NULL, '2021-11-18 06:47:42'),
(10, 'level_7', '10000', '2021-10-28 17:29:42', '2021-11-18 06:47:42'),
(11, 'level_8', '20000', NULL, '2021-11-18 06:47:42'),
(12, 'level_9', '50000', '2021-10-28 17:30:08', '2021-11-18 06:47:43'),
(13, 'level_10', '100000', '2021-10-28 17:30:08', '2021-11-18 06:47:43'),
(14, 'staking_apikey', 'abcdekiefrfrtga', NULL, '2021-11-18 06:47:43'),
(15, 'proxycheck', 'PROXY_KEY', '2021-11-17 20:01:31', '2021-11-18 06:47:43'),
(16, 'block_vpnlogin', '0', '2021-11-17 20:48:37', '2021-11-18 06:47:43'),
(17, 'fp_username', 'YOUR_FP_USERNAME', NULL, NULL),
(18, 'daily_bonus', '100', NULL, NULL);

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

--
-- Estructura de tabla para la tabla `staking_histories`
--

CREATE TABLE `staking_histories` (
  `id` bigint UNSIGNED NOT NULL,
  `amount` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `earnings` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `days` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `status` tinyint(1) NOT NULL,
  `staking_plans_id` bigint UNSIGNED NOT NULL,
  `user_id` bigint UNSIGNED NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Estructura de tabla para la tabla `staking_plans`
--

CREATE TABLE `staking_plans` (
  `id` bigint UNSIGNED NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `min_deposit` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `max_deposit` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `daily_earning` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `duration` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `status` tinyint(1) NOT NULL,
  `coin_id` bigint UNSIGNED NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Volcado de datos para la tabla `staking_plans`
--

INSERT INTO `staking_plans` (`id`, `name`, `min_deposit`, `max_deposit`, `daily_earning`, `duration`, `status`, `coin_id`, `created_at`, `updated_at`) VALUES
(1, 'Stake BTC', '0.00005', '0.001', '0.05', '31', 1, 1, '2021-11-17 06:31:55', '2021-11-17 06:43:36');

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

--
-- Estructura de tabla para la tabla `tickets`
--

CREATE TABLE `tickets` (
  `id` bigint UNSIGNED NOT NULL,
  `subject` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `status` enum('open','closed') COLLATE utf8mb4_unicode_ci NOT NULL,
  `last_answer` enum('user','admin') COLLATE utf8mb4_unicode_ci NOT NULL,
  `user_id` bigint UNSIGNED NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Volcado de datos para la tabla `tickets`
--

INSERT INTO `tickets` (`id`, `subject`, `description`, `status`, `last_answer`, `user_id`, `created_at`, `updated_at`) VALUES
(1, 'testing subject', 'dededed', 'open', 'admin', 1, '2021-10-21 17:39:56', '2021-10-21 23:37:43');

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

--
-- Estructura de tabla para la tabla `ticket_answers`
--

CREATE TABLE `ticket_answers` (
  `id` bigint UNSIGNED NOT NULL,
  `ticket_id` bigint UNSIGNED NOT NULL,
  `message` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `messageby` enum('user','admin') COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Volcado de datos para la tabla `ticket_answers`
--

INSERT INTO `ticket_answers` (`id`, `ticket_id`, `message`, `messageby`, `created_at`, `updated_at`) VALUES
(1, 1, 'test', 'admin', '2021-10-21 23:20:27', '2021-10-21 23:20:27');

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

--
-- Estructura de tabla para la tabla `withdraws`
--

CREATE TABLE `withdraws` (
  `id` bigint UNSIGNED NOT NULL,
  `processor` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `amount` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `coin_id` bigint UNSIGNED NOT NULL,
  `user_id` bigint UNSIGNED NOT NULL,
  `status` enum('pending','completed','rejected') COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Índices para tablas volcadas
--

--
-- Indices de la tabla `autoclaims`
--
ALTER TABLE `autoclaims`
  ADD PRIMARY KEY (`id`),
  ADD KEY `autoclaims_user_id_foreign` (`user_id`),
  ADD KEY `autoclaims_coin_id_foreign` (`coin_id`);

--
-- Indices de la tabla `autoclaims_histories`
--
ALTER TABLE `autoclaims_histories`
  ADD PRIMARY KEY (`id`),
  ADD KEY `autoclaims_histories_autoclaim_id_foreign` (`autoclaim_id`);

--
-- Indices de la tabla `balances`
--
ALTER TABLE `balances`
  ADD PRIMARY KEY (`id`),
  ADD KEY `balances_user_id_foreign` (`user_id`),
  ADD KEY `balances_coin_id_foreign` (`coin_id`);

--
-- Indices de la tabla `deposit_histories`
--
ALTER TABLE `deposit_histories`
  ADD PRIMARY KEY (`id`),
  ADD KEY `deposit_histories_coin_id_foreign` (`coin_id`),
  ADD KEY `deposit_histories_user_id_foreign` (`user_id`);

--
-- Indices de la tabla `failed_jobs`
--
ALTER TABLE `failed_jobs`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `failed_jobs_uuid_unique` (`uuid`);

--
-- Indices de la tabla `login_histories`
--
ALTER TABLE `login_histories`
  ADD PRIMARY KEY (`id`),
  ADD KEY `login_histories_user_id_foreign` (`user_id`);

--
-- Indices de la tabla `migrations`
--
ALTER TABLE `migrations`
  ADD PRIMARY KEY (`id`);

--
-- Indices de la tabla `referrals`
--
ALTER TABLE `referrals`
  ADD PRIMARY KEY (`id`),
  ADD KEY `referrals_refers_to_foreign` (`refers_to`),
  ADD KEY `referrals_referred_by_foreign` (`referred_by`);

--
-- Indices de la tabla `settings`
--
ALTER TABLE `settings`
  ADD PRIMARY KEY (`id`);

--
-- Indices de la tabla `staking_histories`
--
ALTER TABLE `staking_histories`
  ADD PRIMARY KEY (`id`),
  ADD KEY `staking_histories_staking_plans_id_foreign` (`staking_plans_id`),
  ADD KEY `staking_histories_user_id_foreign` (`user_id`);

--
-- Indices de la tabla `staking_plans`
--
ALTER TABLE `staking_plans`
  ADD PRIMARY KEY (`id`),
  ADD KEY `staking_plans_coin_id_foreign` (`coin_id`);

--
-- Indices de la tabla `tickets`
--
ALTER TABLE `tickets`
  ADD PRIMARY KEY (`id`),
  ADD KEY `tickets_user_id_foreign` (`user_id`);

--
-- Indices de la tabla `ticket_answers`
--
ALTER TABLE `ticket_answers`
  ADD PRIMARY KEY (`id`),
  ADD KEY `ticket_answers_ticket_id_foreign` (`ticket_id`);

--
-- Indices de la tabla `withdraws`
--
ALTER TABLE `withdraws`
  ADD PRIMARY KEY (`id`),
  ADD KEY `withdraws_coin_id_foreign` (`coin_id`),
  ADD KEY `withdraws_user_id_foreign` (`user_id`);

--
-- AUTO_INCREMENT de las tablas volcadas
--

--
-- AUTO_INCREMENT de la tabla `autoclaims`
--
ALTER TABLE `autoclaims`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=17;

--
-- AUTO_INCREMENT de la tabla `autoclaims_histories`
--
ALTER TABLE `autoclaims_histories`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=20;

--
-- AUTO_INCREMENT de la tabla `balances`
--
ALTER TABLE `balances`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT de la tabla `deposit_histories`
--
ALTER TABLE `deposit_histories`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT de la tabla `failed_jobs`
--
ALTER TABLE `failed_jobs`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de la tabla `login_histories`
--
ALTER TABLE `login_histories`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10;

--
-- AUTO_INCREMENT de la tabla `migrations`
--
ALTER TABLE `migrations`
  MODIFY `id` int UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=115;

--
-- AUTO_INCREMENT de la tabla `referrals`
--
ALTER TABLE `referrals`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de la tabla `settings`
--
ALTER TABLE `settings`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=19;

--
-- AUTO_INCREMENT de la tabla `staking_histories`
--
ALTER TABLE `staking_histories`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de la tabla `staking_plans`
--
ALTER TABLE `staking_plans`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT de la tabla `tickets`
--
ALTER TABLE `tickets`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT de la tabla `ticket_answers`
--
ALTER TABLE `ticket_answers`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT de la tabla `withdraws`
--
ALTER TABLE `withdraws`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- Restricciones para tablas volcadas
--

--
-- Filtros para la tabla `autoclaims`
--
ALTER TABLE `autoclaims`
  ADD CONSTRAINT `autoclaims_coin_id_foreign` FOREIGN KEY (`coin_id`) REFERENCES `coins` (`id`),
  ADD CONSTRAINT `autoclaims_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`);

--
-- Filtros para la tabla `autoclaims_histories`
--
ALTER TABLE `autoclaims_histories`
  ADD CONSTRAINT `autoclaims_histories_autoclaim_id_foreign` FOREIGN KEY (`autoclaim_id`) REFERENCES `autoclaims` (`id`);

--
-- Filtros para la tabla `balances`
--
ALTER TABLE `balances`
  ADD CONSTRAINT `balances_coin_id_foreign` FOREIGN KEY (`coin_id`) REFERENCES `coins` (`id`),
  ADD CONSTRAINT `balances_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`);

--
-- Filtros para la tabla `deposit_histories`
--
ALTER TABLE `deposit_histories`
  ADD CONSTRAINT `deposit_histories_coin_id_foreign` FOREIGN KEY (`coin_id`) REFERENCES `coins` (`id`),
  ADD CONSTRAINT `deposit_histories_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`);

--
-- Filtros para la tabla `login_histories`
--
ALTER TABLE `login_histories`
  ADD CONSTRAINT `login_histories_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`);

--
-- Filtros para la tabla `referrals`
--
ALTER TABLE `referrals`
  ADD CONSTRAINT `referrals_referred_by_foreign` FOREIGN KEY (`referred_by`) REFERENCES `users` (`id`),
  ADD CONSTRAINT `referrals_refers_to_foreign` FOREIGN KEY (`refers_to`) REFERENCES `users` (`id`);

--
-- Filtros para la tabla `staking_histories`
--
ALTER TABLE `staking_histories`
  ADD CONSTRAINT `staking_histories_staking_plans_id_foreign` FOREIGN KEY (`staking_plans_id`) REFERENCES `staking_plans` (`id`),
  ADD CONSTRAINT `staking_histories_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`);

--
-- Filtros para la tabla `staking_plans`
--
ALTER TABLE `staking_plans`
  ADD CONSTRAINT `staking_plans_coin_id_foreign` FOREIGN KEY (`coin_id`) REFERENCES `coins` (`id`);

--
-- Filtros para la tabla `tickets`
--
ALTER TABLE `tickets`
  ADD CONSTRAINT `tickets_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`);

--
-- Filtros para la tabla `ticket_answers`
--
ALTER TABLE `ticket_answers`
  ADD CONSTRAINT `ticket_answers_ticket_id_foreign` FOREIGN KEY (`ticket_id`) REFERENCES `tickets` (`id`);

--
-- Filtros para la tabla `withdraws`
--
ALTER TABLE `withdraws`
  ADD CONSTRAINT `withdraws_coin_id_foreign` FOREIGN KEY (`coin_id`) REFERENCES `coins` (`id`),
  ADD CONSTRAINT `withdraws_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`);
COMMIT;

