Skip to content

Commit

Permalink
[MODINVOSTO-187] Create outbox log and internal lock tables
Browse files Browse the repository at this point in the history
  • Loading branch information
Saba-Zedginidze-EPAM committed Nov 4, 2024
1 parent 1765582 commit e142bc7
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/main/resources/templates/db_scripts/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,16 @@
"run": "after",
"snippetPath": "invoices_table.sql",
"fromModuleVersion": "mod-invoice-storage-5.9.0"
},
{
"run": "after",
"snippetPath": "tables/create_audit_outbox_table.sql",
"fromModuleVersion": "mod-invoice-storage-5.9.0"
},
{
"run": "after",
"snippetPath": "tables/create_internal_lock_table.sql",
"fromModuleVersion": "mod-invoice-storage-5.9.0"
}
],
"tables": [
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
CREATE TABLE IF NOT EXISTS outbox_event_log (
event_id uuid NOT NULL PRIMARY KEY,
entity_type text NOT NULL,
action text NOT NULL,
payload jsonb
);
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
CREATE TABLE IF NOT EXISTS internal_lock (
lock_name text NOT NULL PRIMARY KEY
);

INSERT INTO internal_lock(lock_name) VALUES ('audit_outbox') ON CONFLICT DO NOTHING;

0 comments on commit e142bc7

Please sign in to comment.