QR Codes
This commit is contained in:
@@ -0,0 +1 @@
|
||||
DROP TABLE qr_codes;
|
||||
@@ -0,0 +1,8 @@
|
||||
CREATE TABLE qr_codes (
|
||||
id INT GENERATED ALWAYS AS IDENTITY PRIMARY KEY,
|
||||
user_id SMALLINT NOT NULL REFERENCES users(id) ON DELETE CASCADE,
|
||||
token_hash VARCHAR(255) NOT NULL UNIQUE,
|
||||
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
|
||||
);
|
||||
|
||||
CREATE INDEX idx_qr_token_hash ON qr_codes(token_hash);
|
||||
Reference in New Issue
Block a user