text: -- phpMyAdmin SQL Dump
  -- version 5.1.0
  -- https://www.phpmyadmin.net/
  --
  -- Host: 127.0.0.1
  -- Generation Time: Feb 15, 2022 at 10:28 PM
  -- Server version: 10.4.19-MariaDB
  -- PHP Version: 7.4.19
  
  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: `preschooldb`
  --
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `attendance`
  --
  
  CREATE TABLE `attendance` (
    `id` int(255) NOT NULL,
    `date` text NOT NULL,
    `student_id` text NOT NULL,
    `is_available` text NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
  
  --
  -- Dumping data for table `attendance`
  --
  
  INSERT INTO `attendance` (`id`, `date`, `student_id`, `is_available`) VALUES
  (1, '2022-02-12', '3', 'yes'),
  (3, '2022-02-11', '3', 'yes'),
  (7, '2022-02-14', '3', 'yes'),
  (8, '2022-02-14', '8', 'yes'),
  (9, '2022-02-16', '3', 'yes'),
  (10, '2022-02-16', '10', 'yes'),
  (11, '2022-02-16', '8', 'yes');
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `grading`
  --
  
  CREATE TABLE `grading` (
    `id` int(255) NOT NULL,
    `month` varchar(255) NOT NULL,
    `student_id` varchar(255) NOT NULL,
    `grade` varchar(255) NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
  
  --
  -- Dumping data for table `grading`
  --
  
  INSERT INTO `grading` (`id`, `month`, `student_id`, `grade`) VALUES
  (1, '2022-02', '3', '1'),
  (2, '2022-01', '3', '1'),
  (3, '2022-01', '8', '2'),
  (4, '2022-02', '8', '2'),
  (7, '2022-02', '10', '2');
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `payments`
  --
  
  CREATE TABLE `payments` (
    `id` int(255) NOT NULL,
    `date` text NOT NULL,
    `student_id` text NOT NULL,
    `payment_amount` text NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
  
  --
  -- Dumping data for table `payments`
  --
  
  INSERT INTO `payments` (`id`, `date`, `student_id`, `payment_amount`) VALUES
  (1, '2022-02', '1', '100000'),
  (2, '2022-02', '3', '100000'),
  (3, '2022-01', '3', '100000'),
  (4, '2022-01', '3', '100000'),
  (14, '2022-02', '3', '100000'),
  (15, '2022-02', '3', '100000'),
  (16, '2022-02', '3', '150');
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `roles`
  --
  
  CREATE TABLE `roles` (
    `role_id` int(11) NOT NULL,
    `role_name` varchar(255) NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
  
  --
  -- Dumping data for table `roles`
  --
  
  INSERT INTO `roles` (`role_id`, `role_name`) VALUES
  (1, 'admin'),
  (2, 'teacher'),
  (3, 'student');
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `users`
  --
  
  CREATE TABLE `users` (
    `users_id` int(11) NOT NULL,
    `active` int(11) NOT NULL,
    `email` varchar(255) NOT NULL,
    `password` varchar(255) NOT NULL,
    `username` varchar(255) NOT NULL,
    `role_id` int(11) NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
  
  --
  -- Dumping data for table `users`
  --
  
  INSERT INTO `users` (`users_id`, `active`, `email`, `password`, `username`, `role_id`) VALUES
  (1, 1, 'varsha@gmail.com', '25d55ad283aa400af464c76d713c07ad', 'varsha1', 1),
  (2, 1, 'kalpani@gmail.com', '25d55ad283aa400af464c76d713c07ad', 'kalpani', 2),
  (3, 1, 'sumudu@gmail.com', '25d55ad283aa400af464c76d713c07ad', 'sumudu', 3),
  (8, 1, 'maleeshas@gmail.com', '81dc9bdb52d04dc20036dbd8313ed055', 'maleesha', 3),
  (10, 1, 'sulakshanas@gmail.com', '25d55ad283aa400af464c76d713c07ad', 'sulakshana', 3);
  
  --
  -- Indexes for dumped tables
  --
  
  --
  -- Indexes for table `attendance`
  --
  ALTER TABLE `attendance`
    ADD PRIMARY KEY (`id`);
  
  --
  -- Indexes for table `grading`
  --
  ALTER TABLE `grading`
    ADD PRIMARY KEY (`id`);
  
  --
  -- Indexes for table `payments`
  --
  ALTER TABLE `payments`
    ADD PRIMARY KEY (`id`);
  
  --
  -- Indexes for table `roles`
  --
  ALTER TABLE `roles`
    ADD PRIMARY KEY (`role_id`);
  
  --
  -- Indexes for table `users`
  --
  ALTER TABLE `users`
    ADD PRIMARY KEY (`users_id`),
    ADD KEY `role_id` (`role_id`);
  
  --
  -- AUTO_INCREMENT for dumped tables
  --
  
  --
  -- AUTO_INCREMENT for table `attendance`
  --
  ALTER TABLE `attendance`
    MODIFY `id` int(255) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=12;
  
  --
  -- AUTO_INCREMENT for table `grading`
  --
  ALTER TABLE `grading`
    MODIFY `id` int(255) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;
  
  --
  -- AUTO_INCREMENT for table `payments`
  --
  ALTER TABLE `payments`
    MODIFY `id` int(255) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=17;
  
  --
  -- AUTO_INCREMENT for table `roles`
  --
  ALTER TABLE `roles`
    MODIFY `role_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;
  
  --
  -- AUTO_INCREMENT for table `users`
  --
  ALTER TABLE `users`
    MODIFY `users_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=17;
  
  --
  -- Constraints for dumped tables
  --
  
  --
  -- Constraints for table `users`
  --
  ALTER TABLE `users`
    ADD CONSTRAINT `users_ibfk_1` FOREIGN KEY (`role_id`) REFERENCES `roles` (`role_id`);
  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 */;
  