Files
EpicNext-Cms/drizzle/migrations/0007_login_logs.sql
T
SimoandCursor ba82789166
CI / check (push) Failing after 9s
CI / release (push) Skipped
CI / deploy (push) Skipped
chore(db): finish Prisma cutover to Drizzle Kit tooling
Move CMS SQL to drizzle/migrations, drop prisma packages/schema, wire drizzle-kit scripts, and regenerate schema names from src/db/schema.ts.

Co-authored-by: Cursor <[email protected]>
2026-08-01 15:02:21 +02:00

12 lines
510 B
SQL

-- Successful-login history (the AtomCMS "session logs" equivalent; our auth is
-- stateless JWT so there's no sessions table). Idempotent (MariaDB).
CREATE TABLE IF NOT EXISTS website_login_logs (
id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
user_id INT NOT NULL,
ip VARCHAR(45) NOT NULL,
user_agent VARCHAR(512) NULL,
created_at TIMESTAMP NULL,
PRIMARY KEY (id),
KEY website_login_logs_user_id_idx (user_id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;