Fix order of keywords in SQL script
authorMagnus Hagander <magnus@hagander.net>
Tue, 2 Jan 2024 17:35:45 +0000 (18:35 +0100)
committerMagnus Hagander <magnus@hagander.net>
Tue, 2 Jan 2024 17:35:45 +0000 (18:35 +0100)
Clearly not properly tested.

Reported by Akshat Jaimini, found by the testing harness

pgweb/account/migrations/0004_cauth_last_login.py

index bb77c8c12ecf17af4a8794c04ba1d2f2a55ce5cf..6df588b411b6d4c150136c8c4d29e94456ef4f47 100644 (file)
@@ -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,