diff --git a/pgweb/account/migrations/0004_cauth_last_login.py b/pgweb/account/migrations/0004_cauth_last_login.py index 8dba3b9e..bb77c8c1 100644 --- a/pgweb/account/migrations/0004_cauth_last_login.py +++ b/pgweb/account/migrations/0004_cauth_last_login.py @@ -13,7 +13,7 @@ class Migration(migrations.Migration): operations = [ migrations.RunSQL("""CREATE TABLE account_communityauthlastlogin ( - user_id int NOT NULL REFERENCES auth_user(id) DEFERRABLE INITIALLY DEFERRED, + user_id int NOT NULL REFERENCES auth_user(id) DEFERRABLE INITIALLY DEFERRED ON DELETE CASCADE, site_id int NOT NULL REFERENCES account_communityauthsite (id) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED, lastlogin timestamptz NOT NULL, logincount bigint NOT NULL,