Skip to content

Commit

Permalink
updated dependencies, sql schema
Browse files Browse the repository at this point in the history
  • Loading branch information
n3vrax committed May 2, 2017
1 parent a641ac6 commit f3ce3aa
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 108 deletions.
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,14 @@
"dotkernel/dot-authentication-service": "^0.2",
"dotkernel/dot-authentication-web": "^0.2",
"dotkernel/dot-cache": "^1.1",
"dotkernel/dot-controller": "^0.2",
"dotkernel/dot-controller": "^0.3",
"dotkernel/dot-controller-plugin-flashmessenger": "^0.2",
"dotkernel/dot-controller-plugin-authentication": "^0.2",
"dotkernel/dot-controller-plugin-authorization": "^0.2",
"dotkernel/dot-controller-plugin-forms": "^0.2",
"dotkernel/dot-controller-plugin-mail": "^0.1",
"dotkernel/dot-controller-plugin-session": "^0.2",
"dotkernel/dot-mapper": "^0.3",
"dotkernel/dot-mapper": "^0.4",
"dotkernel/dot-event": "^0.2",
"dotkernel/dot-filter": "^1.1",
"dotkernel/dot-flashmessenger": "^0.2",
Expand All @@ -58,7 +58,7 @@
"dotkernel/dot-rbac-guard": "^0.2",
"dotkernel/dot-session": "^2.0",
"dotkernel/dot-twigrenderer": "^0.2",
"dotkernel/dot-user": "^0.2",
"dotkernel/dot-user": "^0.3",
"dotkernel/dot-validator": "^1.1"
},
"require-dev": {
Expand Down
159 changes: 54 additions & 105 deletions data/admin+frontend.sql
Original file line number Diff line number Diff line change
Expand Up @@ -4,159 +4,108 @@
-- Table structure for table `user`
--

CREATE TABLE `user` (
`id` int(11) NOT NULL,
CREATE TABLE IF NOT EXISTS `user` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`username` varchar(150) DEFAULT NULL,
`email` varchar(150) NOT NULL,
`password` varchar(150) NOT NULL,
`status` enum('pending','active','inactive','deleted') NOT NULL DEFAULT 'pending',
`dateCreated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
`dateCreated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
UNIQUE KEY `email` (`email`),
UNIQUE KEY `username` (`username`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4;

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

--
-- Table structure for table `user_details`
--

CREATE TABLE `user_details` (
CREATE TABLE IF NOT EXISTS `user_details` (
`userId` int(11) NOT NULL,
`firstName` varchar(150) DEFAULT NULL,
`lastName` varchar(150) DEFAULT NULL,
`phone` varchar(150) DEFAULT NULL,
`address` text
`address` text,
PRIMARY KEY (`userId`),
CONSTRAINT `user_details_ibfk_1` FOREIGN KEY (`userId`) REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

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

--
-- Table structure for table `user_message`
--

CREATE TABLE IF NOT EXISTS `user_message` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`email` varchar(150) NOT NULL,
`name` text NOT NULL,
`subject` text NOT NULL,
`message` text NOT NULL,
`created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4;


--
-- Table structure for table `user_role`
--

CREATE TABLE `user_role` (
`id` int(11) NOT NULL,
`name` varchar(150) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE IF NOT EXISTS `user_role` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(150) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `name` (`name`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `user_role`
--

INSERT INTO `user_role` (`id`, `name`) VALUES
(1, 'user'),
(2, 'subscriber');
LOCK TABLES `user_role` WRITE;
/*!40000 ALTER TABLE `user_role` DISABLE KEYS */;
INSERT INTO `user_role` VALUES (2,'subscriber'),(1,'user');
/*!40000 ALTER TABLE `user_role` ENABLE KEYS */;
UNLOCK TABLES;

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

--
-- Table structure for table `user_roles`
--

CREATE TABLE `user_roles` (
CREATE TABLE IF NOT EXISTS `user_roles` (
`userId` int(11) NOT NULL,
`roleId` int(11) NOT NULL
`roleId` int(11) NOT NULL,
PRIMARY KEY (`userId`,`roleId`),
KEY `userId` (`userId`),
KEY `roleId` (`roleId`),
CONSTRAINT `user_roles_ibfk_1` FOREIGN KEY (`userId`) REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `user_roles_ibfk_2` FOREIGN KEY (`roleId`) REFERENCES `user_role` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

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

--
-- Table structure for table `user_token`
--

CREATE TABLE `user_token` (
`id` int(11) NOT NULL,
CREATE TABLE IF NOT EXISTS `user_token` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`userId` int(11) NOT NULL,
`selector` varchar(150) DEFAULT NULL,
`token` varchar(150) NOT NULL,
`expire` int(11) DEFAULT NULL,
`type` enum('confirm','reset','remember') NOT NULL,
`created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Indexes for dumped tables
--

--
-- Indexes for table `user`
--
ALTER TABLE `user`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `email` (`email`),
ADD UNIQUE KEY `username` (`username`);
`created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
KEY `userId` (`userId`),
KEY `selector` (`selector`),
KEY `token` (`token`),
CONSTRAINT `user_token_ibfk_1` FOREIGN KEY (`userId`) REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4;

--
-- Indexes for table `user_details`
--
ALTER TABLE `user_details`
ADD PRIMARY KEY (`userId`);

--
-- Indexes for table `user_role`
--
ALTER TABLE `user_role`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `name` (`name`);

--
-- Indexes for table `user_roles`
--
ALTER TABLE `user_roles`
ADD PRIMARY KEY (`userId`,`roleId`),
ADD KEY `userId` (`userId`),
ADD KEY `roleId` (`roleId`);

--
-- Indexes for table `user_token`
--
ALTER TABLE `user_token`
ADD PRIMARY KEY (`id`),
ADD KEY `userId` (`userId`),
ADD KEY `selector` (`selector`),
ADD KEY `token` (`token`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `user`
--
ALTER TABLE `user`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1;
--
-- AUTO_INCREMENT for table `user_role`
--
ALTER TABLE `user_role`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
--
-- AUTO_INCREMENT for table `user_token`
--
ALTER TABLE `user_token`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1;
--
-- Constraints for dumped tables
--

--
-- Constraints for table `user_details`
--
ALTER TABLE `user_details`
ADD CONSTRAINT `user_details_ibfk_1` FOREIGN KEY (`userId`) REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `user_roles`
--
ALTER TABLE `user_roles`
ADD CONSTRAINT `user_roles_ibfk_2` FOREIGN KEY (`roleId`) REFERENCES `user_role` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `user_roles_ibfk_1` FOREIGN KEY (`userId`) REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `user_token`
--
ALTER TABLE `user_token`
ADD CONSTRAINT `user_token_ibfk_1` FOREIGN KEY (`userId`) REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--*********************************************************
-- DOT_ADMIN EXPORT

--
Expand Down

0 comments on commit f3ce3aa

Please sign in to comment.