Skip to content

Commit

Permalink
fix: product pkey conflict caused by import.sql
Browse files Browse the repository at this point in the history
  • Loading branch information
Antoine Bastos committed Oct 10, 2024
1 parent 00c0211 commit 5589713
Show file tree
Hide file tree
Showing 9 changed files with 72 additions and 63 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
INSERT into Product (id, name, description, price) VALUES (1, 'Chair', 'A metal frame chair, with oak seat', 59.95);
INSERT into Product (id, name, description, price) VALUES (2, 'Dinner Table', 'Sturdy oak Table', 200);
INSERT into Product (id, name, description, price) VALUES (3, 'Coffee Table', 'An oak coffee Table', 120);
INSERT into Product (id, name, description, price) VALUES (4, 'Side Table', 'A Nice little oak side table', 80);
INSERT into Product (id, name, description, price) VALUES (5, 'Mirror', 'A round mirror with oak frame', 80);
INSERT into Product (id, name, description, price) VALUES (6, 'Lamp', 'A light that shines', 45);
INSERT into Product (id, name, description, price) VALUES (7, 'Carpet', 'Soft carpet', 39.95);
ALTER SEQUENCE Product_SEQ INCREMENT BY 1;
INSERT into Product (id, name, description, price) VALUES (nextval('Product_SEQ'), 'Chair', 'A metal frame chair, with oak seat', 59.95);
INSERT into Product (id, name, description, price) VALUES (nextval('Product_SEQ'), 'Dinner Table', 'Sturdy oak Table', 200);
INSERT into Product (id, name, description, price) VALUES (nextval('Product_SEQ'), 'Coffee Table', 'An oak coffee Table', 120);
INSERT into Product (id, name, description, price) VALUES (nextval('Product_SEQ'), 'Side Table', 'A Nice little oak side table', 80);
INSERT into Product (id, name, description, price) VALUES (nextval('Product_SEQ'), 'Mirror', 'A round mirror with oak frame', 80);
INSERT into Product (id, name, description, price) VALUES (nextval('Product_SEQ'), 'Lamp', 'A light that shines', 45);
INSERT into Product (id, name, description, price) VALUES (nextval('Product_SEQ'), 'Carpet', 'Soft carpet', 39.95);
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
INSERT into Product (id, name, description, price) VALUES (1, 'Chair', 'A metal frame chair, with oak seat', 59.95);
INSERT into Product (id, name, description, price) VALUES (2, 'Dinner Table', 'Sturdy oak Table', 200);
INSERT into Product (id, name, description, price) VALUES (3, 'Coffee Table', 'An oak coffee Table', 120);
INSERT into Product (id, name, description, price) VALUES (4, 'Side Table', 'A Nice little oak side table', 80);
INSERT into Product (id, name, description, price) VALUES (5, 'Mirror', 'A round mirror with oak frame', 80);
INSERT into Product (id, name, description, price) VALUES (6, 'Lamp', 'A light that shines', 45);
INSERT into Product (id, name, description, price) VALUES (7, 'Carpet', 'Soft carpet', 39.95);
ALTER SEQUENCE Product_SEQ INCREMENT BY 1;
INSERT into Product (id, name, description, price) VALUES (nextval('Product_SEQ'), 'Chair', 'A metal frame chair, with oak seat', 59.95);
INSERT into Product (id, name, description, price) VALUES (nextval('Product_SEQ'), 'Dinner Table', 'Sturdy oak Table', 200);
INSERT into Product (id, name, description, price) VALUES (nextval('Product_SEQ'), 'Coffee Table', 'An oak coffee Table', 120);
INSERT into Product (id, name, description, price) VALUES (nextval('Product_SEQ'), 'Side Table', 'A Nice little oak side table', 80);
INSERT into Product (id, name, description, price) VALUES (nextval('Product_SEQ'), 'Mirror', 'A round mirror with oak frame', 80);
INSERT into Product (id, name, description, price) VALUES (nextval('Product_SEQ'), 'Lamp', 'A light that shines', 45);
INSERT into Product (id, name, description, price) VALUES (nextval('Product_SEQ'), 'Carpet', 'Soft carpet', 39.95);
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
INSERT into Product (id, name, description, price) VALUES (1, 'Chair', 'A metal frame chair, with oak seat', 59.95);
INSERT into Product (id, name, description, price) VALUES (2, 'Dinner Table', 'Sturdy oak Table', 200);
INSERT into Product (id, name, description, price) VALUES (3, 'Coffee Table', 'An oak coffee Table', 120);
INSERT into Product (id, name, description, price) VALUES (4, 'Side Table', 'A Nice little oak side table', 80);
INSERT into Product (id, name, description, price) VALUES (5, 'Mirror', 'A round mirror with oak frame', 80);
INSERT into Product (id, name, description, price) VALUES (6, 'Lamp', 'A light that shines', 45);
INSERT into Product (id, name, description, price) VALUES (7, 'Carpet', 'Soft carpet', 39.95);
ALTER SEQUENCE Product_SEQ INCREMENT BY 1;
INSERT into Product (id, name, description, price) VALUES (nextval('Product_SEQ'), 'Chair', 'A metal frame chair, with oak seat', 59.95);
INSERT into Product (id, name, description, price) VALUES (nextval('Product_SEQ'), 'Dinner Table', 'Sturdy oak Table', 200);
INSERT into Product (id, name, description, price) VALUES (nextval('Product_SEQ'), 'Coffee Table', 'An oak coffee Table', 120);
INSERT into Product (id, name, description, price) VALUES (nextval('Product_SEQ'), 'Side Table', 'A Nice little oak side table', 80);
INSERT into Product (id, name, description, price) VALUES (nextval('Product_SEQ'), 'Mirror', 'A round mirror with oak frame', 80);
INSERT into Product (id, name, description, price) VALUES (nextval('Product_SEQ'), 'Lamp', 'A light that shines', 45);
INSERT into Product (id, name, description, price) VALUES (nextval('Product_SEQ'), 'Carpet', 'Soft carpet', 39.95);
15 changes: 8 additions & 7 deletions code/exercise_011_Going_Reactive/src/main/resources/import.sql
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
INSERT into Product (id, name, description, price) VALUES (1, 'Chair', 'A metal frame chair, with oak seat', 59.95);
INSERT into Product (id, name, description, price) VALUES (2, 'Dinner Table', 'Sturdy oak Table', 200);
INSERT into Product (id, name, description, price) VALUES (3, 'Coffee Table', 'An oak coffee Table', 120);
INSERT into Product (id, name, description, price) VALUES (4, 'Side Table', 'A Nice little oak side table', 80);
INSERT into Product (id, name, description, price) VALUES (5, 'Mirror', 'A round mirror with oak frame', 80);
INSERT into Product (id, name, description, price) VALUES (6, 'Lamp', 'A light that shines', 45);
INSERT into Product (id, name, description, price) VALUES (7, 'Carpet', 'Soft carpet', 39.95);
ALTER SEQUENCE Product_SEQ INCREMENT BY 1;
INSERT into Product (id, name, description, price) VALUES (nextval('Product_SEQ'), 'Chair', 'A metal frame chair, with oak seat', 59.95);
INSERT into Product (id, name, description, price) VALUES (nextval('Product_SEQ'), 'Dinner Table', 'Sturdy oak Table', 200);
INSERT into Product (id, name, description, price) VALUES (nextval('Product_SEQ'), 'Coffee Table', 'An oak coffee Table', 120);
INSERT into Product (id, name, description, price) VALUES (nextval('Product_SEQ'), 'Side Table', 'A Nice little oak side table', 80);
INSERT into Product (id, name, description, price) VALUES (nextval('Product_SEQ'), 'Mirror', 'A round mirror with oak frame', 80);
INSERT into Product (id, name, description, price) VALUES (nextval('Product_SEQ'), 'Lamp', 'A light that shines', 45);
INSERT into Product (id, name, description, price) VALUES (nextval('Product_SEQ'), 'Carpet', 'Soft carpet', 39.95);
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
INSERT into Product (id, name, description, price) VALUES (1, 'Chair', 'A metal frame chair, with oak seat', 59.95);
INSERT into Product (id, name, description, price) VALUES (2, 'Dinner Table', 'Sturdy oak Table', 200);
INSERT into Product (id, name, description, price) VALUES (3, 'Coffee Table', 'An oak coffee Table', 120);
INSERT into Product (id, name, description, price) VALUES (4, 'Side Table', 'A Nice little oak side table', 80);
INSERT into Product (id, name, description, price) VALUES (5, 'Mirror', 'A round mirror with oak frame', 80);
INSERT into Product (id, name, description, price) VALUES (6, 'Lamp', 'A light that shines', 45);
INSERT into Product (id, name, description, price) VALUES (7, 'Carpet', 'Soft carpet', 39.95);
ALTER SEQUENCE Product_SEQ INCREMENT BY 1;
INSERT into Product (id, name, description, price) VALUES (nextval('Product_SEQ'), 'Chair', 'A metal frame chair, with oak seat', 59.95);
INSERT into Product (id, name, description, price) VALUES (nextval('Product_SEQ'), 'Dinner Table', 'Sturdy oak Table', 200);
INSERT into Product (id, name, description, price) VALUES (nextval('Product_SEQ'), 'Coffee Table', 'An oak coffee Table', 120);
INSERT into Product (id, name, description, price) VALUES (nextval('Product_SEQ'), 'Side Table', 'A Nice little oak side table', 80);
INSERT into Product (id, name, description, price) VALUES (nextval('Product_SEQ'), 'Mirror', 'A round mirror with oak frame', 80);
INSERT into Product (id, name, description, price) VALUES (nextval('Product_SEQ'), 'Lamp', 'A light that shines', 45);
INSERT into Product (id, name, description, price) VALUES (nextval('Product_SEQ'), 'Carpet', 'Soft carpet', 39.95);
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
INSERT into Product (id, name, description, price) VALUES (1, 'Chair', 'A metal frame chair, with oak seat', 59.95);
INSERT into Product (id, name, description, price) VALUES (2, 'Dinner Table', 'Sturdy oak Table', 200);
INSERT into Product (id, name, description, price) VALUES (3, 'Coffee Table', 'An oak coffee Table', 120);
INSERT into Product (id, name, description, price) VALUES (4, 'Side Table', 'A Nice little oak side table', 80);
INSERT into Product (id, name, description, price) VALUES (5, 'Mirror', 'A round mirror with oak frame', 80);
INSERT into Product (id, name, description, price) VALUES (6, 'Lamp', 'A light that shines', 45);
INSERT into Product (id, name, description, price) VALUES (7, 'Carpet', 'Soft carpet', 39.95);
ALTER SEQUENCE Product_SEQ INCREMENT BY 1;
INSERT into Product (id, name, description, price) VALUES (nextval('Product_SEQ'), 'Chair', 'A metal frame chair, with oak seat', 59.95);
INSERT into Product (id, name, description, price) VALUES (nextval('Product_SEQ'), 'Dinner Table', 'Sturdy oak Table', 200);
INSERT into Product (id, name, description, price) VALUES (nextval('Product_SEQ'), 'Coffee Table', 'An oak coffee Table', 120);
INSERT into Product (id, name, description, price) VALUES (nextval('Product_SEQ'), 'Side Table', 'A Nice little oak side table', 80);
INSERT into Product (id, name, description, price) VALUES (nextval('Product_SEQ'), 'Mirror', 'A round mirror with oak frame', 80);
INSERT into Product (id, name, description, price) VALUES (nextval('Product_SEQ'), 'Lamp', 'A light that shines', 45);
INSERT into Product (id, name, description, price) VALUES (nextval('Product_SEQ'), 'Carpet', 'Soft carpet', 39.95);
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
INSERT into Product (id, name, description, price) VALUES (1, 'Chair', 'A metal frame chair, with oak seat', 59.95);
INSERT into Product (id, name, description, price) VALUES (2, 'Dinner Table', 'Sturdy oak Table', 200);
INSERT into Product (id, name, description, price) VALUES (3, 'Coffee Table', 'An oak coffee Table', 120);
INSERT into Product (id, name, description, price) VALUES (4, 'Side Table', 'A Nice little oak side table', 80);
INSERT into Product (id, name, description, price) VALUES (5, 'Mirror', 'A round mirror with oak frame', 80);
INSERT into Product (id, name, description, price) VALUES (6, 'Lamp', 'A light that shines', 45);
INSERT into Product (id, name, description, price) VALUES (7, 'Carpet', 'Soft carpet', 39.95);
ALTER SEQUENCE Product_SEQ INCREMENT BY 1;
INSERT into Product (id, name, description, price) VALUES (nextval('Product_SEQ'), 'Chair', 'A metal frame chair, with oak seat', 59.95);
INSERT into Product (id, name, description, price) VALUES (nextval('Product_SEQ'), 'Dinner Table', 'Sturdy oak Table', 200);
INSERT into Product (id, name, description, price) VALUES (nextval('Product_SEQ'), 'Coffee Table', 'An oak coffee Table', 120);
INSERT into Product (id, name, description, price) VALUES (nextval('Product_SEQ'), 'Side Table', 'A Nice little oak side table', 80);
INSERT into Product (id, name, description, price) VALUES (nextval('Product_SEQ'), 'Mirror', 'A round mirror with oak frame', 80);
INSERT into Product (id, name, description, price) VALUES (nextval('Product_SEQ'), 'Lamp', 'A light that shines', 45);
INSERT into Product (id, name, description, price) VALUES (nextval('Product_SEQ'), 'Carpet', 'Soft carpet', 39.95);
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
INSERT into Product (id, name, description, price) VALUES (1, 'Chair', 'A metal frame chair, with oak seat', 59.95);
INSERT into Product (id, name, description, price) VALUES (2, 'Dinner Table', 'Sturdy oak Table', 200);
INSERT into Product (id, name, description, price) VALUES (3, 'Coffee Table', 'An oak coffee Table', 120);
INSERT into Product (id, name, description, price) VALUES (4, 'Side Table', 'A Nice little oak side table', 80);
INSERT into Product (id, name, description, price) VALUES (5, 'Mirror', 'A round mirror with oak frame', 80);
INSERT into Product (id, name, description, price) VALUES (6, 'Lamp', 'A light that shines', 45);
INSERT into Product (id, name, description, price) VALUES (7, 'Carpet', 'Soft carpet', 39.95);
ALTER SEQUENCE Product_SEQ INCREMENT BY 1;
INSERT into Product (id, name, description, price) VALUES (nextval('Product_SEQ'), 'Chair', 'A metal frame chair, with oak seat', 59.95);
INSERT into Product (id, name, description, price) VALUES (nextval('Product_SEQ'), 'Dinner Table', 'Sturdy oak Table', 200);
INSERT into Product (id, name, description, price) VALUES (nextval('Product_SEQ'), 'Coffee Table', 'An oak coffee Table', 120);
INSERT into Product (id, name, description, price) VALUES (nextval('Product_SEQ'), 'Side Table', 'A Nice little oak side table', 80);
INSERT into Product (id, name, description, price) VALUES (nextval('Product_SEQ'), 'Mirror', 'A round mirror with oak frame', 80);
INSERT into Product (id, name, description, price) VALUES (nextval('Product_SEQ'), 'Lamp', 'A light that shines', 45);
INSERT into Product (id, name, description, price) VALUES (nextval('Product_SEQ'), 'Carpet', 'Soft carpet', 39.95);
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
INSERT into Product (id, name, description, price) VALUES (1, 'Chair', 'A metal frame chair, with oak seat', 59.95);
INSERT into Product (id, name, description, price) VALUES (2, 'Dinner Table', 'Sturdy oak Table', 200);
INSERT into Product (id, name, description, price) VALUES (3, 'Coffee Table', 'An oak coffee Table', 120);
INSERT into Product (id, name, description, price) VALUES (4, 'Side Table', 'A Nice little oak side table', 80);
INSERT into Product (id, name, description, price) VALUES (5, 'Mirror', 'A round mirror with oak frame', 80);
INSERT into Product (id, name, description, price) VALUES (6, 'Lamp', 'A light that shines', 45);
INSERT into Product (id, name, description, price) VALUES (7, 'Carpet', 'Soft carpet', 39.95);
ALTER SEQUENCE Product_SEQ INCREMENT BY 1;
INSERT into Product (id, name, description, price) VALUES (nextval('Product_SEQ'), 'Chair', 'A metal frame chair, with oak seat', 59.95);
INSERT into Product (id, name, description, price) VALUES (nextval('Product_SEQ'), 'Dinner Table', 'Sturdy oak Table', 200);
INSERT into Product (id, name, description, price) VALUES (nextval('Product_SEQ'), 'Coffee Table', 'An oak coffee Table', 120);
INSERT into Product (id, name, description, price) VALUES (nextval('Product_SEQ'), 'Side Table', 'A Nice little oak side table', 80);
INSERT into Product (id, name, description, price) VALUES (nextval('Product_SEQ'), 'Mirror', 'A round mirror with oak frame', 80);
INSERT into Product (id, name, description, price) VALUES (nextval('Product_SEQ'), 'Lamp', 'A light that shines', 45);
INSERT into Product (id, name, description, price) VALUES (nextval('Product_SEQ'), 'Carpet', 'Soft carpet', 39.95);

0 comments on commit 5589713

Please sign in to comment.