Add checkout snapshot
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
CREATE TABLE IF NOT EXISTS passwordResetToken (
|
||||
id BIGINT AUTO_INCREMENT PRIMARY KEY,
|
||||
userId BIGINT NOT NULL,
|
||||
tokenHash VARCHAR(64) NOT NULL,
|
||||
expiresAt DATETIME NOT NULL,
|
||||
usedAt DATETIME NULL,
|
||||
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
||||
CONSTRAINT uq_password_reset_token_hash UNIQUE (tokenHash),
|
||||
CONSTRAINT fk_password_reset_token_user FOREIGN KEY (userId) REFERENCES users(id) ON DELETE CASCADE
|
||||
);
|
||||
|
||||
CREATE INDEX idx_password_reset_token_user ON passwordResetToken(userId);
|
||||
CREATE INDEX idx_password_reset_token_expires ON passwordResetToken(expiresAt);
|
||||
|
||||
ALTER TABLE sale
|
||||
ADD COLUMN pointsUsed INT NOT NULL DEFAULT 0,
|
||||
ADD COLUMN loyaltyDiscountAmount DECIMAL(10, 2) NOT NULL DEFAULT 0.00;
|
||||
|
||||
ALTER TABLE cart
|
||||
ADD COLUMN pointsApplied BOOLEAN NOT NULL DEFAULT FALSE,
|
||||
ADD COLUMN pointsDiscountAmount DECIMAL(10, 2) NOT NULL DEFAULT 0.00,
|
||||
ADD COLUMN checkoutPending BOOLEAN NOT NULL DEFAULT FALSE,
|
||||
ADD COLUMN checkoutAmount DECIMAL(10, 2),
|
||||
ADD COLUMN checkoutStartedAt DATETIME,
|
||||
ADD COLUMN checkoutPaymentIntentId VARCHAR(255);
|
||||
Reference in New Issue
Block a user