Changes between Initial Version and Version 1 of Ticket #21961, comment 54


Ignore:
Timestamp:
Aug 27, 2023, 5:03:14 AM (16 months ago)
Author:
Akash Kumar Sen

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #21961, comment 54

    initial v1  
    11- Added tests for migrations.
    22
    3 **There are two issues I could not resolve after a lot of try : **
    4 - MySQL specific error in the test {{{delete.tests.DatabaseLevelOnDeleteTests.test_foreign_key_db_default}}}
    5 - I am not sure how to test the serializer.
     3**There are one I could not resolve after a lot of try : **
     4- MySQL specific error in the test : https://github.com/django/django/pull/16851#issuecomment-1693734608
     5
     6>Apparently MariaDB uses the InnoDB storage engine by default - I think that explains why the table create is failing there.
     7>It makes me think maybe Django should not allow on_delete=DB_SET_DEFAULT for MySQL 🤔
     8
     9As mentioned by Sarah Boyce in the GitHub comment, I also think we should disable on_delete=DB_SET_DEFAULT for MySQL, because according to https://dev.mysql.com/doc/refman/8.0/en/create-table-foreign-keys.html :
     10
     11>SET DEFAULT: This action is recognized by the MySQL parser, but both InnoDB and NDB reject table definitions containing ON DELETE SET DEFAULT or ON UPDATE SET DEFAULT clauses.
Back to Top