Implemented a resouce landing page for members and Implemented basic user details (full name) and password reset via that is sent via SMTP or if SMTP is disabled will be shown to the admin to copy.

This commit is contained in:
Adrian Astles 2025-06-27 18:55:04 +08:00
parent 2ead5f4506
commit fd933e3dec
32 changed files with 1930 additions and 68 deletions

View file

@ -0,0 +1,21 @@
import { db } from "@server/db/pg";
const version = "1.7.0";
export default async function migration() {
console.log(`Running PostgreSQL setup script ${version}...`);
try {
// Add passwordResetTokenExpiryHours column to orgs table with default value of 1
await db.execute(`
ALTER TABLE orgs ADD COLUMN passwordResetTokenExpiryHours INTEGER NOT NULL DEFAULT 1;
`);
console.log(`Added passwordResetTokenExpiryHours column to orgs table`);
} catch (e) {
console.log("Error adding passwordResetTokenExpiryHours column to orgs table:");
console.log(e);
throw e;
}
console.log(`${version} PostgreSQL migration complete`);
}