Compare commits
2 Commits
7aa2ddefdf
...
62388bd92d
| Author | SHA1 | Date | |
|---|---|---|---|
| 62388bd92d | |||
| 89625e16f4 |
|
|
@ -42,6 +42,7 @@ CREATE TABLE users (
|
||||||
city VARCHAR(100),
|
city VARCHAR(100),
|
||||||
postal_code VARCHAR(10),
|
postal_code VARCHAR(10),
|
||||||
role user_role DEFAULT 'CLIENT',
|
role user_role DEFAULT 'CLIENT',
|
||||||
|
is_active BOOLEAN DEFAULT TRUE,
|
||||||
is_verified BOOLEAN DEFAULT FALSE,
|
is_verified BOOLEAN DEFAULT FALSE,
|
||||||
verification_token VARCHAR(255),
|
verification_token VARCHAR(255),
|
||||||
reset_token VARCHAR(255),
|
reset_token VARCHAR(255),
|
||||||
|
|
|
||||||
|
|
@ -217,6 +217,12 @@ async function applyMigrations() {
|
||||||
console.log('🔄 Application des migrations...');
|
console.log('🔄 Application des migrations...');
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
// Add is_active column to users if not exists
|
||||||
|
await pool.query(`
|
||||||
|
ALTER TABLE users ADD COLUMN IF NOT EXISTS is_active BOOLEAN DEFAULT TRUE
|
||||||
|
`);
|
||||||
|
console.log(' ✅ Colonne is_active ajoutée à users');
|
||||||
|
|
||||||
// Newsletter table
|
// Newsletter table
|
||||||
await pool.query(`
|
await pool.query(`
|
||||||
CREATE TABLE IF NOT EXISTS newsletters (
|
CREATE TABLE IF NOT EXISTS newsletters (
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user