Adjusted PostgreSQL datatypes (changed int to bigint).
Especially important is changing 'notification_id' in
tracking table to bigint so that it matches bigserial
of 'notification_id' in events table. Without this it
would have been possible for notifications to have IDs
larger than the tracking records can record.
@@ -237,7 +237,7 @@ class PostgresAggregateRecorder(AggregateRecorder):
"CREATE TABLE IF NOT EXISTS "
f"{self.events_table_name} ("
"originator_id uuid NOT NULL, "
- "originator_version integer NOT NULL, "
+ "originator_version bigint NOT NULL, "
"topic text, "
"state bytea, "
"PRIMARY KEY "
@@ -423,10 +423,10 @@ class PostgresApplicationRecorder(
"CREATE TABLE IF NOT EXISTS "
f"{self.events_table_name} ("
"originator_id uuid NOT NULL, "
- "originator_version integer NOT NULL, "
+ "originator_version bigint NOT NULL, "
"topic text, "
"state bytea, "
- "notification_id BIGSERIAL, "
+ "notification_id bigserial, "
"PRIMARY KEY "
"(originator_id, originator_version)) "
"WITH (autovacuum_enabled=false)",
@@ -511,7 +511,7 @@ class PostgresProcessRecorder(
"CREATE TABLE IF NOT EXISTS "
f"{self.tracking_table_name} ("
"application_name text, "
- "notification_id int, "
+ "notification_id bigint, "
"PRIMARY KEY "
"(application_name, notification_id))"
)
