Ensure username is required for new users

Update database schema to make the username field mandatory for all users.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: a8a78c07-e900-425c-a577-5b4c5894379d
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/a8a78c07-e900-425c-a577-5b4c5894379d/vetH0Gp
This commit is contained in:
michaelschal committed 2025-08-11 18:15:26 +00:00
1 parent e7fb2c66f1
commit 98a3ae5009
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -31,7 +31,7 @@ CREATE INDEX IDX_session_expire ON sessions(expire);
-- Création de la table users -- Création de la table users
CREATE TABLE users ( CREATE TABLE users (
id VARCHAR PRIMARY KEY NOT NULL, id VARCHAR PRIMARY KEY NOT NULL,
username VARCHAR UNIQUE, username VARCHAR UNIQUE NOT NULL,
email VARCHAR UNIQUE, email VARCHAR UNIQUE,
name VARCHAR, name VARCHAR,
first_name VARCHAR, first_name VARCHAR,
+1 -1
View File
@@ -30,7 +30,7 @@ export const sessions = pgTable(
// User storage table - supports both Replit Auth and local auth // User storage table - supports both Replit Auth and local auth
export const users = pgTable("users", { export const users = pgTable("users", {
id: varchar("id").primaryKey().notNull(), id: varchar("id").primaryKey().notNull(),
username: varchar("username").unique(), // For simple login username: varchar("username").unique().notNull(), // For simple login
email: varchar("email").unique(), email: varchar("email").unique(),
name: varchar("name"), // Single name field for compatibility name: varchar("name"), // Single name field for compatibility
firstName: varchar("first_name"), firstName: varchar("first_name"),