Skip to content

Commit 433200f

Browse files
authored
Add fruits, stores, and prices to database seed scripts (#88)
- Populate fruits table with additional entries for a variety of fruits. - Populate stores table with more store entries for expanded locations. - Populate store_fruit_prices table with comprehensive price entries. - Update sequence configurations to reflect updated data.
1 parent 8f8bcb5 commit 433200f

File tree

6 files changed

+651
-197
lines changed

6 files changed

+651
-197
lines changed
Lines changed: 47 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,61 @@
11
-- Fruits
22
INSERT INTO fruits(id, name, description) VALUES (1, 'Apple', 'Hearty fruit');
33
INSERT INTO fruits(id, name, description) VALUES (2, 'Pear', 'Juicy fruit');
4+
INSERT INTO fruits(id, name, description) VALUES (3, 'Banana', 'Tropical yellow fruit');
5+
INSERT INTO fruits(id, name, description) VALUES (4, 'Orange', 'Citrus fruit rich in vitamin C');
6+
INSERT INTO fruits(id, name, description) VALUES (5, 'Strawberry', 'Sweet red berry');
7+
INSERT INTO fruits(id, name, description) VALUES (6, 'Mango', 'Exotic tropical fruit');
8+
INSERT INTO fruits(id, name, description) VALUES (7, 'Grape', 'Small purple or green fruit');
9+
INSERT INTO fruits(id, name, description) VALUES (8, 'Pineapple', 'Large tropical fruit');
10+
INSERT INTO fruits(id, name, description) VALUES (9, 'Watermelon', 'Large refreshing summer fruit');
11+
INSERT INTO fruits(id, name, description) VALUES (10, 'Kiwi', 'Small fuzzy green fruit');
412

5-
ALTER SEQUENCE fruits_seq RESTART WITH 3;
13+
ALTER SEQUENCE fruits_seq RESTART WITH 11;
614

715
-- Stores
816
INSERT INTO stores(id, name, address, city, country, currency) VALUES (1, 'Store 1', '123 Main St', 'Anytown', 'USA', 'USD');
917
INSERT INTO stores(id, name, address, city, country, currency) VALUES (2, 'Store 2', '456 Main St', 'Paris', 'France', 'EUR');
18+
INSERT INTO stores(id, name, address, city, country, currency) VALUES (3, 'Store 3', '789 Oak Ave', 'London', 'UK', 'GBP');
19+
INSERT INTO stores(id, name, address, city, country, currency) VALUES (4, 'Store 4', '321 Cherry Ln', 'Tokyo', 'Japan', 'JPY');
20+
INSERT INTO stores(id, name, address, city, country, currency) VALUES (5, 'Store 5', '555 Maple Dr', 'Toronto', 'Canada', 'CAD');
21+
INSERT INTO stores(id, name, address, city, country, currency) VALUES (6, 'Store 6', '888 Pine St', 'Sydney', 'Australia', 'AUD');
22+
INSERT INTO stores(id, name, address, city, country, currency) VALUES (7, 'Store 7', '999 Elm Rd', 'Berlin', 'Germany', 'EUR');
23+
INSERT INTO stores(id, name, address, city, country, currency) VALUES (8, 'Store 8', '147 Birch Blvd', 'Mexico City', 'Mexico', 'MXN');
1024

11-
ALTER SEQUENCE stores_seq RESTART WITH 3;
25+
ALTER SEQUENCE stores_seq RESTART WITH 9;
1226

1327
-- Prices
1428
INSERT INTO store_fruit_prices(store_id, fruit_id, price) VALUES (1, 1, 1.29);
1529
INSERT INTO store_fruit_prices(store_id, fruit_id, price) VALUES (1, 2, 0.99);
30+
INSERT INTO store_fruit_prices(store_id, fruit_id, price) VALUES (1, 3, 0.59);
31+
INSERT INTO store_fruit_prices(store_id, fruit_id, price) VALUES (1, 4, 1.19);
32+
INSERT INTO store_fruit_prices(store_id, fruit_id, price) VALUES (1, 5, 3.99);
1633
INSERT INTO store_fruit_prices(store_id, fruit_id, price) VALUES (2, 1, 2.49);
17-
INSERT INTO store_fruit_prices(store_id, fruit_id, price) VALUES (2, 2, 1.19);
34+
INSERT INTO store_fruit_prices(store_id, fruit_id, price) VALUES (2, 2, 1.19);
35+
INSERT INTO store_fruit_prices(store_id, fruit_id, price) VALUES (2, 3, 0.89);
36+
INSERT INTO store_fruit_prices(store_id, fruit_id, price) VALUES (2, 4, 1.79);
37+
INSERT INTO store_fruit_prices(store_id, fruit_id, price) VALUES (2, 6, 2.99);
38+
INSERT INTO store_fruit_prices(store_id, fruit_id, price) VALUES (3, 1, 1.49);
39+
INSERT INTO store_fruit_prices(store_id, fruit_id, price) VALUES (3, 2, 1.29);
40+
INSERT INTO store_fruit_prices(store_id, fruit_id, price) VALUES (3, 5, 3.49);
41+
INSERT INTO store_fruit_prices(store_id, fruit_id, price) VALUES (3, 7, 2.79);
42+
INSERT INTO store_fruit_prices(store_id, fruit_id, price) VALUES (4, 1, 189.99);
43+
INSERT INTO store_fruit_prices(store_id, fruit_id, price) VALUES (4, 3, 99.99);
44+
INSERT INTO store_fruit_prices(store_id, fruit_id, price) VALUES (4, 4, 149.99);
45+
INSERT INTO store_fruit_prices(store_id, fruit_id, price) VALUES (4, 8, 599.99);
46+
INSERT INTO store_fruit_prices(store_id, fruit_id, price) VALUES (5, 1, 1.79);
47+
INSERT INTO store_fruit_prices(store_id, fruit_id, price) VALUES (5, 2, 1.49);
48+
INSERT INTO store_fruit_prices(store_id, fruit_id, price) VALUES (5, 5, 4.99);
49+
INSERT INTO store_fruit_prices(store_id, fruit_id, price) VALUES (5, 9, 6.99);
50+
INSERT INTO store_fruit_prices(store_id, fruit_id, price) VALUES (6, 1, 2.19);
51+
INSERT INTO store_fruit_prices(store_id, fruit_id, price) VALUES (6, 6, 3.99);
52+
INSERT INTO store_fruit_prices(store_id, fruit_id, price) VALUES (6, 8, 5.49);
53+
INSERT INTO store_fruit_prices(store_id, fruit_id, price) VALUES (6, 10, 1.99);
54+
INSERT INTO store_fruit_prices(store_id, fruit_id, price) VALUES (7, 2, 1.39);
55+
INSERT INTO store_fruit_prices(store_id, fruit_id, price) VALUES (7, 4, 1.89);
56+
INSERT INTO store_fruit_prices(store_id, fruit_id, price) VALUES (7, 7, 2.49);
57+
INSERT INTO store_fruit_prices(store_id, fruit_id, price) VALUES (7, 9, 4.99);
58+
INSERT INTO store_fruit_prices(store_id, fruit_id, price) VALUES (8, 1, 25.99);
59+
INSERT INTO store_fruit_prices(store_id, fruit_id, price) VALUES (8, 3, 12.99);
60+
INSERT INTO store_fruit_prices(store_id, fruit_id, price) VALUES (8, 6, 39.99);
61+
INSERT INTO store_fruit_prices(store_id, fruit_id, price) VALUES (8, 8, 49.99);

0 commit comments

Comments
 (0)