Clearly not properly tested.
Reported by Akshat Jaimini, found by the testing harness
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,