text: -- phpMyAdmin SQL Dump
  -- version 4.2.7.1
  -- http://www.phpmyadmin.net
  --
  -- Host: 127.0.0.1
  -- Generation Time: Mar 26, 2016 at 08:58 AM
  -- Server version: 5.6.20
  -- PHP Version: 5.5.15
  
  SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
  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 utf8 */;
  
  --
  -- Database: `homebudget`
  --
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `auth_assignment`
  --
  
  CREATE TABLE IF NOT EXISTS `auth_assignment` (
    `item_name` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
    `user_id` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
    `created_at` int(11) DEFAULT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `auth_item`
  --
  
  CREATE TABLE IF NOT EXISTS `auth_item` (
    `name` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
    `type` int(11) NOT NULL,
    `description` text COLLATE utf8_unicode_ci,
    `rule_name` varchar(64) COLLATE utf8_unicode_ci DEFAULT NULL,
    `data` text COLLATE utf8_unicode_ci,
    `created_at` int(11) DEFAULT NULL,
    `updated_at` int(11) DEFAULT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  
  --
  -- Dumping data for table `auth_item`
  --
  
  INSERT INTO `auth_item` (`name`, `type`, `description`, `rule_name`, `data`, `created_at`, `updated_at`) VALUES
  ('admin', 1, NULL, 'userGroup', NULL, 1458941694, 1458941694),
  ('create_profile', 2, NULL, NULL, NULL, 1458941694, 1458941694),
  ('delete_profile', 2, NULL, 'console\\rbac\\CanDelete', NULL, 1458941694, 1458941694),
  ('super_admin', 1, NULL, 'userGroup', NULL, 1458941694, 1458941694),
  ('update_profile', 2, NULL, 'console\\rbac\\CanEdit', NULL, 1458941694, 1458941694),
  ('user', 1, NULL, 'userGroup', NULL, 1458941694, 1458941694);
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `auth_item_child`
  --
  
  CREATE TABLE IF NOT EXISTS `auth_item_child` (
    `parent` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
    `child` varchar(64) COLLATE utf8_unicode_ci NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  
  --
  -- Dumping data for table `auth_item_child`
  --
  
  INSERT INTO `auth_item_child` (`parent`, `child`) VALUES
  ('super_admin', 'admin'),
  ('admin', 'create_profile'),
  ('admin', 'delete_profile'),
  ('user', 'update_profile'),
  ('admin', 'user');
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `auth_rule`
  --
  
  CREATE TABLE IF NOT EXISTS `auth_rule` (
    `name` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
    `data` text COLLATE utf8_unicode_ci,
    `created_at` int(11) DEFAULT NULL,
    `updated_at` int(11) DEFAULT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  
  --
  -- Dumping data for table `auth_rule`
  --
  
  INSERT INTO `auth_rule` (`name`, `data`, `created_at`, `updated_at`) VALUES
  ('console\\rbac\\CanDelete', 'O:22:"console\\rbac\\CanDelete":3:{s:4:"name";s:22:"console\\rbac\\CanDelete";s:9:"createdAt";i:1458941694;s:9:"updatedAt";i:1458941694;}', 1458941694, 1458941694),
  ('console\\rbac\\CanEdit', 'O:20:"console\\rbac\\CanEdit":3:{s:4:"name";s:20:"console\\rbac\\CanEdit";s:9:"createdAt";i:1458941694;s:9:"updatedAt";i:1458941694;}', 1458941694, 1458941694),
  ('userGroup', 'O:26:"console\\rbac\\UserGroupRule":3:{s:4:"name";s:9:"userGroup";s:9:"createdAt";i:1458941694;s:9:"updatedAt";i:1458941694;}', 1458941694, 1458941694);
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `mail_templates`
  --
  
  CREATE TABLE IF NOT EXISTS `mail_templates` (
  `id` int(11) NOT NULL,
    `template_type` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
    `subject` varchar(150) COLLATE utf8_unicode_ci NOT NULL,
    `template` text COLLATE utf8_unicode_ci
  ) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=3 ;
  
  --
  -- Dumping data for table `mail_templates`
  --
  
  INSERT INTO `mail_templates` (`id`, `template_type`, `subject`, `template`) VALUES
  (1, 'email-verification', 'Email Verification', '<p>Dear {user_name},</p>\n                <p>Thank you for expressing your interest in our site. To finalize your request we need to verify your email address.</p>\n                <p>Please <a href="{email_verification_url}">click here</a> to complete the registration process.</p>\n                <p>Thank you again for your interest.</p>\n                <p>Best regards,</p>\n                <p>Advanced Template</p>\n                <p>advanced-template.dev</p>'),
  (2, 'welcome-mail', 'Welcome', '<p>Dear {user_name},</p>\n                <p>Thank you completing your registration with our site.</p>\n                <p>Best regards,</p>\n                <p>Advanced Template</p>\n                <p>advanced-template.dev</p>');
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `migration`
  --
  
  CREATE TABLE IF NOT EXISTS `migration` (
    `version` varchar(180) NOT NULL,
    `apply_time` int(11) DEFAULT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  
  --
  -- Dumping data for table `migration`
  --
  
  INSERT INTO `migration` (`version`, `apply_time`) VALUES
  ('m000000_000000_base', 1458941680),
  ('m130524_201442_init', 1458941683),
  ('m150909_161409_mail_templates', 1458941683),
  ('m150915_102235_rbac_init', 1458941683);
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `user`
  --
  
  CREATE TABLE IF NOT EXISTS `user` (
  `id` int(11) NOT NULL,
    `auth_key` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
    `password_hash` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
    `password_reset_token` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
    `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
    `status` smallint(6) NOT NULL DEFAULT '1',
    `created_at` int(11) NOT NULL,
    `updated_at` int(11) NOT NULL,
    `role` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
    `username` varchar(64) COLLATE utf8_unicode_ci DEFAULT NULL,
    `email_verification_status` tinyint(1) NOT NULL DEFAULT '0',
    `email_verification_code` varchar(256) COLLATE utf8_unicode_ci DEFAULT NULL
  ) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=2 ;
  
  --
  -- Dumping data for table `user`
  --
  
  INSERT INTO `user` (`id`, `auth_key`, `password_hash`, `password_reset_token`, `email`, `status`, `created_at`, `updated_at`, `role`, `username`, `email_verification_status`, `email_verification_code`) VALUES
  (1, 'ydkH8Mf4JJfpEB5hTUmbfGYPBpDN4ZVS', '$2y$13$i7FcJZD1xef.leW46dXcae2irHRtY.aw2Vx.GDKtrTw5v06FOXqH6', NULL, 'shamus@douganfamily.com.au', 1, 1458942826, 1458942826, 'super_admin', NULL, 0, 'W72IqEXO7Dq6GXoT');
  
  --
  -- Indexes for dumped tables
  --
  
  --
  -- Indexes for table `auth_assignment`
  --
  ALTER TABLE `auth_assignment`
   ADD PRIMARY KEY (`item_name`,`user_id`);
  
  --
  -- Indexes for table `auth_item`
  --
  ALTER TABLE `auth_item`
   ADD PRIMARY KEY (`name`), ADD KEY `rule_name` (`rule_name`), ADD KEY `idx-auth_item-type` (`type`);
  
  --
  -- Indexes for table `auth_item_child`
  --
  ALTER TABLE `auth_item_child`
   ADD PRIMARY KEY (`parent`,`child`), ADD KEY `child` (`child`);
  
  --
  -- Indexes for table `auth_rule`
  --
  ALTER TABLE `auth_rule`
   ADD PRIMARY KEY (`name`);
  
  --
  -- Indexes for table `mail_templates`
  --
  ALTER TABLE `mail_templates`
   ADD PRIMARY KEY (`id`);
  
  --
  -- Indexes for table `migration`
  --
  ALTER TABLE `migration`
   ADD PRIMARY KEY (`version`);
  
  --
  -- Indexes for table `user`
  --
  ALTER TABLE `user`
   ADD PRIMARY KEY (`id`);
  
  --
  -- AUTO_INCREMENT for dumped tables
  --
  
  --
  -- AUTO_INCREMENT for table `mail_templates`
  --
  ALTER TABLE `mail_templates`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=3;
  --
  -- AUTO_INCREMENT for table `user`
  --
  ALTER TABLE `user`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=2;
  --
  -- Constraints for dumped tables
  --
  
  --
  -- Constraints for table `auth_assignment`
  --
  ALTER TABLE `auth_assignment`
  ADD CONSTRAINT `auth_assignment_ibfk_1` FOREIGN KEY (`item_name`) REFERENCES `auth_item` (`name`) ON DELETE CASCADE ON UPDATE CASCADE;
  
  --
  -- Constraints for table `auth_item`
  --
  ALTER TABLE `auth_item`
  ADD CONSTRAINT `auth_item_ibfk_1` FOREIGN KEY (`rule_name`) REFERENCES `auth_rule` (`name`) ON DELETE SET NULL ON UPDATE CASCADE;
  
  --
  -- Constraints for table `auth_item_child`
  --
  ALTER TABLE `auth_item_child`
  ADD CONSTRAINT `auth_item_child_ibfk_1` FOREIGN KEY (`parent`) REFERENCES `auth_item` (`name`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `auth_item_child_ibfk_2` FOREIGN KEY (`child`) REFERENCES `auth_item` (`name`) ON DELETE CASCADE ON UPDATE CASCADE;
  
  /*!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 */;
  