Files
Server/data/ddl/04_credentials.sql
T
azures04 7a87a98c82 Add MariaDB integration and repositories
Introduce DB support and repos: add modules/database.js (connection pool + runDDL) and SQL DDL files (data/ddl/*) for servers, users, providers, identities and credentials. Add repository layers: users, servers, providers, identities, credentials. Update server.js to run DDL at startup. Update .env.example with DB settings and bump dependencies in package.json/package-lock.json (add mariadb, bump dotenv/helmet/path-to-regexp/zod and dev tool upgrades). Error handling and logging included for DDL and repo operations.
2026-08-30 11:03:12 +02:00

7 lines
305 B
SQL

CREATE TABLE IF NOT EXISTS `credentials` (
`userId` UUID PRIMARY KEY,
`passwordHash` TEXT NOT NULL,
`updatedAt` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
CONSTRAINT `fk_credentials_userId` FOREIGN KEY (`userId`) REFERENCES `users` (`id`) ON DELETE CASCADE
)