This repository has been archived by the owner on Oct 21, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
62 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: postgres | ||
annotations: | ||
kardinal.dev.service/shared: "true" | ||
kardinal.dev.service/plugins: | | ||
- name: github.com/kurtosis-tech/postgres-seed-plugin | ||
args: | ||
seed_script: | | ||
-- create the table | ||
CREATE TABLE IF NOT EXISTS public.items( | ||
id bigserial PRIMARY KEY, | ||
created_at TIMESTAMP WITH TIME ZONE, | ||
updated_at TIMESTAMP WITH TIME ZONE, | ||
deleted_at TIMESTAMP WITH TIME ZONE, | ||
user_id TEXT, | ||
product_id TEXT, | ||
quantity INTEGER | ||
); | ||
INSERT INTO public.items (id, created_at, updated_at, deleted_at, user_id, product_id, quantity) | ||
VALUES (1, '2024-08-02 13:02:07.656104 +00:00', '2024-08-02 13:02:07.656104 +00:00', null, '0494c5e0-dde0-48fa-a6d8-f7962f5476bf', '66VCHSJNUP', 1); | ||
INSERT INTO public.items (id, created_at, updated_at, deleted_at, user_id, product_id, quantity) | ||
VALUES (2, '2024-08-02 13:02:10.891407 +00:00', '2024-08-02 13:02:10.891407 +00:00', null, '0494c5e0-dde0-48fa-a6d8-f7962f5476bf', '2ZYFJ3GM2N', 1); | ||
INSERT INTO public.items (id, created_at, updated_at, deleted_at, user_id, product_id, quantity) | ||
VALUES (3, '2024-08-02 13:03:10.891407 +00:00', '2024-08-02 13:02:10.891407 +00:00', null, '0494c5e0-dde0-48fa-a6d8-f7962f5476bf', '2ZYFJ3GM2N', ${last_insert_quantity:-1}); | ||
-- Set the sequence to the correct value after inserting records | ||
SELECT setval('public.items_id_seq', (SELECT MAX(id) FROM public.items)); | ||
db_name: "cart" | ||
db_user: "postgresuser" | ||
db_password: "postgrespass" |
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 @@ | ||
last_insert_quantity: 3 |