You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I work with @easherma-truth and am looking deeper into how to upgrade. I took the advice from issue #541 that he opened and I've gotten past the issue with the dependency.
I am now running into an issue with the id sequence that PostgreSQL created.
The table, as originally created by django-constance looks like this:
> \d constance_config;
+--------+------------------------+----------------------------------------------------------------+
| Column | Type | Modifiers |
|--------+------------------------+----------------------------------------------------------------|
| id | integer | not null default nextval('constance_config_id_seq'::regclass) |
| key | character varying(255) | not null |
| value | text | |
+--------+------------------------+----------------------------------------------------------------+
Indexes:
"constance_config_pkey"PRIMARY KEY, btree (id)
"constance_config_key_key" UNIQUE CONSTRAINT, btree (key)
"constance_config_key_baef3136_like" btree (key varchar_pattern_ops)
When I run constance.0002_migrate_from_old_table, I get:
I tried dropping the sequence manually but get basically the same error but in reverse:
cannot drop sequence constance_config_id_seq because other objects depend on it
DETAIL: default value for column id of table constance_config_orig depends on sequence constance_config_id_seq
default value for column id of table constance_config depends on sequence constance_config_id_seq
HINT: Use DROP ... CASCADE to drop the dependent objects too.
I've searched these issues for "sequence" and "postgres" but don't see any mention of this problem. The refactor ticket that made the schema change says that its testing involved postgres but I'm curious why I'm having this problem.
I work with @easherma-truth and am looking deeper into how to upgrade. I took the advice from issue #541 that he opened and I've gotten past the issue with the dependency.
I am now running into an issue with the id sequence that PostgreSQL created.
The table, as originally created by django-constance looks like this:
When I run
constance.0002_migrate_from_old_table
, I get:I tried dropping the sequence manually but get basically the same error but in reverse:
I've searched these issues for "sequence" and "postgres" but don't see any mention of this problem. The refactor ticket that made the schema change says that its testing involved postgres but I'm curious why I'm having this problem.
Django 4.2
django-constance 4.3.2
PostgreSQL 15.6
Python 3.12.7
The text was updated successfully, but these errors were encountered: