On 9/11/23 5:00 PM, bryan.kartzman@yu.edu wrote:
Thanks. That worked. I converted the sqlite3 database to a postgresql database and I configured the database in the DATABASES definition of the Django settings. The database lock errors have disappeared but I am getting a Django warning of an improper datetime field. I assume that is related to the database conversion. Any advice for a possible solution? These are the error messages: ... /usr/lib/python3/dist-packages/django/db/models/fields/__init__.py:1424: RuntimeWarning: DateTimeField MailingList.created_at received a naive datetime (2023-06-18 18:51:09.290256) while time zone support is active. warnings.warn("DateTimeField %s received a naive datetime (%s)" ... /usr/lib/python3/dist-packages/django/db/models/fields/__init__.py:1424: RuntimeWarning: DateTimeField OrmQ.lock received a naive datetime (2023-09-11 20:29:35.702222) while time zone support is active. warnings.warn("DateTimeField %s received a naive datetime (%s)" ...
These fields and perhaps others need to be defined in Postgresql as timestamp with time zone. E.g.
Table
"public.hyperkitty_mailinglist"
Column | Type | Collation |
Nullable | Default
------------------------+--------------------------+-----------+----------+----------------------------------------------------
id | integer | | not
null | nextval('hyperkitty_mailinglist_id_seq'::regclass)
name | character varying(254) | | not
null |
display_name | character varying(255) | | not
null |
description | text | |
|
subject_prefix | character varying(255) | | not
null |
archive_policy | integer | | not
null |
created_at | timestamp with time zone | | not
null |
list_id | character varying(254) | |
|
archive_rendering_mode | character varying(255) | |
|
...
Table "public.django_q_ormq"
Column | Type | Collation | Nullable |
Default
---------+--------------------------+-----------+----------+-------------------------------------------
id | integer | | not null |
nextval('django_q_ormq_id_seq'::regclass)
key | character varying(100) | | not null |
payload | text | | not null |
lock | timestamp with time zone | | |
Indexes:
"django_q_ormq_pkey" PRIMARY KEY, btree (id)
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan