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

START TRANSACTION;



--
-- Database: `esp`
--

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

--
-- Table structure for table `bank_accounts`
--

CREATE TABLE `bank_accounts` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `ledger_category_id` bigint(20) UNSIGNED NOT NULL,
  `ledger_id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `account_number` 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;

--
-- Dumping data for table `bank_accounts`
--

INSERT INTO `bank_accounts` (`id`, `ledger_category_id`, `ledger_id`, `name`, `account_number`, `created_at`, `updated_at`) VALUES
(1, 1, 1, 'FIXED ASSETS', '312', '2022-06-09 07:27:06', '2022-06-09 07:27:06'),
(2, 2, 1, 'DOMESTIC', '321', '2022-06-09 07:35:31', '2022-06-09 07:35:31'),
(3, 3, 2, 'Accounts Payable', '415', '2022-06-09 07:49:28', '2022-06-09 07:49:28'),
(4, 4, 4, 'Capital', '1332', '2022-06-09 07:53:54', '2022-06-09 07:53:54'),
(5, 5, 4, 'Administrative Fees &amp; Licenses (User Fees, Charges &amp; Permits)', '1422', '2022-06-09 07:58:34', '2022-06-09 07:58:34'),
(6, 6, 4, 'Miscellaneous Receipts/income', '145003', '2022-06-09 08:00:07', '2022-06-09 08:00:07'),
(7, 7, 5, 'Central Government Reserves', '511', '2022-06-09 08:06:42', '2022-06-09 08:06:42'),
(8, 8, 3, 'Wages And Salaries', '211', '2022-06-09 08:33:38', '2022-06-09 08:33:38'),
(9, 8, 3, 'Social Contributions', '212', '2022-06-09 08:37:19', '2022-06-09 08:37:19'),
(10, 8, 3, 'Other Employee Costs', '213', '2022-06-09 08:39:45', '2022-06-09 08:39:45'),
(11, 9, 3, 'General Expenses', '221', '2022-06-09 09:11:05', '2022-06-09 09:11:05'),
(12, 9, 3, 'Communications', '222', '2022-06-09 09:15:47', '2022-06-09 09:15:47'),
(13, 9, 3, 'Utility And Property Expenses', '223', '2022-06-09 09:17:16', '2022-06-09 09:17:16'),
(14, 9, 3, 'Supplies And Services', '224', '2022-06-09 09:19:54', '2022-06-09 09:19:54'),
(15, 9, 3, 'Travel And Transport', '227', '2022-06-09 09:22:19', '2022-06-09 09:22:19'),
(16, 9, 3, 'Maintenance', '228', '2022-06-09 09:24:05', '2022-06-09 09:24:05'),
(17, 10, 3, 'To International Organisations', '262', '2022-06-09 09:26:40', '2022-06-09 09:26:40'),
(18, 10, 3, 'To Other General Government Units', '263', '2022-06-09 09:28:35', '2022-06-09 09:28:35'),
(19, 10, 3, 'To Resident Non-government Units', '264', '2022-06-09 09:30:36', '2022-06-09 09:30:36'),
(20, 11, 3, 'Property Expenses Other Than Interest', '281', '2022-06-09 09:35:30', '2022-06-09 09:35:30'),
(21, 11, 3, 'Miscellaneous Other Expenses', '282', '2022-06-09 09:37:23', '2022-06-09 09:37:23');

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

--
-- Table structure for table `bank_account_categories`
--

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

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

--
-- Table structure for table `beneficiaries`
--

CREATE TABLE `beneficiaries` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `district` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `title` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `duty_station` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `bank` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `account_number` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `telephone_number` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `code_in_coa` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `beneficiaries`
--

INSERT INTO `beneficiaries` (`id`, `district`, `name`, `title`, `duty_station`, `bank`, `account_number`, `telephone_number`, `code_in_coa`, `created_at`, `updated_at`) VALUES
(1, 'BUDUDA', 'NAMULONDO TAPPY', NULL, 'DISTRICT', 'CENTENARY BANK', '3200876827', NULL, '26310601', '2022-06-11 10:16:56', '2022-06-11 10:16:57'),
(2, 'BUDUDA', 'WAKOOLI BEATRICE', NULL, 'DISTRICT', 'POST BANK', '10322010 02745', NULL, '26310602', '2022-06-11 10:16:57', '2022-06-11 10:16:58'),
(3, 'BUDUDA', 'NERIMA DAMALIE', NULL, 'DISTRICT', 'HOUSING FINANCE BANK', '0800017161', NULL, '26310603', '2022-06-11 10:16:58', '2022-06-11 10:16:58'),
(4, 'BUDUDA', 'KUTOSI SIMON', NULL, 'NAKATSI', 'HOUSING FINANCE BANK', '0800127969', NULL, '26310604', '2022-06-11 10:16:59', '2022-06-11 10:16:59'),
(5, 'BUDUDA', 'NABUSHAWO JOAN', NULL, 'NALWANZA', 'EQUITY BANK', '1014101286669', NULL, '26310605', '2022-06-11 10:16:59', '2022-06-11 10:16:59'),
(6, 'BUDUDA', 'NABEA HARRIET', NULL, 'NABWEYA', 'CENTENARY BANK', '3201481766', NULL, '26310606', '2022-06-11 10:17:00', '2022-06-11 10:17:00'),
(7, 'BUDUDA', 'KHASELELE SUZAN', NULL, 'BUSHIRIBO', 'CENTENARY BANK', '3201494844', NULL, '26310607', '2022-06-11 10:17:00', '2022-06-11 10:17:00'),
(8, 'BUDAKA', 'BOGERE JAFARI MUNUULO', NULL, 'NABOA S/C', 'CENTENARY BANK', '3202434319', NULL, '26310608', '2022-06-11 10:17:01', '2022-06-11 10:17:01'),
(9, 'BUDAKA', 'KOTERE BARBRA CATHERINE', NULL, 'MUGITI S/C', 'CENTENARY BANK', '3202434015', NULL, '26310609', '2022-06-11 10:17:01', '2022-06-11 10:17:02'),
(10, 'BUDAKA', 'KULUYA ERIA', NULL, 'NALULI', 'CENTENARY BANK', '3202434032', NULL, '263106010', '2022-06-11 10:17:02', '2022-06-11 10:17:02'),
(11, 'BUDAKA', 'NANDERA SANULA', NULL, 'BUNAMWERA', 'EQUITY BANK', '1014101533094', NULL, '26310611', '2022-06-11 10:17:02', '2022-06-11 10:17:03'),
(12, 'BUDAKA', 'SAGE SWALEH JUMA', NULL, 'SUNI PARISH', 'CENTENARY BANK', '3202433908', NULL, '26310612', '2022-06-11 10:17:03', '2022-06-11 10:17:03'),
(13, 'BUDAKA', 'WEERE ROGERS', NULL, 'NAKISENYE', 'DFCU BANK', '01981131122949', NULL, '26310613', '2022-06-11 10:17:03', '2022-06-11 10:17:04'),
(14, 'BUDAKA', 'LOGOSE JACKLINE', NULL, 'IDUDI ', 'CENTENARY BANK', '3720040175', NULL, '26310614', '2022-06-11 10:17:04', '2022-06-11 10:17:04'),
(15, 'BUDAKA', 'TWANZA MARY', NULL, 'BUDAKA', 'CENTENARY BANK', '3120039939', NULL, '26310615', '2022-06-11 10:17:05', '2022-06-11 10:17:05'),
(16, 'BUDAKA', 'KAWISO RICHARD', NULL, 'BWASE WARD', 'STANBIC', '0140590224601', NULL, '26310616', '2022-06-11 10:17:05', '2022-06-11 10:17:05'),
(17, 'BUDAKA', 'LWIISI KAFERE', NULL, 'NAMAGALA AND GADUMIRE', 'STANBIC', '0121045710801', NULL, '26310617', '2022-06-11 10:17:05', '2022-06-11 10:17:05'),
(18, 'Kampala', 'NAMULONDO TAPPY', NULL, 'DISTRICT', 'CENTENARY BANK', '32008768278', NULL, '26310618', '2022-06-13 04:55:55', '2022-06-13 04:55:55'),
(19, 'Kasese', 'WAKOOLI BEATRICE', NULL, 'DISTRICT', 'POST BANK', '10322010 027451', NULL, '26310619', '2022-06-13 04:55:56', '2022-06-13 04:55:56'),
(21, 'Kampala', 'XYZ', NULL, 'DISTRICT', 'CENTENARY BANK', '320087682781', NULL, '26310621', '2022-06-13 05:02:04', '2022-06-13 05:02:04'),
(22, 'Kasese', 'ABC', NULL, 'DISTRICT', 'POST BANK', '10322010 027459', NULL, '26310622', '2022-06-13 05:02:04', '2022-06-13 05:02:04');

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

--
-- Table structure for table `failed_jobs`
--

CREATE TABLE `failed_jobs` (
  `id` bigint(20) 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;

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

--
-- Table structure for table `general_ledgers`
--

CREATE TABLE `general_ledgers` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `details` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `account` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `debit` bigint(20) DEFAULT NULL,
  `credit` bigint(20) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `reference` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `general_ledgers`
--

INSERT INTO `general_ledgers` (`id`, `details`, `account`, `debit`, `credit`, `created_at`, `updated_at`, `reference`) VALUES
(1, 'Adding Funds', '321108', 20000000, NULL, '2022-06-11 05:33:53', '2022-06-11 05:33:53', '0000001'),
(2, 'Adding Funds', '5112', NULL, 20000000, '2022-06-11 05:33:53', '2022-06-11 05:33:53', '0000001'),
(3, 'Add cash', '321108', 4000000, NULL, '2022-06-11 05:39:12', '2022-06-11 05:39:12', '0000002'),
(4, 'Add cash', '5112', NULL, 4000000, '2022-06-11 05:39:12', '2022-06-11 05:39:12', '0000002'),
(5, 'Remove cash', '415001', 7000000, NULL, '2022-06-11 05:41:03', '2022-06-11 05:41:03', '0000003'),
(6, 'Remove cash', '321108', NULL, 7000000, '2022-06-11 05:41:03', '2022-06-11 05:41:03', '0000003'),
(113, 'Adding more funds', '321108', 10000000, NULL, '2022-06-13 05:08:09', '2022-06-13 05:08:09', '0000025'),
(114, 'Adding more funds', '145003', NULL, 10000000, '2022-06-13 05:08:09', '2022-06-13 05:08:09', '0000025'),
(115, 'Add more cash', '321108', 5000000, NULL, '2022-06-13 20:08:01', '2022-06-13 20:08:01', '0000026'),
(116, 'Add more cash', '5112', NULL, 5000000, '2022-06-13 20:08:01', '2022-06-13 20:08:01', '0000026'),
(117, 'Pay grants', '264103', 4000000, NULL, '2022-06-13 20:20:15', '2022-06-13 20:20:15', '0000027'),
(118, 'Pay grants', '321108', NULL, 4000000, '2022-06-13 20:20:15', '2022-06-13 20:20:15', '0000027');

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

--
-- Table structure for table `last_bank_accounts`
--

CREATE TABLE `last_bank_accounts` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `sub_bank_account_id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `account_number` 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;

--
-- Dumping data for table `last_bank_accounts`
--

INSERT INTO `last_bank_accounts` (`id`, `sub_bank_account_id`, `name`, `account_number`, `created_at`, `updated_at`) VALUES
(1, 1, 'Transport Equipment', '312201', '2022-06-09 07:28:15', '2022-06-09 07:28:15'),
(2, 1, 'ICT Equipment', '312213', '2022-06-09 07:28:57', '2022-06-09 07:28:57'),
(3, 3, 'Revenue Accounts', '321102', '2022-06-09 07:38:23', '2022-06-09 07:38:23'),
(4, 3, 'Expenditure Accounts', '321103', '2022-06-09 07:39:25', '2022-06-09 07:39:25'),
(5, 3, 'Project Accounts', '321104', '2022-06-09 07:39:52', '2022-06-09 07:39:52'),
(6, 3, 'Collection Accounts', '321106', '2022-06-09 07:40:15', '2022-06-09 07:40:15'),
(7, 3, 'Cash In Transit', '321107', '2022-06-09 07:40:38', '2022-06-09 07:40:38'),
(8, 3, 'Cash At Hand - Imprest', '321108', '2022-06-09 07:41:00', '2022-06-09 07:41:00'),
(9, 3, 'Others', '321109', '2022-06-09 07:41:55', '2022-06-09 07:41:55'),
(10, 8, 'Revenue Reserves', '511201', '2022-06-09 08:08:20', '2022-06-09 08:08:20'),
(11, 9, 'General Staff Salaries', '211101', '2022-06-09 08:34:51', '2022-06-09 08:34:51'),
(12, 9, 'Contract Staff Salaries (Incl. Casuals, Temporary)', '211102', '2022-06-09 08:35:43', '2022-06-09 08:35:43'),
(13, 9, 'Allowances', '211103', '2022-06-09 08:36:13', '2022-06-09 08:36:13'),
(14, 10, 'Social Security Contributions', '212101', '2022-06-09 08:38:25', '2022-06-09 08:38:25'),
(15, 10, 'Pension For General Civil Service', '212102', '2022-06-09 08:38:48', '2022-06-09 08:38:48'),
(16, 10, 'Validation Of Old Pensioners', '212106', '2022-06-09 08:39:08', '2022-06-09 08:39:08'),
(17, 37, 'Contributions To International Organisations', '262101', '2022-06-09 09:27:59', '2022-06-09 09:27:59'),
(18, 38, 'Other Current Grants', '263106', '2022-06-09 09:29:40', '2022-06-09 09:29:40'),
(19, 38, 'Transfers To Treasury', '263108', '2022-06-09 09:30:01', '2022-06-09 09:30:01'),
(20, 39, 'Contributions To Autonomous Institutions', '264101', '2022-06-09 09:31:48', '2022-06-09 09:31:48'),
(21, 39, 'Contributions To Autonomous Institutions (Wage Subventions)', '264102', '2022-06-09 09:32:14', '2022-06-09 09:32:14'),
(22, 39, 'Grants To Cultural Institutions', '264103', '2022-06-09 09:32:53', '2022-06-09 09:32:53'),
(23, 40, 'Contributions To Autonomous Institutions', '264201', '2022-06-09 09:34:20', '2022-06-09 09:34:20'),
(24, 41, 'Monitoring, Supervision And Appraisal Of Capital Works', '281504', '2022-06-09 09:36:41', '2022-06-09 09:36:41'),
(25, 42, 'Scholarships And Related Costs', '282103', '2022-06-09 09:38:41', '2022-06-09 09:38:41');

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

--
-- Table structure for table `ledgers`
--

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

--
-- Dumping data for table `ledgers`
--

INSERT INTO `ledgers` (`id`, `name`, `created_at`, `updated_at`, `item_code`) VALUES
(1, 'ASSETS', '2022-06-07 04:56:22', '2022-06-07 04:56:22', '3'),
(2, 'LIABILITIES', '2022-06-07 04:56:22', '2022-06-07 04:56:22', '4'),
(3, 'EXPENSES', '2022-06-07 04:56:22', '2022-06-07 04:56:22', '2'),
(4, 'REVENUE AND FUNDING', '2022-06-07 04:56:22', '2022-06-07 04:56:22', '1'),
(5, 'EQUITY', '2022-06-07 04:56:22', '2022-06-07 04:56:22', '5');

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

--
-- Table structure for table `ledger_categories`
--

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

--
-- Dumping data for table `ledger_categories`
--

INSERT INTO `ledger_categories` (`id`, `ledger_id`, `name`, `created_at`, `updated_at`, `item_code`) VALUES
(1, 1, 'NON-FINANCIAL ASSETS', '2022-06-09 07:26:39', '2022-06-09 07:26:39', '31'),
(2, 1, 'FINANCIAL ASSETS', '2022-06-09 07:31:34', '2022-06-09 07:31:34', '32'),
(3, 2, 'DOMESTIC LIABILITIES', '2022-06-09 07:48:50', '2022-06-09 07:48:50', '41'),
(4, 4, 'From Other General Government Units (Domestic Government Transfers)', '2022-06-09 07:53:18', '2022-06-09 07:53:18', '133'),
(5, 4, 'Sale Of Goods And Services', '2022-06-09 07:57:58', '2022-06-09 07:57:58', '142'),
(6, 4, 'Miscellaneous And Unidentified Revenue', '2022-06-09 07:59:29', '2022-06-09 07:59:29', '145'),
(7, 5, 'GOU EQUITY FUNDS', '2022-06-09 08:06:16', '2022-06-09 08:06:16', '51'),
(8, 3, 'EMPLOYEE COSTS', '2022-06-09 08:33:02', '2022-06-09 08:33:02', '21'),
(9, 3, 'USE OF GOODS AND SERVICES', '2022-06-09 08:41:42', '2022-06-09 08:41:42', '22'),
(10, 3, 'GRANTS', '2022-06-09 09:26:10', '2022-06-09 09:26:10', '26'),
(11, 3, 'OTHER EXPENSES', '2022-06-09 09:34:58', '2022-06-09 09:34:58', '28');

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

--
-- Table structure for table `logging_activities`
--

CREATE TABLE `logging_activities` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `subject` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `details` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `performed_by` 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;

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

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

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

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

INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES
(1, '2014_10_12_000000_create_users_table', 1),
(2, '2014_10_12_100000_create_password_resets_table', 1),
(3, '2019_08_19_000000_create_failed_jobs_table', 1),
(4, '2022_05_21_132145_create_logging_activities_table', 1),
(6, '2022_05_21_165338_drop_last_session_id', 1),
(7, '2022_05_21_165458_add_back_last_session_id', 1),
(8, '2022_05_21_191939_add_last_time_login', 1),
(9, '2022_05_22_090559_add_roles_to_users_table', 1),
(11, '2022_05_22_094231_create_ledgers_table', 3),
(12, '2022_05_22_094307_create_ledger_categories_table', 3),
(13, '2022_05_22_094322_create_bank_accounts_table', 3),
(14, '2022_05_22_103436_create_sub_bank_accounts_table', 3),
(15, '2022_05_22_103731_create_bank_account_categories_table', 3),
(16, '2022_05_23_213052_add_item_code_to_ledger_categories', 3),
(17, '2022_06_01_183012_create_last_bank_accounts_table', 3),
(18, '2022_06_02_195135_create_more_account_belows_table', 3),
(19, '2022_06_06_132130_drop_item_code_on_ledgers', 3),
(20, '2022_05_21_140519_create_beneficiaries_table', 4),
(21, '2022_06_09_094918_create_general_ledgers_table', 4),
(22, '2022_06_10_083415_add_item_code_back', 5),
(23, '2022_06_11_080603_add_reference_on_general_ledgers', 6);

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

--
-- Table structure for table `more_account_belows`
--

CREATE TABLE `more_account_belows` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `account_below_bank_account_id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `account_number` 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;

--
-- Dumping data for table `more_account_belows`
--

INSERT INTO `more_account_belows` (`id`, `account_below_bank_account_id`, `name`, `account_number`, `created_at`, `updated_at`) VALUES
(1, 18, 'NAMULONDO TAPPY', '26310601', '2022-06-11 10:16:57', '2022-06-11 10:16:57'),
(2, 18, 'WAKOOLI BEATRICE', '26310602', '2022-06-11 10:16:57', '2022-06-11 10:16:57'),
(3, 18, 'NERIMA DAMALIE', '26310603', '2022-06-11 10:16:58', '2022-06-11 10:16:58'),
(4, 18, 'KUTOSI SIMON', '26310604', '2022-06-11 10:16:59', '2022-06-11 10:16:59'),
(5, 18, 'NABUSHAWO JOAN', '26310605', '2022-06-11 10:16:59', '2022-06-11 10:16:59'),
(6, 18, 'NABEA HARRIET', '26310606', '2022-06-11 10:17:00', '2022-06-11 10:17:00'),
(7, 18, 'KHASELELE SUZAN', '26310607', '2022-06-11 10:17:00', '2022-06-11 10:17:00'),
(8, 18, 'BOGERE JAFARI MUNUULO', '26310608', '2022-06-11 10:17:01', '2022-06-11 10:17:01'),
(9, 18, 'KOTERE BARBRA CATHERINE', '26310609', '2022-06-11 10:17:02', '2022-06-11 10:17:02'),
(10, 18, 'KULUYA ERIA', '263106010', '2022-06-11 10:17:02', '2022-06-11 10:17:02'),
(11, 18, 'NANDERA SANULA', '26310611', '2022-06-11 10:17:02', '2022-06-11 10:17:02'),
(12, 18, 'SAGE SWALEH JUMA', '26310612', '2022-06-11 10:17:03', '2022-06-11 10:17:03'),
(13, 18, 'WEERE ROGERS', '26310613', '2022-06-11 10:17:04', '2022-06-11 10:17:04'),
(14, 18, 'LOGOSE JACKLINE', '26310614', '2022-06-11 10:17:04', '2022-06-11 10:17:04'),
(15, 18, 'TWANZA MARY', '26310615', '2022-06-11 10:17:05', '2022-06-11 10:17:05'),
(16, 18, 'KAWISO RICHARD', '26310616', '2022-06-11 10:17:05', '2022-06-11 10:17:05'),
(17, 18, 'LWIISI KAFERE', '26310617', '2022-06-11 10:17:05', '2022-06-11 10:17:05'),
(18, 18, 'NAMULONDO TAPPY', '26310618', '2022-06-13 04:55:55', '2022-06-13 04:55:55'),
(19, 18, 'WAKOOLI BEATRICE', '26310619', '2022-06-13 04:55:56', '2022-06-13 04:55:56'),
(20, 18, '', '26310620', '2022-06-13 04:55:56', '2022-06-13 04:55:56'),
(21, 18, 'XYZ', '26310621', '2022-06-13 05:02:04', '2022-06-13 05:02:04'),
(22, 18, 'ABC', '26310622', '2022-06-13 05:02:04', '2022-06-13 05:02:04');

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

--
-- Table structure for table `sub_bank_accounts`
--

CREATE TABLE `sub_bank_accounts` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `bank_account_id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `account_number` 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;

--
-- Dumping data for table `sub_bank_accounts`
--

INSERT INTO `sub_bank_accounts` (`id`, `bank_account_id`, `name`, `account_number`, `created_at`, `updated_at`) VALUES
(1, 1, 'Machinery, Furniture And Vehicles', '3122', '2022-06-09 07:27:46', '2022-06-09 07:27:46'),
(3, 2, 'Currency And Deposits (Cash And Bank)', '3211', '2022-06-09 07:36:08', '2022-06-09 07:36:08'),
(4, 3, 'Trade Creditors', '415001', '2022-06-09 07:50:11', '2022-06-09 07:50:11'),
(5, 3, 'Sundry Creditors', '415002', '2022-06-09 07:50:34', '2022-06-09 07:50:34'),
(6, 4, 'Transfers Received By Ministries And Agencies From Treasury', '133209', '2022-06-09 07:54:33', '2022-06-09 07:54:33'),
(7, 5, 'Inspection Fees', '142213', '2022-06-09 07:59:02', '2022-06-09 07:59:02'),
(8, 7, 'Revenue Reserves', '5112', '2022-06-09 08:07:13', '2022-06-09 08:07:13'),
(9, 8, 'Wages And Salaries - Cash', '2111', '2022-06-09 08:34:22', '2022-06-09 08:34:22'),
(10, 9, 'Social Contributions-Actual', '2121', '2022-06-09 08:37:57', '2022-06-09 08:37:57'),
(11, 10, 'Medical Expenses (To Employees)', '213001', '2022-06-09 08:40:21', '2022-06-09 08:40:21'),
(12, 10, 'Incapacity, Death Benefits And Funeral Expenses', '213002', '2022-06-09 08:40:45', '2022-06-09 08:40:45'),
(13, 10, 'Gratuity Expenses', '213004', '2022-06-09 08:41:11', '2022-06-09 08:41:11'),
(14, 11, 'Advertising And Public Relations', '221001', '2022-06-09 09:11:38', '2022-06-09 09:11:38'),
(15, 11, 'Workshops And Seminars', '221002', '2022-06-09 09:12:02', '2022-06-09 09:12:02'),
(16, 11, 'Staff Training', '221003', '2022-06-09 09:12:23', '2022-06-09 09:12:23'),
(17, 11, 'Books, Periodicals &amp; Newspapers', '221007', '2022-06-09 09:12:47', '2022-06-09 09:12:47'),
(18, 11, 'Welfare And Entertainment', '221009', '2022-06-09 09:13:09', '2022-06-09 09:13:09'),
(19, 11, 'Printing, Stationery, Photocopying And Binding', '221011', '2022-06-09 09:13:29', '2022-06-09 09:13:29'),
(20, 11, 'Small Office Equipment', '221012', '2022-06-09 09:13:54', '2022-06-09 09:13:54'),
(21, 11, 'Bank Charges And Other Bank Related Costs', '221014', '2022-06-09 09:14:18', '2022-06-09 09:14:18'),
(22, 11, 'IFMS Recurrent Costs', '221016', '2022-06-09 09:14:43', '2022-06-09 09:14:43'),
(23, 11, 'IPPS Recurrent', '221020', '2022-06-09 09:15:05', '2022-06-09 09:15:05'),
(24, 12, 'Telecommunications', '222001', '2022-06-09 09:16:21', '2022-06-09 09:16:21'),
(25, 12, 'Information And Communications Technology (ICT)', '222003', '2022-06-09 09:16:45', '2022-06-09 09:16:45'),
(26, 13, 'Rent (Produced Assets) To Private Entities', '223003', '2022-06-09 09:17:53', '2022-06-09 09:17:53'),
(27, 13, 'Guard And Security Services', '223004', '2022-06-09 09:18:19', '2022-06-09 09:18:19'),
(28, 13, 'Electricity', '223005', '2022-06-09 09:18:42', '2022-06-09 09:18:42'),
(29, 13, 'Water', '223006', '2022-06-09 09:19:12', '2022-06-09 09:19:12'),
(30, 14, 'Cleaning And Sanitation', '224004', '2022-06-09 09:20:32', '2022-06-09 09:21:40'),
(31, 14, 'Uniforms And Protective Gear', '224005', '2022-06-09 09:20:55', '2022-06-09 09:21:28'),
(32, 15, 'Travel Inland', '227001', '2022-06-09 09:22:50', '2022-06-09 09:22:50'),
(33, 15, 'Travel Abroad', '227002', '2022-06-09 09:23:13', '2022-06-09 09:23:13'),
(34, 15, 'Fuel, Lubricants And Oils', '227004', '2022-06-09 09:23:34', '2022-06-09 09:23:34'),
(35, 16, 'Maintenance - Vehicles', '228002', '2022-06-09 09:24:37', '2022-06-09 09:24:37'),
(36, 16, 'Maintenance 0f Machinery, Equipment &amp; Furniture', '228003', '2022-06-09 09:25:04', '2022-06-09 09:25:04'),
(37, 17, 'Current', '2621', '2022-06-09 09:27:21', '2022-06-09 09:27:21'),
(38, 18, 'Current', '2631', '2022-06-09 09:29:10', '2022-06-09 09:29:10'),
(39, 19, 'Current', '2641', '2022-06-09 09:31:06', '2022-06-09 09:31:06'),
(40, 19, 'Capital', '2642', '2022-06-09 09:33:49', '2022-06-09 09:33:49'),
(41, 20, 'Expenses Related To Capital Works', '2815', '2022-06-09 09:36:00', '2022-06-09 09:36:00'),
(42, 21, 'Current', '2821', '2022-06-09 09:37:57', '2022-06-09 09:37:57');

--
-- Indexes for dumped tables
--

--
-- Indexes for table `bank_accounts`
--
ALTER TABLE `bank_accounts`
  ADD PRIMARY KEY (`id`),
  ADD KEY `bank_accounts_ledger_category_id_index` (`ledger_category_id`),
  ADD KEY `bank_accounts_ledger_id_index` (`ledger_id`);

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

--
-- Indexes for table `beneficiaries`
--
ALTER TABLE `beneficiaries`
  ADD PRIMARY KEY (`id`),
  ADD KEY `beneficiaries_account_number_index` (`account_number`),
  ADD KEY `beneficiaries_code_in_coa_index` (`code_in_coa`);

--
-- Indexes for table `failed_jobs`
--
ALTER TABLE `failed_jobs`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `failed_jobs_uuid_unique` (`uuid`);

--
-- Indexes for table `general_ledgers`
--
ALTER TABLE `general_ledgers`
  ADD PRIMARY KEY (`id`),
  ADD KEY `general_ledgers_account_index` (`account`);

--
-- Indexes for table `last_bank_accounts`
--
ALTER TABLE `last_bank_accounts`
  ADD PRIMARY KEY (`id`),
  ADD KEY `last_bank_accounts_sub_bank_account_id_index` (`sub_bank_account_id`);

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

--
-- Indexes for table `ledger_categories`
--
ALTER TABLE `ledger_categories`
  ADD PRIMARY KEY (`id`),
  ADD KEY `ledger_categories_ledger_id_index` (`ledger_id`);

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

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

--
-- Indexes for table `more_account_belows`
--
ALTER TABLE `more_account_belows`
  ADD PRIMARY KEY (`id`),
  ADD KEY `more_account_belows_account_below_bank_account_id_index` (`account_below_bank_account_id`);

--
-- Indexes for table `sub_bank_accounts`
--
ALTER TABLE `sub_bank_accounts`
  ADD PRIMARY KEY (`id`),
  ADD KEY `sub_bank_accounts_bank_account_id_index` (`bank_account_id`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `bank_accounts`
--
ALTER TABLE `bank_accounts`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=22;

--
-- AUTO_INCREMENT for table `bank_account_categories`
--
ALTER TABLE `bank_account_categories`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `beneficiaries`
--
ALTER TABLE `beneficiaries`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=23;

--
-- AUTO_INCREMENT for table `failed_jobs`
--
ALTER TABLE `failed_jobs`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `general_ledgers`
--
ALTER TABLE `general_ledgers`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=119;

--
-- AUTO_INCREMENT for table `last_bank_accounts`
--
ALTER TABLE `last_bank_accounts`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=26;

--
-- AUTO_INCREMENT for table `ledgers`
--
ALTER TABLE `ledgers`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;

--
-- AUTO_INCREMENT for table `ledger_categories`
--
ALTER TABLE `ledger_categories`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=12;

--
-- AUTO_INCREMENT for table `logging_activities`
--
ALTER TABLE `logging_activities`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

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

--
-- AUTO_INCREMENT for table `more_account_belows`
--
ALTER TABLE `more_account_belows`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=23;

--
-- AUTO_INCREMENT for table `sub_bank_accounts`
--
ALTER TABLE `sub_bank_accounts`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=43;

--
-- Constraints for dumped tables
--

--
-- Constraints for table `bank_accounts`
--
ALTER TABLE `bank_accounts`
  ADD CONSTRAINT `bank_accounts_ledger_category_id_foreign` FOREIGN KEY (`ledger_category_id`) REFERENCES `ledger_categories` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `bank_accounts_ledger_id_foreign` FOREIGN KEY (`ledger_id`) REFERENCES `ledgers` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `last_bank_accounts`
--
ALTER TABLE `last_bank_accounts`
  ADD CONSTRAINT `last_bank_accounts_sub_bank_account_id_foreign` FOREIGN KEY (`sub_bank_account_id`) REFERENCES `sub_bank_accounts` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `ledger_categories`
--
ALTER TABLE `ledger_categories`
  ADD CONSTRAINT `ledger_categories_ledger_id_foreign` FOREIGN KEY (`ledger_id`) REFERENCES `ledgers` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `more_account_belows`
--
ALTER TABLE `more_account_belows`
  ADD CONSTRAINT `more_account_belows_account_below_bank_account_id_foreign` FOREIGN KEY (`account_below_bank_account_id`) REFERENCES `last_bank_accounts` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `sub_bank_accounts`
--
ALTER TABLE `sub_bank_accounts`
  ADD CONSTRAINT `sub_bank_accounts_bank_account_id_foreign` FOREIGN KEY (`bank_account_id`) REFERENCES `bank_accounts` (`id`) ON DELETE CASCADE;
COMMIT;

