Bring the application, own tests, Dockerfile, toolchain, compose stack,
HAProxy, k6 and RustFS configuration, migrations, hooks, evidence and
scenario scripts and the CI job from the lab 4 solution commit d2744bc,
merge the lab 4 Makefile targets into the lab 5 skeleton Makefile
without touching its targets, and append the lab 4 solution variables
to the skeleton .env.example. The package and the application follow
the contract version 1.5.0, and the image and the throwaway test
containers are tagged lab5 so they do not collide with a lab 4 stand on
the same host.
This is the starting point of the lab 5 cycle: lint, own tests and the
offline skeleton check pass before any lab 5 change.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
11 lines
453 B
SQL
11 lines
453 B
SQL
CREATE TABLE idempotency_keys (
|
|
chat_id uuid NOT NULL,
|
|
user_id uuid NOT NULL,
|
|
key text NOT NULL CHECK (key ~ '^[A-Za-z0-9._:-]{1,128}$'),
|
|
fingerprint bytea NOT NULL CHECK (octet_length(fingerprint) = 32),
|
|
message_id uuid NOT NULL REFERENCES messages (id) ON DELETE CASCADE,
|
|
created_at timestamptz NOT NULL,
|
|
PRIMARY KEY (chat_id, user_id, key),
|
|
FOREIGN KEY (chat_id, user_id) REFERENCES chat_members (chat_id, user_id)
|
|
);
|