text: -- phpMyAdmin SQL Dump
  -- version 4.8.3
  -- https://www.phpmyadmin.net/
  --
  -- Host: 127.0.0.1
  -- Generation Time: Nov 28, 2018 at 04:25 PM
  -- Server version: 10.1.36-MariaDB
  -- PHP Version: 7.2.11
  
  SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
  SET AUTOCOMMIT = 0;
  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: `aclexample`
  --
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `acl_phinxlog`
  --
  
  CREATE TABLE `acl_phinxlog` (
    `version` bigint(20) NOT NULL,
    `migration_name` varchar(100) DEFAULT NULL,
    `start_time` timestamp NULL DEFAULT NULL,
    `end_time` timestamp NULL DEFAULT NULL,
    `breakpoint` tinyint(1) NOT NULL DEFAULT '0'
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `acos`
  --
  
  CREATE TABLE `acos` (
    `id` int(11) NOT NULL,
    `parent_id` int(11) DEFAULT NULL,
    `model` varchar(255) DEFAULT NULL,
    `foreign_key` int(11) DEFAULT NULL,
    `alias` varchar(255) DEFAULT NULL,
    `lft` int(11) DEFAULT NULL,
    `rght` int(11) DEFAULT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  
  --
  -- Dumping data for table `acos`
  --
  
  INSERT INTO `acos` (`id`, `parent_id`, `model`, `foreign_key`, `alias`, `lft`, `rght`) VALUES
  (1, NULL, NULL, NULL, 'controllers', 1, 14),
  (2, 1, NULL, NULL, 'Articles', 2, 13),
  (3, 2, NULL, NULL, 'index', 3, 4),
  (4, 2, NULL, NULL, 'view', 5, 6),
  (5, 2, NULL, NULL, 'add', 7, 8),
  (6, 2, NULL, NULL, 'edit', 9, 10),
  (7, 2, NULL, NULL, 'delete', 11, 12),
  (8, NULL, 'Articles', 1, NULL, 15, 16);
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `aros`
  --
  
  CREATE TABLE `aros` (
    `id` int(11) NOT NULL,
    `parent_id` int(11) DEFAULT NULL,
    `model` varchar(255) DEFAULT NULL,
    `foreign_key` char(36) DEFAULT NULL,
    `alias` varchar(255) DEFAULT NULL,
    `lft` int(11) DEFAULT NULL,
    `rght` int(11) DEFAULT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  
  --
  -- Dumping data for table `aros`
  --
  
  INSERT INTO `aros` (`id`, `parent_id`, `model`, `foreign_key`, `alias`, `lft`, `rght`) VALUES
  (1, NULL, 'Roles', '1468eadf-50e7-40a5-94c5-fb7db23165e9', NULL, 1, 2),
  (2, NULL, 'Roles', 'e5484cde-5f7c-4c2f-8f53-a5753168074a', NULL, 3, 4),
  (3, NULL, 'Roles', 'f51f208b-b044-4e84-a64b-69b59d6531d2', NULL, 5, 6),
  (4, NULL, 'Roles', '8a670f9f-44d2-4aba-978a-fe5861aa18ba', NULL, 7, 8),
  (5, NULL, 'Roles', 'cbbb7a4c-47f4-4909-a93d-326fa54ef244', NULL, 9, 10),
  (6, NULL, 'Roles', '0329659e-24b3-40d0-b752-5f3cafba8a77', NULL, 11, 12);
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `aros_acos`
  --
  
  CREATE TABLE `aros_acos` (
    `id` int(11) NOT NULL,
    `aro_id` int(11) NOT NULL,
    `aco_id` int(11) NOT NULL,
    `_create` varchar(2) NOT NULL DEFAULT '0',
    `_read` varchar(2) NOT NULL DEFAULT '0',
    `_update` varchar(2) NOT NULL DEFAULT '0',
    `_delete` varchar(2) NOT NULL DEFAULT '0'
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  
  --
  -- Dumping data for table `aros_acos`
  --
  
  INSERT INTO `aros_acos` (`id`, `aro_id`, `aco_id`, `_create`, `_read`, `_update`, `_delete`) VALUES
  (1, 1, 5, '1', '1', '1', '1'),
  (2, 3, 4, '1', '1', '1', '1'),
  (3, 1, 3, '1', '1', '1', '1'),
  (4, 2, 3, '1', '1', '1', '1'),
  (5, 3, 3, '1', '1', '1', '1');
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `articles`
  --
  
  CREATE TABLE `articles` (
    `id` int(11) NOT NULL,
    `user_id` char(36) NOT NULL,
    `title` varchar(255) NOT NULL,
    `body` text,
    `published` tinyint(1) DEFAULT '0',
    `created` datetime DEFAULT NULL,
    `modified` datetime DEFAULT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  
  --
  -- Dumping data for table `articles`
  --
  
  INSERT INTO `articles` (`id`, `user_id`, `title`, `body`, `published`, `created`, `modified`) VALUES
  (1, '70a7296c-c981-46a4-bd7d-08476917779c', 'tset', 'trtrtr', 1, '2018-11-28 15:08:12', '2018-11-28 15:08:12');
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `cake_d_c_users_phinxlog`
  --
  
  CREATE TABLE `cake_d_c_users_phinxlog` (
    `version` bigint(20) NOT NULL,
    `migration_name` varchar(100) DEFAULT NULL,
    `start_time` timestamp NULL DEFAULT NULL,
    `end_time` timestamp NULL DEFAULT NULL,
    `breakpoint` tinyint(1) NOT NULL DEFAULT '0'
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `phinxlog`
  --
  
  CREATE TABLE `phinxlog` (
    `version` bigint(20) NOT NULL,
    `migration_name` varchar(100) DEFAULT NULL,
    `start_time` timestamp NULL DEFAULT NULL,
    `end_time` timestamp NULL DEFAULT NULL,
    `breakpoint` tinyint(1) NOT NULL DEFAULT '0'
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  
  --
  -- Dumping data for table `phinxlog`
  --
  
  INSERT INTO `phinxlog` (`version`, `migration_name`, `start_time`, `end_time`, `breakpoint`) VALUES
  (20180117132156, 'Initial', '2018-11-28 09:14:13', '2018-11-28 09:14:16', 0);
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `roles`
  --
  
  CREATE TABLE `roles` (
    `id` char(36) NOT NULL,
    `name` varchar(100) NOT NULL,
    `created` datetime DEFAULT NULL,
    `modified` datetime DEFAULT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  
  --
  -- Dumping data for table `roles`
  --
  
  INSERT INTO `roles` (`id`, `name`, `created`, `modified`) VALUES
  ('0329659e-24b3-40d0-b752-5f3cafba8a77', 'worker', '2018-11-28 15:02:42', '2018-11-28 15:02:42'),
  ('8a670f9f-44d2-4aba-978a-fe5861aa18ba', 'superadmin', '2018-11-28 15:02:27', '2018-11-28 15:02:27'),
  ('cbbb7a4c-47f4-4909-a93d-326fa54ef244', 'admin', '2018-11-28 15:02:35', '2018-11-28 15:02:35');
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `social_accounts`
  --
  
  CREATE TABLE `social_accounts` (
    `id` char(36) NOT NULL,
    `user_id` char(36) NOT NULL,
    `provider` varchar(255) NOT NULL,
    `username` varchar(255) DEFAULT NULL,
    `reference` varchar(255) NOT NULL,
    `avatar` varchar(255) DEFAULT NULL,
    `description` text,
    `link` varchar(255) NOT NULL,
    `token` varchar(500) NOT NULL,
    `token_secret` varchar(500) DEFAULT NULL,
    `token_expires` datetime DEFAULT NULL,
    `active` tinyint(1) NOT NULL DEFAULT '1',
    `data` text NOT NULL,
    `created` datetime NOT NULL,
    `modified` datetime NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `users`
  --
  
  CREATE TABLE `users` (
    `id` char(36) NOT NULL,
    `username` varchar(255) NOT NULL,
    `email` varchar(255) DEFAULT NULL,
    `password` varchar(255) NOT NULL,
    `first_name` varchar(50) DEFAULT NULL,
    `last_name` varchar(50) DEFAULT NULL,
    `token` varchar(255) DEFAULT NULL,
    `token_expires` datetime DEFAULT NULL,
    `api_token` varchar(255) DEFAULT NULL,
    `activation_date` datetime DEFAULT NULL,
    `secret` varchar(32) DEFAULT NULL,
    `secret_verified` tinyint(1) DEFAULT NULL,
    `tos_date` datetime DEFAULT NULL,
    `active` tinyint(1) NOT NULL DEFAULT '0',
    `is_superuser` tinyint(1) NOT NULL DEFAULT '0',
    `role_id` char(36) DEFAULT NULL,
    `created` datetime NOT NULL,
    `modified` datetime NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  
  --
  -- Dumping data for table `users`
  --
  
  INSERT INTO `users` (`id`, `username`, `email`, `password`, `first_name`, `last_name`, `token`, `token_expires`, `api_token`, `activation_date`, `secret`, `secret_verified`, `tos_date`, `active`, `is_superuser`, `role_id`, `created`, `modified`) VALUES
  ('70a7296c-c981-46a4-bd7d-08476917779c', 'sahsuraj', 'sahsuraj@gmail.com', '$2y$10$Ad0FEx9qTRhgKUCsR0XI1.t5DuFzcanR/sIkz5sv7CS7ZA1bh94Tu', 'suraj', 'sah', 'cdc4df21f57f5af1d04e3b6e26f6751a', '2018-11-28 15:48:57', NULL, NULL, NULL, NULL, '2018-11-28 14:48:57', 1, 0, NULL, '2018-11-28 14:48:57', '2018-11-28 14:48:57'),
  ('7b23e029-d7a6-439a-a457-84e86514d05d', 'superadmin', 'superadmin@example.com', '$2y$10$mA9Yq09I49EJ2tEx3JqKpuwTioJl/5VaCfLXX4beq85JOa0.K.yLy', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, 1, NULL, '2018-11-28 14:57:23', '2018-11-28 14:57:23');
  
  --
  -- Indexes for dumped tables
  --
  
  --
  -- Indexes for table `acl_phinxlog`
  --
  ALTER TABLE `acl_phinxlog`
    ADD PRIMARY KEY (`version`);
  
  --
  -- Indexes for table `acos`
  --
  ALTER TABLE `acos`
    ADD PRIMARY KEY (`id`),
    ADD KEY `lft` (`lft`,`rght`),
    ADD KEY `alias` (`alias`);
  
  --
  -- Indexes for table `aros`
  --
  ALTER TABLE `aros`
    ADD PRIMARY KEY (`id`),
    ADD KEY `lft` (`lft`,`rght`),
    ADD KEY `alias` (`alias`);
  
  --
  -- Indexes for table `aros_acos`
  --
  ALTER TABLE `aros_acos`
    ADD PRIMARY KEY (`id`),
    ADD UNIQUE KEY `aro_id` (`aro_id`,`aco_id`),
    ADD KEY `aco_id` (`aco_id`);
  
  --
  -- Indexes for table `articles`
  --
  ALTER TABLE `articles`
    ADD PRIMARY KEY (`id`),
    ADD KEY `user_id` (`user_id`);
  
  --
  -- Indexes for table `cake_d_c_users_phinxlog`
  --
  ALTER TABLE `cake_d_c_users_phinxlog`
    ADD PRIMARY KEY (`version`);
  
  --
  -- Indexes for table `phinxlog`
  --
  ALTER TABLE `phinxlog`
    ADD PRIMARY KEY (`version`);
  
  --
  -- Indexes for table `roles`
  --
  ALTER TABLE `roles`
    ADD PRIMARY KEY (`id`);
  
  --
  -- Indexes for table `social_accounts`
  --
  ALTER TABLE `social_accounts`
    ADD PRIMARY KEY (`id`),
    ADD KEY `user_id` (`user_id`);
  
  --
  -- Indexes for table `users`
  --
  ALTER TABLE `users`
    ADD PRIMARY KEY (`id`),
    ADD KEY `role_id` (`role_id`);
  
  --
  -- AUTO_INCREMENT for dumped tables
  --
  
  --
  -- AUTO_INCREMENT for table `acos`
  --
  ALTER TABLE `acos`
    MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;
  
  --
  -- AUTO_INCREMENT for table `aros`
  --
  ALTER TABLE `aros`
    MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;
  
  --
  -- AUTO_INCREMENT for table `aros_acos`
  --
  ALTER TABLE `aros_acos`
    MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;
  
  --
  -- AUTO_INCREMENT for table `articles`
  --
  ALTER TABLE `articles`
    MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
  
  --
  -- Constraints for dumped tables
  --
  
  --
  -- Constraints for table `articles`
  --
  ALTER TABLE `articles`
    ADD CONSTRAINT `articles_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`);
  
  --
  -- Constraints for table `social_accounts`
  --
  ALTER TABLE `social_accounts`
    ADD CONSTRAINT `social_accounts_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
  
  --
  -- Constraints for table `users`
  --
  ALTER TABLE `users`
    ADD CONSTRAINT `users_ibfk_1` FOREIGN KEY (`role_id`) REFERENCES `roles` (`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 */;
  