Skip to content

Commit 4e35b76

Browse files
committed
fix init sql script for blogapi
1 parent a26a89e commit 4e35b76

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

jdk_8_maven/em/embedded/rest/blogapi/src/main/resources/blogapi.sql

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,4 @@ CREATE TABLE `user_role` (
187187
CONSTRAINT `fk_security_role_id` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`)
188188
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
189189

190-
LOCK TABLES `roles` WRITE;
191-
INSERT INTO `roles` VALUES (1,'ROLE_ADMIN'),(2,'ROLE_USER');
192-
UNLOCK TABLES;
190+

jdk_8_maven/em/embedded/rest/blogapi/src/main/resources/data.sql

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
LOCK TABLES `roles` WRITE;
2+
INSERT INTO `roles` VALUES (1,'ROLE_ADMIN'),(2,'ROLE_USER');
3+
UNLOCK TABLES;
4+
15
LOCK TABLES `users` WRITE;
26
INSERT INTO `users` (first_name, last_name, username, password, email, address_id, phone, website, company_id, created_at, updated_at) VALUES ('foo can', 'adminoglu', 'user', '$2a$10$iTXPjffYCIaUBD3iGVcv..AT6mB21IpcBe50.HlC1rbDAIsutL1Qi', 'user@bar.com', null, null, null, null, '2025-02-11 14:51:00', '2025-02-11 14:51:00');
37
INSERT INTO `users` (first_name, last_name, username, password, email, address_id, phone, website, company_id, created_at, updated_at) VALUES ('admin gul', 'adminoglu', 'admin', '$2a$10$YZA7FB23laZhRhrWMChNsOoveLITZmrY7Ca9NEwuo67vLbXt1u6ky', 'admin@bar.com', null, null, null, null, '2025-02-11 14:51:20', '2025-02-11 14:51:20');

0 commit comments

Comments
 (0)