text: -- phpMyAdmin SQL Dump
  -- version 5.1.1
  -- https://www.phpmyadmin.net/
  --
  -- Host: localhost
  -- Generation Time: Nov 01, 2021 at 10:26 AM
  -- Server version: 10.4.21-MariaDB
  -- PHP Version: 7.3.31
  
  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: `yii2advanced`
  --
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `anggota`
  --
  
  CREATE TABLE `anggota` (
    `anggota_id` int(25) NOT NULL,
    `nomor_anggota` varchar(255) DEFAULT NULL,
    `nama_anggota` varchar(225) DEFAULT NULL,
    `gambar` varchar(255) DEFAULT NULL,
    `created_by` int(25) DEFAULT NULL,
    `created_at` varchar(25) DEFAULT NULL,
    `updated_at` varchar(25) DEFAULT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  
  --
  -- Dumping data for table `anggota`
  --
  
  INSERT INTO `anggota` (`anggota_id`, `nomor_anggota`, `nama_anggota`, `gambar`, `created_by`, `created_at`, `updated_at`) VALUES
  (13, '78741', 'Andri Rizki Saputra', 'andri-rizki-saputra.png', NULL, '1635756466', '1635756466'),
  (14, '78742', 'Andri Rizki', 'andri-rizki-saputra.png', NULL, '1635756476', '1635757487'),
  (15, '78743', 'Andri Rizki Saputra', 'andri-rizki-saputra.png', NULL, '1635756477', '1635756477'),
  (18, '78745', 'Andri Rizki Saputra', 'andri-rizki-saputra.png', NULL, '1635757093', '1635757093');
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `kehadiran`
  --
  
  CREATE TABLE `kehadiran` (
    `kehadiran_id` int(25) NOT NULL,
    `nomor_anggota` varchar(255) DEFAULT NULL,
    `created_by` int(25) DEFAULT NULL,
    `created_at` varchar(25) DEFAULT NULL,
    `updated_at` varchar(25) DEFAULT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  
  --
  -- Dumping data for table `kehadiran`
  --
  
  INSERT INTO `kehadiran` (`kehadiran_id`, `nomor_anggota`, `created_by`, `created_at`, `updated_at`) VALUES
  (1, '78745', NULL, '1635758209', '1635758209'),
  (2, '78745', NULL, '1635758212', '1635758212'),
  (3, '78745', NULL, '1635758213', '1635758213');
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `user`
  --
  
  CREATE TABLE `user` (
    `user_id` int(11) NOT NULL,
    `username` varchar(255) DEFAULT NULL,
    `auth_key` varchar(255) DEFAULT NULL,
    `password_hash` varchar(255) DEFAULT NULL,
    `password_reset_token` varchar(255) DEFAULT NULL,
    `email` varchar(255) DEFAULT NULL,
    `status` enum('0','1') NOT NULL DEFAULT '1',
    `created_at` varchar(25) DEFAULT NULL,
    `updated_at` varchar(25) DEFAULT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  
  --
  -- Indexes for dumped tables
  --
  
  --
  -- Indexes for table `anggota`
  --
  ALTER TABLE `anggota`
    ADD PRIMARY KEY (`anggota_id`),
    ADD UNIQUE KEY `nomor_anggota` (`nomor_anggota`),
    ADD KEY `created_by` (`created_by`);
  
  --
  -- Indexes for table `kehadiran`
  --
  ALTER TABLE `kehadiran`
    ADD PRIMARY KEY (`kehadiran_id`),
    ADD KEY `nomor_anggota` (`nomor_anggota`),
    ADD KEY `created_by` (`created_by`);
  
  --
  -- Indexes for table `user`
  --
  ALTER TABLE `user`
    ADD PRIMARY KEY (`user_id`);
  
  --
  -- AUTO_INCREMENT for dumped tables
  --
  
  --
  -- AUTO_INCREMENT for table `anggota`
  --
  ALTER TABLE `anggota`
    MODIFY `anggota_id` int(25) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=19;
  
  --
  -- AUTO_INCREMENT for table `kehadiran`
  --
  ALTER TABLE `kehadiran`
    MODIFY `kehadiran_id` int(25) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;
  
  --
  -- AUTO_INCREMENT for table `user`
  --
  ALTER TABLE `user`
    MODIFY `user_id` int(11) NOT NULL AUTO_INCREMENT;
  
  --
  -- Constraints for dumped tables
  --
  
  --
  -- Constraints for table `anggota`
  --
  ALTER TABLE `anggota`
    ADD CONSTRAINT `anggota_ibfk_1` FOREIGN KEY (`created_by`) REFERENCES `user` (`user_id`);
  
  --
  -- Constraints for table `kehadiran`
  --
  ALTER TABLE `kehadiran`
    ADD CONSTRAINT `kehadiran_ibfk_1` FOREIGN KEY (`created_by`) REFERENCES `user` (`user_id`),
    ADD CONSTRAINT `kehadiran_ibfk_2` FOREIGN KEY (`nomor_anggota`) REFERENCES `anggota` (`nomor_anggota`);
  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 */;
  