diff options
| author | James Elliott <james-d-elliott@users.noreply.github.com> | 2023-11-30 19:45:24 +1100 |
|---|---|---|
| committer | James Elliott <james-d-elliott@users.noreply.github.com> | 2024-03-04 20:29:12 +1100 |
| commit | e4e878f05f8ae1e1784b3ac190459b2d506f796c (patch) | |
| tree | ed8f5b927156300dddff33f3e14bc732803ea405 /internal/storage/migrations/postgres | |
| parent | 61c30b373f8c5ee14321e82c8d7210aae7d260c3 (diff) | |
build(deps): use go.uber.org/mock
Use the new go.uber.org/mock which is currently maintained.
Signed-off-by: James Elliott <james-d-elliott@users.noreply.github.com>
Diffstat (limited to 'internal/storage/migrations/postgres')
3 files changed, 9 insertions, 1 deletions
diff --git a/internal/storage/migrations/postgres/V0013.OneTimeCode.up.sql b/internal/storage/migrations/postgres/V0013.OneTimeCode.up.sql index 434068170..77016c801 100644 --- a/internal/storage/migrations/postgres/V0013.OneTimeCode.up.sql +++ b/internal/storage/migrations/postgres/V0013.OneTimeCode.up.sql @@ -15,4 +15,3 @@ CREATE TABLE IF NOT EXISTS one_time_code ( ); CREATE UNIQUE INDEX one_time_code_lookup_key ON one_time_code (signature, username); -CREATE INDEX one_time_code_lookup ON one_time_code (signature, username); diff --git a/internal/storage/migrations/postgres/V0015.TOTPEnhance.down.sql b/internal/storage/migrations/postgres/V0015.TOTPEnhance.down.sql new file mode 100644 index 000000000..53d9ae5ab --- /dev/null +++ b/internal/storage/migrations/postgres/V0015.TOTPEnhance.down.sql @@ -0,0 +1 @@ +DROP TABLE IF EXISTS totp_history; diff --git a/internal/storage/migrations/postgres/V0015.TOTPEnhance.up.sql b/internal/storage/migrations/postgres/V0015.TOTPEnhance.up.sql new file mode 100644 index 000000000..22c6e23c1 --- /dev/null +++ b/internal/storage/migrations/postgres/V0015.TOTPEnhance.up.sql @@ -0,0 +1,8 @@ +CREATE TABLE IF NOT EXISTS totp_history ( + id SERIAL CONSTRAINT one_time_code_pkey PRIMARY KEY, + created_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT CURRENT_TIMESTAMP, + username VARCHAR(100) NOT NULL, + step CHAR(128) NOT NULL +); + +CREATE UNIQUE INDEX totp_history_lookup_key ON totp_history (username, step); |
