-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🌱 implement initial data seeding with SQL scripts instead of DbSeeder…
… classes
- Loading branch information
Adnane Miliari
committed
Nov 27, 2024
1 parent
bb3f9d3
commit 1127bed
Showing
18 changed files
with
74 additions
and
331 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 0 additions & 22 deletions
22
customer/src/main/java/dev/nano/customer/CustomerDbSeeder.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
INSERT INTO customer (id, name, email, phone, address) | ||
VALUES (nextval('customer_sequence'), 'John Smith', '[email protected]', '+1234567890', '123 Main St, New York, NY'), | ||
(nextval('customer_sequence'), 'Emma Wilson', '[email protected]', '+1987654321', | ||
'456 Park Ave, London, UK'), | ||
(nextval('customer_sequence'), 'Mohammed Ali', '[email protected]', '+212661234567', | ||
'Marina Street, Casablanca, Morocco'), | ||
(nextval('customer_sequence'), 'Sarah Chen', '[email protected]', '+8613912345678', | ||
'789 Nanjing Road, Shanghai, China'); |
27 changes: 0 additions & 27 deletions
27
notification/src/main/java/dev/nano/notification/NotificationDbSeeder.java
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
INSERT INTO notification (id, customer_id, customer_name, customer_email, sender, message, sent_at) | ||
VALUES (nextval('notification_sequence'), 1, 'John Smith', '[email protected]', 'NanoShop', | ||
'Your order #1 has been confirmed', CURRENT_TIMESTAMP), | ||
(nextval('notification_sequence'), 1, 'John Smith', '[email protected]', 'NanoShop', | ||
'Your payment for order #1 has been processed', CURRENT_TIMESTAMP), | ||
(nextval('notification_sequence'), 2, 'Emma Wilson', '[email protected]', 'NanoShop', | ||
'Your order #3 has been shipped', CURRENT_TIMESTAMP), | ||
(nextval('notification_sequence'), 3, 'Mohammed Ali', '[email protected]', 'NanoShop', | ||
'Payment reminder for order #4', CURRENT_TIMESTAMP), | ||
(nextval('notification_sequence'), 4, 'Sarah Chen', '[email protected]', 'NanoShop', | ||
'Thank you for your purchase! Order #5 confirmed', CURRENT_TIMESTAMP); |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
INSERT INTO "order" (id, customer_id, product_id, amount, create_at) | ||
VALUES (nextval('order_sequence'), 1, 1, 2, CURRENT_TIMESTAMP), | ||
(nextval('order_sequence'), 1, 3, 1, CURRENT_TIMESTAMP), | ||
(nextval('order_sequence'), 2, 2, 3, CURRENT_TIMESTAMP), | ||
(nextval('order_sequence'), 3, 4, 1, CURRENT_TIMESTAMP), | ||
(nextval('order_sequence'), 4, 1, 2, CURRENT_TIMESTAMP); |
Oops, something went wrong.