wildfish / django-gdpr-assist

Tools to help manage user data in the age of GDPR
Other
174 stars 15 forks source link

Migrations failing to create EventLog table #73

Open mb-krotos opened 1 month ago

mb-krotos commented 1 month ago

I've followed the installation instructions, but after running all migrations I've found I'm missing the table for the EventLog model.

This is the output of python manage.py sqlmigrate gdpr_assist 0001:

BEGIN;
--
-- Create model PersonalData
--
-- (no-op)
--
-- Create model EventLog
--
-- (no-op)
COMMIT;

I understand this tool is listed as supporting up to Django 4.0, and I'm using 4.2.1: could this be why that table isn't being created correctly?

Update: the database backend I'm using is Postgres.

mabuge90 commented 1 month ago

@mb-krotos After running manage.py migrate --database=gdpr_log I checked the tables on sqlite3 and found the following table: gdpr_assist_eventlog the schema for this table appears to match the EventLog model:

.schema gdpr_assist_eventlog
CREATE TABLE IF NOT EXISTS "gdpr_assist_eventlog" ("id" integer NOT NULL PRIMARY KEY AUTOINCREMENT, "event" varchar(9) NOT NULL, "app_label" varchar(255) NOT NULL, "model_name" varchar(255) NOT NULL, "target_pk" text NOT NULL);