mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-05-06 19:19:19 +02:00
feat: extract MediaController, wire into Dispatcher, delete media.php
This commit is contained in:
22
app/storage/migrations/012_smtp_settings.sql
Normal file
22
app/storage/migrations/012_smtp_settings.sql
Normal file
@@ -0,0 +1,22 @@
|
||||
-- SMTP relay credentials stored in the database.
|
||||
-- A single active row is read at send-time for flexibility (change provider,
|
||||
-- rotate passwords, etc. without touching code or env vars).
|
||||
|
||||
CREATE TABLE IF NOT EXISTS smtp_settings (
|
||||
id INTEGER PRIMARY KEY CHECK (id = 1), -- singleton row
|
||||
host TEXT NOT NULL DEFAULT '',
|
||||
port INTEGER NOT NULL DEFAULT 587,
|
||||
encryption TEXT NOT NULL DEFAULT 'tls', -- 'tls' | 'ssl' | 'none'
|
||||
username TEXT NOT NULL DEFAULT '',
|
||||
password TEXT NOT NULL DEFAULT '', -- stored in clear for now; encrypt later
|
||||
from_email TEXT NOT NULL DEFAULT '',
|
||||
from_name TEXT NOT NULL DEFAULT 'Post-ERG',
|
||||
updated_at DATETIME DEFAULT CURRENT_TIMESTAMP
|
||||
);
|
||||
|
||||
-- Insert default empty row so the settings form can start working immediately.
|
||||
INSERT OR IGNORE INTO smtp_settings (id) VALUES (1);
|
||||
|
||||
-- Helper view so callers always read the same row.
|
||||
CREATE VIEW IF NOT EXISTS v_smtp_active AS
|
||||
SELECT * FROM smtp_settings WHERE id = 1;
|
||||
Reference in New Issue
Block a user