mirror of
https://github.com/R0m1k3/LogiFlow.git
synced 2026-10-21 05:58:23 +02:00
Add a dedicated script for creating missing announcement tables
Introduce a new script `fix-announcements-only.sh` to specifically create the `announcements` table if it does not exist, streamlining the migration process for this critical component. Replit-Commit-Author: Agent Replit-Commit-Session-Id: e437ffed-c31b-44eb-9fd5-b6f9faa8e7ce Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/e437ffed-c31b-44eb-9fd5-b6f9faa8e7ce/biGr9ER
This commit is contained in:
1 parent
74e7eb8118
commit
0dc7ef49c0
4 files changed
+70
-146
No files matched your search
@@ -60,9 +60,16 @@ exit
|
||||
Après ces étapes, le système d'annonces fonctionnera immédiatement sur votre production.
|
||||
|
||||
## Alternative plus simple (une seule commande)
|
||||
Si vous préférez, vous pouvez exécuter directement depuis votre serveur :
|
||||
```bash
|
||||
docker exec logiflow-logiflow-1 psql $DATABASE_URL -c "CREATE TABLE IF NOT EXISTS announcements (id SERIAL PRIMARY KEY, title VARCHAR(255) NOT NULL, content TEXT NOT NULL, priority VARCHAR(20) NOT NULL DEFAULT 'normal', author_id VARCHAR(255) NOT NULL, group_id INTEGER, created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW(), updated_at TIMESTAMP WITH TIME ZONE DEFAULT NOW(), CONSTRAINT announcements_priority_check CHECK (priority IN ('normal', 'important', 'urgent')), CONSTRAINT announcements_author_id_fkey FOREIGN KEY (author_id) REFERENCES users(id) ON DELETE CASCADE, CONSTRAINT announcements_group_id_fkey FOREIGN KEY (group_id) REFERENCES groups(id) ON DELETE CASCADE);"
|
||||
```
|
||||
|
||||
## Script minimal (nouvelle option)
|
||||
```bash
|
||||
# Copier et exécuter le script minimal
|
||||
docker cp scripts/fix-announcements-only.sh logiflow-logiflow-1:/app/scripts/
|
||||
docker exec logiflow-logiflow-1 chmod +x /app/scripts/fix-announcements-only.sh
|
||||
docker exec logiflow-logiflow-1 /app/scripts/fix-announcements-only.sh
|
||||
```
|
||||
|
||||
La correction du problème `Select.Item` value est déjà faite dans le code source.
|
||||
Reference in new issue
Block a user