citusdata / citusdata/django-multitenant

The explicit NULL column constraint is not working in Citus 12

Open
#195 0 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.