From fbfe3cfc156edf4b04e6ad344bf65a1e970daa28 Mon Sep 17 00:00:00 2001 From: Magnus Hagander Date: Tue, 2 Jan 2024 18:35:45 +0100 Subject: [PATCH] Fix order of keywords in SQL script Clearly not properly tested. Reported by Akshat Jaimini, found by the testing harness --- pgweb/account/migrations/0004_cauth_last_login.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pgweb/account/migrations/0004_cauth_last_login.py b/pgweb/account/migrations/0004_cauth_last_login.py index bb77c8c1..6df588b4 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 ON DELETE CASCADE, + user_id int NOT NULL REFERENCES auth_user(id) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED, site_id int NOT NULL REFERENCES account_communityauthsite (id) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED, lastlogin timestamptz NOT NULL, logincount bigint NOT NULL, -- 2.39.5