那几张建表语句能不能共享下?感谢
求个建表语句
求个建表语句
2018-07-14
```
--
-- Table structure for table `roles_permissions`
--
DROP TABLE IF EXISTS `roles_permissions`;
CREATE TABLE `roles_permissions` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`role_name` varchar(255) DEFAULT NULL,
`permission` varchar(255) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;
--
-- Dumping data for table `roles_permissions`
--
LOCK TABLES `roles_permissions` WRITE;
INSERT INTO `roles_permissions` VALUES (1,'admin','user:select'),(2,'admin','user:delete'),(3,'user','user:select');
UNLOCK TABLES;
--
-- Table structure for table `test_user`
--
DROP TABLE IF EXISTS `test_user`;
CREATE TABLE `test_user` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`user_name` varchar(255) NOT NULL,
`password` varchar(255) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
--
-- Dumping data for table `test_user`
--
LOCK TABLES `test_user` WRITE;
INSERT INTO `test_user` VALUES (1,'xiaoming','654321');
UNLOCK TABLES;
--
-- Table structure for table `user_roles`
--
DROP TABLE IF EXISTS `user_roles`;
CREATE TABLE `user_roles` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`username` varchar(255) DEFAULT NULL,
`role_name` varchar(255) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
--
-- Dumping data for table `user_roles`
--
LOCK TABLES `user_roles` WRITE;
INSERT INTO `user_roles` VALUES (1,'Mark','admin'),(2,'Mark','user');
UNLOCK TABLES;
--
-- Table structure for table `users`
--
DROP TABLE IF EXISTS `users`;
CREATE TABLE `users` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`username` varchar(255) DEFAULT NULL,
`password` varchar(255) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data for table `users`
--
LOCK TABLES `users` WRITE;
INSERT INTO `users` VALUES (1,'Mark','283538989cef48f3d7d8a1c1bdf2008f');
UNLOCK TABLES;
```
举报