ragflow/api/db
Zanyatta 0e3e129a83
Fix: Resolve inconsistency in APIToken dialog_id field definition (#5749)
The `dialog_id` field was inconsistently defined:
- In the `migrate_db()` function, it was set to `null=True`.
- In the model class, it was defined as `null=False`.

This inconsistency caused an issue during the initial deployment where
the database table did not allow `dialog_id` to be null. As a result,
calling `APITokenService.save(**obj)` in `system_app.py` raised the
following error:

```
peewee.IntegrityError: null value in column "dialog_id" violates not-null constraint
```

### What problem does this PR solve?

Error: peewee.IntegrityError: null value in column "dialog_id" violates
not-null constraint

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
2025-03-07 13:26:08 +08:00
..
services Fix: too long context during KG issue. (#5723) 2025-03-06 19:21:07 +08:00
__init__.py Tagging (#4426) 2025-01-09 17:07:21 +08:00
db_models.py Fix: Resolve inconsistency in APIToken dialog_id field definition (#5749) 2025-03-07 13:26:08 +08:00
db_utils.py Introduced beartype (#3460) 2024-11-18 17:38:17 +08:00
init_data.py Light GraphRAG (#4585) 2025-01-22 19:43:14 +08:00
reload_config_base.py Format file format from Windows/dos to Unix (#1949) 2024-08-15 09:17:36 +08:00
runtime_config.py Update version display on web UI (#3405) 2024-11-14 17:51:21 +08:00