citusdata / citusdata/django-multitenant
The explicit NULL column constraint is not working in Citus 12
- Dominant language
- Python
- Stars
- 823
- Forks
- 126
- PR merge metrics
- No merged PRs in 30d
Description
```sql
ALTER TABLE a ADD COLUMN b INT NULL;
```
```
[2023-08-11 11:53:30] [XX000] ERROR: unsupported constraint type
[2023-08-11 11:53:30] Detail: constraint type: 0
```
Details: https://github.com/citusdata/citus/issues/7110
Please consider including a workaround
```python
# django_multitenant/backends/postgresql/base.py
class TenantDatabaseFeatures(PostgresqlDatabaseFeatures):
implied_column_null = True
```
in django-multitenant project.
Contributor guide
Research direction
Inspect django_multitenant/backends/postgresql/base.py, especially TenantDatabaseFeatures, and compare its current feature settings with the proposed implied_column_null workaround. Reproduce the explicit NULL column failure against Citus 12, then verify that the selected behavior avoids the unsupported constraint error and preserves expected Django/PostgreSQL behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- django, postgresql, python
- Domain
- backend, databases
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100