Checkpoint: Évolution v2 complète : nouveau profil Adhérent FEHAP, connexion locale par email/mot de passe (bcrypt), création manuelle d'utilisateurs par les gestionnaires, affectation d'établissements aux adhérents, page de choix de connexion (/login), refonte de la page Admin avec CRUD complet. 33 tests Vitest passés, zéro erreur TypeScript.
This commit is contained in:
20
drizzle/0002_fast_luckman.sql
Normal file
20
drizzle/0002_fast_luckman.sql
Normal file
@@ -0,0 +1,20 @@
|
||||
CREATE TABLE `local_credentials` (
|
||||
`id` int AUTO_INCREMENT NOT NULL,
|
||||
`userId` int NOT NULL,
|
||||
`passwordHash` varchar(255) NOT NULL,
|
||||
`createdAt` timestamp NOT NULL DEFAULT (now()),
|
||||
`updatedAt` timestamp NOT NULL DEFAULT (now()) ON UPDATE CURRENT_TIMESTAMP,
|
||||
CONSTRAINT `local_credentials_id` PRIMARY KEY(`id`),
|
||||
CONSTRAINT `local_credentials_userId_unique` UNIQUE(`userId`)
|
||||
);
|
||||
--> statement-breakpoint
|
||||
CREATE TABLE `user_etablissements` (
|
||||
`id` int AUTO_INCREMENT NOT NULL,
|
||||
`userId` int NOT NULL,
|
||||
`etablissementId` int NOT NULL,
|
||||
`createdAt` timestamp NOT NULL DEFAULT (now()),
|
||||
CONSTRAINT `user_etablissements_id` PRIMARY KEY(`id`)
|
||||
);
|
||||
--> statement-breakpoint
|
||||
ALTER TABLE `users` MODIFY COLUMN `openId` varchar(64);--> statement-breakpoint
|
||||
ALTER TABLE `users` MODIFY COLUMN `sonumRole` enum('referent','gestionnaire','adherent') NOT NULL DEFAULT 'referent';
|
||||
Reference in New Issue
Block a user