add newsletter
This commit is contained in:
@@ -95,6 +95,32 @@ CREATE TABLE IF NOT EXISTS subscription_request_logs (
|
||||
INDEX ix_subscription_request_logs_request_at (request_at)
|
||||
);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS guides (
|
||||
id INT AUTO_INCREMENT PRIMARY KEY,
|
||||
title VARCHAR(255) NOT NULL,
|
||||
short_description VARCHAR(512) NOT NULL DEFAULT '',
|
||||
body_text TEXT NOT NULL,
|
||||
is_active BOOLEAN NOT NULL DEFAULT TRUE,
|
||||
created_by_telegram_id BIGINT NULL,
|
||||
created_at DATETIME NOT NULL,
|
||||
updated_at DATETIME NOT NULL,
|
||||
INDEX ix_guides_is_active (is_active),
|
||||
INDEX ix_guides_created_by_telegram_id (created_by_telegram_id)
|
||||
);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS guide_photos (
|
||||
id INT AUTO_INCREMENT PRIMARY KEY,
|
||||
guide_id INT NOT NULL,
|
||||
file_id VARCHAR(512) NOT NULL,
|
||||
position INT NOT NULL DEFAULT 0,
|
||||
created_at DATETIME NOT NULL,
|
||||
CONSTRAINT fk_guide_photos_guide
|
||||
FOREIGN KEY (guide_id)
|
||||
REFERENCES guides (id)
|
||||
ON DELETE CASCADE,
|
||||
INDEX ix_guide_photos_guide_id (guide_id)
|
||||
);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS support_tickets (
|
||||
id INT AUTO_INCREMENT PRIMARY KEY,
|
||||
public_id VARCHAR(32) NOT NULL UNIQUE,
|
||||
|
||||
Reference in New Issue
Block a user