-- phpMyAdmin SQL Dump
-- version 5.2.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Mar 01, 2025 at 04:59 PM
-- Server version: 10.4.32-MariaDB
-- PHP Version: 8.2.12

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";


/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;

--
-- Database: `receipt_jar`
--

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

--
-- Table structure for table `accounts`
--

CREATE TABLE `accounts` (
  `id` int(11) NOT NULL,
  `name` varchar(255) NOT NULL,
  `email` varchar(255) NOT NULL,
  `token` text NOT NULL,
  `refresh_token` text NOT NULL,
  `proxy` varchar(255) NOT NULL,
  `status` enum('idle','running','paused','error','stop','stopped','Disable','Enable') DEFAULT 'idle',
  `last_updated` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `total_points` int(11) DEFAULT 0,
  `disabled` tinyint(1) DEFAULT 0,
  `images_uploaded` int(11) DEFAULT 0,
  `images_rejected` int(11) DEFAULT 0,
  `last_run_time` datetime DEFAULT NULL,
  `run_duration` int(11) DEFAULT NULL,
  `weekly_points` int(11) DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `accounts`
--

INSERT INTO `accounts` (`id`, `name`, `email`, `token`, `refresh_token`, `proxy`, `status`, `last_updated`, `total_points`, `disabled`, `images_uploaded`, `images_rejected`, `last_run_time`, `run_duration`, `weekly_points`) VALUES
(1, 'Fet9-recjar99', 'brianrsierra@gmail.com', 'eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6IjJxYUN5ZE5IeHMifQ.e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ZyER8MtkL4_jsaEyTx-_f1nDCKE-SAeak7Gejt4dYA43nKAcsLCneJLgj847OOSjEHjGL5lAxYT_spuqJA_ckHNuPnnRrZQAVHbuqq4W1jCRYtuSmFf83exdgPaBebqxo-WApM909nVUlqzJGaMIcjLhopXA6ELaiEyiUZJjKp8YPX3RoTxVG7bySQDA49rvuzCn-f9mvVpiJ2IC6h5VFb1sPq3o', 'http://gfihpruh:onpynd1ceprk@23.94.138.75:6349', 'idle', '2025-03-01 15:53:43', 2486, 0, 6, 4, '2025-03-01 07:53:43', NULL, 0),
(4, 'tstsss', 'yasssss@gmail.com', 'yyyyyysyyyyyyyyy', 'yyyyyyssyyyyyyyyyyy', 'http://default:pass@proxy.com:8080', 'error', '2025-03-01 14:29:12', 0, 0, 0, 0, NULL, NULL, 0);

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

--
-- Table structure for table `logs`
--

CREATE TABLE `logs` (
  `id` int(11) NOT NULL,
  `account_id` int(11) NOT NULL,
  `log_message` text NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `logs`
--

INSERT INTO `logs` (`id`, `account_id`, `log_message`, `created_at`) VALUES
(372, 1, 'Starting batch upload...', '2025-03-01 08:06:54'),
(373, 1, 'Checking weekly limit before uploading...', '2025-03-01 08:06:54'),
(374, 1, 'Image folder is empty.', '2025-03-01 08:06:55'),
(375, 1, 'Fetching account info...', '2025-03-01 08:06:55'),
(376, 1, 'Failed to fetch account info: Request failed with status code 500', '2025-03-01 08:06:56'),
(377, 1, 'Starting batch upload...', '2025-03-01 08:11:57'),
(378, 1, 'Checking weekly limit before uploading...', '2025-03-01 08:11:57'),
(379, 1, 'Image folder is empty.', '2025-03-01 08:11:58'),
(380, 1, 'Fetching account info...', '2025-03-01 08:11:58'),
(381, 1, 'Failed to fetch account info: Request failed with status code 500', '2025-03-01 08:11:59'),
(382, 1, 'Starting batch upload...', '2025-03-01 08:13:38'),
(383, 1, 'Starting batch upload...', '2025-03-01 08:13:38'),
(384, 1, 'Checking weekly limit before uploading...', '2025-03-01 08:13:38'),
(385, 1, 'Checking weekly limit before uploading...', '2025-03-01 08:13:38'),
(386, 1, 'Image folder is empty.', '2025-03-01 08:13:39'),
(387, 1, 'Image folder is empty.', '2025-03-01 08:13:39'),
(388, 1, 'Fetching account info...', '2025-03-01 08:13:39'),
(389, 1, 'Fetching account info...', '2025-03-01 08:13:39'),
(390, 1, 'Failed to fetch account info: Request failed with status code 500', '2025-03-01 08:13:39'),
(391, 1, 'Failed to fetch account info: Request failed with status code 500', '2025-03-01 08:13:40'),
(392, 1, 'Starting batch upload...', '2025-03-01 08:15:01'),
(393, 1, 'Checking weekly limit before uploading...', '2025-03-01 08:15:01'),
(394, 1, 'Image folder is empty.', '2025-03-01 08:15:03'),
(395, 1, 'Fetching account info...', '2025-03-01 08:15:03'),
(396, 1, 'Failed to fetch account info: Request failed with status code 500', '2025-03-01 08:15:04'),
(397, 1, 'Starting batch upload...', '2025-03-01 08:22:22'),
(398, 1, 'Batch upload failed: Failed to refresh token: require(...) is not a constructor', '2025-03-01 08:22:22'),
(399, 1, 'Starting batch upload...', '2025-03-01 08:32:37'),
(400, 1, 'Checking weekly limit before uploading...', '2025-03-01 08:32:38'),
(401, 1, 'Image folder is empty.', '2025-03-01 08:32:40'),
(402, 1, 'Fetching account info...', '2025-03-01 08:32:40'),
(403, 1, 'Account Total Points: 2486', '2025-03-01 08:32:41'),
(404, 1, 'Starting batch upload...', '2025-03-01 08:33:57'),
(405, 1, 'Starting batch upload...', '2025-03-01 08:33:57'),
(406, 1, 'Checking weekly limit before uploading...', '2025-03-01 08:33:57'),
(407, 1, 'Checking weekly limit before uploading...', '2025-03-01 08:33:57'),
(408, 1, 'Image folder is empty.', '2025-03-01 08:33:59'),
(409, 1, 'Fetching account info...', '2025-03-01 08:33:59'),
(410, 1, 'Image folder is empty.', '2025-03-01 08:33:59'),
(411, 1, 'Fetching account info...', '2025-03-01 08:33:59'),
(412, 1, 'Account Total Points: 2486', '2025-03-01 08:34:01'),
(413, 1, 'Account Total Points: 2486', '2025-03-01 08:34:02'),
(414, 1, 'Starting batch upload...', '2025-03-01 12:08:32'),
(415, 1, 'Checking weekly limit before uploading...', '2025-03-01 12:08:32'),
(416, 1, 'Uploading image: C:\\Users\\Administrator\\Desktop\\receip-script\\image\\FULL_PROCESS-NmQxYWE2MC5qcGVn.jpg', '2025-03-01 12:08:35'),
(417, 1, 'Sending receipt data...', '2025-03-01 12:08:37'),
(418, 1, 'Receipt submitted successfully', '2025-03-01 12:08:38'),
(419, 1, 'Receipt uploaded successfully: C:\\Users\\Administrator\\Desktop\\receip-script\\image\\FULL_PROCESS-NmQxYWE2MC5qcGVn.jpg', '2025-03-01 12:08:38'),
(420, 1, 'Image folder is empty.', '2025-03-01 12:40:11'),
(421, 1, 'Fetching account info...', '2025-03-01 12:40:11'),
(422, 1, 'Image folder is empty.', '2025-03-01 12:40:12'),
(423, 1, 'Fetching account info...', '2025-03-01 12:40:12'),
(424, 1, 'Account Total Points: 2486', '2025-03-01 12:40:13'),
(425, 1, 'Account Total Points: 2486', '2025-03-01 12:40:14'),
(426, 1, 'Image folder is empty.', '2025-03-01 12:45:23'),
(427, 1, 'Fetching account info...', '2025-03-01 12:45:23'),
(428, 1, 'Account Total Points: 2486', '2025-03-01 12:45:26'),
(429, 1, 'Uploading image: C:\\Users\\Administrator\\Desktop\\receip-script\\image\\ILLEGIBLE-NGJhYTZiMS5qcGVn.jpg', '2025-03-01 12:47:58'),
(430, 1, 'Sending receipt data...', '2025-03-01 12:48:00'),
(431, 1, 'Receipt submitted successfully', '2025-03-01 12:48:01'),
(432, 1, 'Receipt uploaded successfully: C:\\Users\\Administrator\\Desktop\\receip-script\\image\\ILLEGIBLE-NGJhYTZiMS5qcGVn.jpg', '2025-03-01 12:48:01'),
(433, 1, 'Waiting 5 minutes for processing...', '2025-03-01 12:49:01'),
(434, 1, 'No more images left.', '2025-03-01 12:54:05'),
(435, 1, 'Checking and deleting rejected receipts...', '2025-03-01 12:54:05'),
(436, 1, 'Deleting rejected receipt ID: 432337633', '2025-03-01 12:54:07'),
(437, 1, 'Deleting rejected receipt ID: 432341506', '2025-03-01 12:54:13'),
(438, 1, 'No more rejected receipts left.', '2025-03-01 12:54:20'),
(439, 1, 'Finished processing rejected receipts.', '2025-03-01 12:54:20'),
(440, 1, 'Fetching account info...', '2025-03-01 12:54:20'),
(441, 1, 'Account Total Points: 2486', '2025-03-01 12:54:22'),
(442, 4, 'Image folder is empty.', '2025-03-01 12:57:18'),
(443, 4, 'Image folder is empty.', '2025-03-01 12:57:18'),
(444, 4, 'Fetching account info...', '2025-03-01 12:57:18'),
(445, 4, 'Fetching account info...', '2025-03-01 12:57:18'),
(446, 4, 'Failed to fetch account info: ', '2025-03-01 12:57:40'),
(447, 4, 'Failed to fetch account info: ', '2025-03-01 12:57:40'),
(448, 4, 'Image folder is empty.', '2025-03-01 13:00:10'),
(449, 4, 'Fetching account info...', '2025-03-01 13:00:10'),
(450, 4, 'Failed to fetch account info: ', '2025-03-01 13:00:32'),
(451, 1, 'Image folder is empty.', '2025-03-01 13:05:10'),
(452, 1, 'Fetching account info...', '2025-03-01 13:05:10'),
(453, 1, 'Account Total Points: 2486', '2025-03-01 13:05:12'),
(454, 1, 'Image folder is empty.', '2025-03-01 13:06:04'),
(455, 1, 'Fetching account info...', '2025-03-01 13:06:04'),
(456, 1, 'Account Total Points: 2486', '2025-03-01 13:06:11'),
(457, 4, 'Image folder is empty.', '2025-03-01 13:06:22'),
(458, 4, 'Fetching account info...', '2025-03-01 13:06:22'),
(459, 4, 'Failed to fetch account info: ', '2025-03-01 13:06:43'),
(460, 1, 'Image folder is empty.', '2025-03-01 13:31:37'),
(461, 1, 'Fetching account info...', '2025-03-01 13:31:37'),
(462, 1, 'Account Total Points: 2486', '2025-03-01 13:31:39'),
(463, 4, 'Image folder is empty.', '2025-03-01 13:32:00'),
(464, 4, 'Fetching account info...', '2025-03-01 13:32:00'),
(465, 4, 'Failed to fetch account info: ', '2025-03-01 13:32:21'),
(466, 1, 'Image folder is empty.', '2025-03-01 13:53:19'),
(467, 1, 'Fetching account info...', '2025-03-01 13:53:20'),
(468, 1, 'Account Total Points: 2486', '2025-03-01 13:53:23'),
(469, 4, 'Token validation failed: Token validation failed: ', '2025-03-01 13:53:44'),
(470, 1, 'Image folder is empty.', '2025-03-01 14:24:36'),
(471, 1, 'Checking and deleting rejected receipts...', '2025-03-01 14:24:36'),
(472, 1, 'No more rejected receipts left.', '2025-03-01 14:24:39'),
(473, 1, 'Finished processing rejected receipts.', '2025-03-01 14:24:39'),
(474, 1, 'Fetching account info...', '2025-03-01 14:24:41'),
(475, 1, 'Account Total Points: 2486', '2025-03-01 14:24:43'),
(476, 1, 'Image folder is empty.', '2025-03-01 14:26:47'),
(477, 1, 'Checking and deleting rejected receipts...', '2025-03-01 14:26:47'),
(478, 1, 'No more rejected receipts left.', '2025-03-01 14:26:50'),
(479, 1, 'Finished processing rejected receipts.', '2025-03-01 14:26:50'),
(480, 1, 'Fetching account info...', '2025-03-01 14:26:52'),
(481, 1, 'Account Total Points: 2486', '2025-03-01 14:26:53'),
(482, 4, 'Token validation failed: Token validation failed: ', '2025-03-01 14:27:15'),
(483, 1, 'Token validation failed: Failed to refresh token: Request failed with status code 403', '2025-03-01 14:28:51'),
(484, 4, 'Token validation failed: Token validation failed: ', '2025-03-01 14:29:12'),
(485, 1, 'Image folder is empty.', '2025-03-01 14:34:27'),
(486, 1, 'Checking and deleting rejected receipts...', '2025-03-01 14:34:27'),
(487, 1, 'No more rejected receipts left.', '2025-03-01 14:34:32'),
(488, 1, 'Finished processing rejected receipts.', '2025-03-01 14:34:32'),
(489, 1, 'Fetching account info...', '2025-03-01 14:34:35'),
(490, 1, 'Account Total Points: 2486', '2025-03-01 14:34:37'),
(491, 1, 'Token validation failed: getValidToken is not a function', '2025-03-01 14:38:39'),
(492, 1, 'Batch upload failed: getValidToken is not a function', '2025-03-01 14:38:39'),
(493, 1, 'Image folder is empty.', '2025-03-01 14:55:00'),
(494, 1, 'Checking and deleting rejected receipts...', '2025-03-01 14:55:00'),
(495, 1, 'No more rejected receipts left.', '2025-03-01 14:55:03'),
(496, 1, 'Finished processing rejected receipts.', '2025-03-01 14:55:03'),
(497, 1, 'Fetching account info...', '2025-03-01 14:55:08'),
(498, 1, 'Account Total Points: 2486', '2025-03-01 14:55:10'),
(499, 4, 'Token validation failed: Token validation failed: ', '2025-03-01 14:56:18'),
(500, 4, 'Batch upload failed: Token validation failed: ', '2025-03-01 14:56:18'),
(501, 1, 'Uploading image: C:\\Users\\Administrator\\Desktop\\receip-script\\image\\ILLEGIBLE-ZDZhODljOS5qcGVn.jpg', '2025-03-01 15:12:16'),
(502, 1, 'Error uploading image: accountId is not defined', '2025-03-01 15:12:18'),
(503, 1, 'Error in batch upload: accountId is not defined', '2025-03-01 15:12:18'),
(504, 1, 'Batch upload failed: accountId is not defined', '2025-03-01 15:12:18'),
(505, 1, 'Proxy http://gfihpruh:onpynd1ceprk@23.94.138.75:6349 assigned to account 1', '2025-03-01 15:22:15'),
(506, 1, 'Uploading image: C:\\Users\\Administrator\\Desktop\\receip-script\\image\\ILLEGIBLE-ZDZhODljOS5qcGVn.jpg', '2025-03-01 15:22:29'),
(507, 1, 'Sending receipt data...', '2025-03-01 15:22:35'),
(508, 1, 'Receipt submitted successfully', '2025-03-01 15:22:38'),
(509, 1, 'Receipt uploaded successfully: C:\\Users\\Administrator\\Desktop\\receip-script\\image\\ILLEGIBLE-ZDZhODljOS5qcGVn.jpg', '2025-03-01 15:22:38'),
(510, 1, 'Waiting 5 minutes for processing...', '2025-03-01 15:23:38'),
(511, 1, 'No more images left.', '2025-03-01 15:28:45'),
(512, 1, 'Checking and deleting rejected receipts...', '2025-03-01 15:28:45'),
(513, 1, 'Deleting rejected receipt ID: 432372957', '2025-03-01 15:28:50'),
(514, 1, 'No more rejected receipts left.', '2025-03-01 15:29:01'),
(515, 1, 'Finished processing rejected receipts.', '2025-03-01 15:29:01'),
(516, 1, 'Fetching account info...', '2025-03-01 15:29:03'),
(517, 1, 'Account Total Points: 2486', '2025-03-01 15:29:05'),
(518, 4, 'Token validation failed: Token validation failed: ', '2025-03-01 15:39:56'),
(519, 4, 'Batch upload failed: Token validation failed: ', '2025-03-01 15:39:56'),
(520, 1, 'Uploading image: C:\\Users\\Administrator\\Desktop\\receip-script\\image\\ILLEGIBLE-ZDUzN2ExYS5qcGVn.jpg', '2025-03-01 15:47:11'),
(521, 1, 'Sending receipt data...', '2025-03-01 15:47:17'),
(522, 1, 'Receipt submitted successfully', '2025-03-01 15:47:18'),
(523, 1, 'Receipt uploaded successfully: C:\\Users\\Administrator\\Desktop\\receip-script\\image\\ILLEGIBLE-ZDUzN2ExYS5qcGVn.jpg', '2025-03-01 15:47:18'),
(524, 1, 'Waiting 5 minutes for processing...', '2025-03-01 15:48:18'),
(525, 1, 'No more images left.', '2025-03-01 15:53:25'),
(526, 1, 'Checking and deleting rejected receipts...', '2025-03-01 15:53:25'),
(527, 1, 'Deleting rejected receipt ID: 432384197', '2025-03-01 15:53:29'),
(528, 1, 'No more rejected receipts left.', '2025-03-01 15:53:40'),
(529, 1, 'Finished processing rejected receipts.', '2025-03-01 15:53:40'),
(530, 1, 'Fetching account info...', '2025-03-01 15:53:41'),
(531, 1, 'Account Total Points: 2486', '2025-03-01 15:53:43');

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

--
-- Table structure for table `proxies`
--

CREATE TABLE `proxies` (
  `id` int(11) NOT NULL,
  `proxy` varchar(255) NOT NULL,
  `status` enum('unused','active','failed') DEFAULT 'unused',
  `last_used` timestamp NULL DEFAULT NULL,
  `assigned_to` int(11) DEFAULT NULL,
  `retry_count` int(11) DEFAULT 0,
  `country` varchar(100) DEFAULT NULL,
  `check_status` enum('alive','dead') DEFAULT NULL,
  `last_checked` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `proxies`
--

INSERT INTO `proxies` (`id`, `proxy`, `status`, `last_used`, `assigned_to`, `retry_count`, `country`, `check_status`, `last_checked`) VALUES
(1, 'http://gfihpruh:onpynd1ceprk@23.94.138.75:6349', 'active', '2025-02-26 00:15:32', 1, 7, 'US', 'alive', '2025-03-01 15:22:11'),
(2, 'http://gfihpruh:onpynd1ceprk@154.36.110.199:6853', 'unused', '2025-02-26 00:17:13', NULL, 0, 'United States', 'dead', '2025-03-01 13:52:21'),
(6, 'http://nrqoodfm:pmymq2fepaw1@45.251.61.35:6753', 'unused', NULL, NULL, 0, 'LT', 'dead', '2025-03-01 13:52:27'),
(7, 'http://nrqoodfm:pmymq2fepaw1@193.168.223.238:6205', 'unused', NULL, NULL, 0, NULL, '', '2025-03-01 13:52:41'),
(8, 'http://nrqoodfm:pmymq2fepaw1@171.22.249.180:5760', 'unused', NULL, NULL, 0, 'FR', 'dead', '2025-03-01 13:52:30');

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

--
-- Table structure for table `proxy_history`
--

CREATE TABLE `proxy_history` (
  `id` int(11) NOT NULL,
  `proxy` varchar(255) NOT NULL,
  `account_id` int(11) NOT NULL,
  `used_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `proxy_history`
--

INSERT INTO `proxy_history` (`id`, `proxy`, `account_id`, `used_at`) VALUES
(1, 'http://gfihpruh:onpynd1ceprk@154.36.110.199:6853', 1, '2025-02-28 17:26:46'),
(2, 'http://gfihpruh:onpynd1ceprk@23.94.138.75:6349', 1, '2025-02-28 17:27:23'),
(3, 'http://gfihpruh:onpynd1ceprk@23.94.138.75:6349', 1, '2025-03-01 15:22:15');

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

--
-- Table structure for table `receipts`
--

CREATE TABLE `receipts` (
  `id` int(11) NOT NULL,
  `account_id` int(11) NOT NULL,
  `image_url` text NOT NULL,
  `status` enum('pending','approved','rejected') DEFAULT 'pending',
  `points` int(11) DEFAULT 0,
  `uploaded_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Indexes for dumped tables
--

--
-- Indexes for table `accounts`
--
ALTER TABLE `accounts`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `email` (`email`);

--
-- Indexes for table `logs`
--
ALTER TABLE `logs`
  ADD PRIMARY KEY (`id`),
  ADD KEY `account_id` (`account_id`);

--
-- Indexes for table `proxies`
--
ALTER TABLE `proxies`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `proxy` (`proxy`);

--
-- Indexes for table `proxy_history`
--
ALTER TABLE `proxy_history`
  ADD PRIMARY KEY (`id`),
  ADD KEY `account_id` (`account_id`);

--
-- Indexes for table `receipts`
--
ALTER TABLE `receipts`
  ADD PRIMARY KEY (`id`),
  ADD KEY `account_id` (`account_id`);

--
-- AUTO_INCREMENT for dumped tables
--

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

--
-- AUTO_INCREMENT for table `logs`
--
ALTER TABLE `logs`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=532;

--
-- AUTO_INCREMENT for table `proxies`
--
ALTER TABLE `proxies`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;

--
-- AUTO_INCREMENT for table `proxy_history`
--
ALTER TABLE `proxy_history`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `receipts`
--
ALTER TABLE `receipts`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- Constraints for dumped tables
--

--
-- Constraints for table `logs`
--
ALTER TABLE `logs`
  ADD CONSTRAINT `logs_ibfk_1` FOREIGN KEY (`account_id`) REFERENCES `accounts` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `proxy_history`
--
ALTER TABLE `proxy_history`
  ADD CONSTRAINT `proxy_history_ibfk_1` FOREIGN KEY (`account_id`) REFERENCES `accounts` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `receipts`
--
ALTER TABLE `receipts`
  ADD CONSTRAINT `receipts_ibfk_1` FOREIGN KEY (`account_id`) REFERENCES `accounts` (`id`) ON DELETE CASCADE;
COMMIT;

/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
