text: Title: [BUG] Upgrade from 2.9.0 -> 2.10.0 with existing Mailrule not working
  Body: ### Description
  
  When doing above upgrade my container keeps on crash-looping with attached error-log.
  
  ### Steps to reproduce
  
  1. Create a Mailrule in 2.9.0
  2. Upgrade to 2.10.0
  
  ### Webserver logs
  
  ```bash
  Paperless-ngx docker container starting...
  Installing languages...
  Get:1 http://deb.debian.org/debian bookworm InRelease [151 kB]
  Get:2 http://deb.debian.org/debian bookworm-updates InRelease [55.4 kB]
  Get:3 http://deb.debian.org/debian-security bookworm-security InRelease [48.0 kB]
  Get:4 http://deb.debian.org/debian bookworm/main amd64 Packages [8788 kB]
  Get:5 http://deb.debian.org/debian bookworm-updates/main amd64 Packages [13.8 kB]
  Get:6 http://deb.debian.org/debian-security bookworm-security/main amd64 Packages [168 kB]
  Fetched 9224 kB in 2s (4496 kB/s)
  Reading package lists...
  Package tesseract-ocr-deu already installed!
  Package tesseract-ocr-eng already installed!
  Creating directory scratch directory /tmp/paperless
  Adjusting permissions of paperless files. This may take a while.
  Waiting for PostgreSQL to start...
  Waiting for Redis...
  Connected to Redis broker.
  Apply database migrations...
  Operations to perform:
    Apply all migrations: account, admin, auditlog, auth, authtoken, contenttypes, django_celery_results, documents, guardian, paperless, paperless_mail, sessions, socialaccount
  Running migrations:
  Traceback (most recent call last):
    File "/usr/local/lib/python3.11/site-packages/django/db/backends/utils.py", line 87, in _execute
      return self.cursor.execute(sql)
             ^^^^^^^^^^^^^^^^^^^^^^^^
    File "/usr/local/lib/python3.11/site-packages/psycopg/cursor.py", line 732, in execute
      raise ex.with_traceback(None)
  psycopg.errors.UndefinedObject: constraint "idx_20523_sqlite_autoindex_paperless_mail_mailrule_1" of relation "paperless_mail_mailrule" does not exist
  
  The above exception was the direct cause of the following exception:
  Traceback (most recent call last):
    File "/usr/src/paperless/src/manage.py", line 10, in <module>
      execute_from_command_line(sys.argv)
    File "/usr/local/lib/python3.11/site-packages/django/core/management/__init__.py", line 442, in execute_from_command_line
      utility.execute()
    File "/usr/local/lib/python3.11/site-packages/django/core/management/__init__.py", line 436, in execute
      self.fetch_command(subcommand).run_from_argv(self.argv)
    File "/usr/local/lib/python3.11/site-packages/django/core/management/base.py", line 412, in run_from_argv
      self.execute(*args, **cmd_options)
    File "/usr/local/lib/python3.11/site-packages/django/core/management/base.py", line 458, in execute
      output = self.handle(*args, **options)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  File "/usr/local/lib/python3.11/site-packages/django/core/management/base.py", line 106, in wrapper
      res = handle_func(*args, **kwargs)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/usr/local/lib/python3.11/site-packages/django/core/management/commands/migrate.py", line 356, in handle
      post_migrate_state = executor.migrate(
                           ^^^^^^^^^^^^^^^^^
    File "/usr/local/lib/python3.11/site-packages/django/db/migrations/executor.py", line 135, in migrate
      state = self._migrate_all_forwards(
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/usr/local/lib/python3.11/site-packages/django/db/migrations/executor.py", line 167, in _migrate_all_forwards
      state = self.apply_migration(
              ^^^^^^^^^^^^^^^^^^^^^
    File "/usr/local/lib/python3.11/site-packages/django/db/migrations/executor.py", line 252, in apply_migration
      state = migration.apply(state, schema_editor)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/usr/local/lib/python3.11/site-packages/django/db/migrations/migration.py", line 132, in apply
      operation.database_forwards(
    File "/usr/local/lib/python3.11/site-packages/django/db/migrations/operations/fields.py", line 235, in database_forwards
      schema_editor.alter_field(from_model, from_field, to_field)
    File "/usr/local/lib/python3.11/site-packages/django/db/backends/base/schema.py", line 831, in alter_field
      self._alter_field(
    File "/usr/local/lib/python3.11/site-packages/django/db/backends/postgresql/schema.py", line 288, in _alter_field
      super()._alter_field(
    File "/usr/local/lib/python3.11/site-packages/django/db/backends/base/schema.py", line 906, in _alter_field
      self.execute(self._delete_unique_sql(model, constraint_name))
    File "/usr/local/lib/python3.11/site-packages/django/db/backends/postgresql/schema.py", line 48, in execute
      return super().execute(sql, None)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/usr/local/lib/python3.11/site-packages/django/db/backends/base/schema.py", line 201, in execute
      cursor.execute(sql, params)
    File "/usr/local/lib/python3.11/site-packages/django/db/backends/utils.py", line 67, in execute
      return self._execute_with_wrappers(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/usr/local/lib/python3.11/site-packages/django/db/backends/utils.py", line 80, in _execute_with_wrappers
      return executor(sql, params, many, context)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/usr/local/lib/python3.11/site-packages/django/db/backends/utils.py", line 84, in _execute
      with self.db.wrap_database_errors:
    File "/usr/local/lib/python3.11/site-packages/django/db/utils.py", line 91, in __exit__
      raise dj_exc_value.with_traceback(traceback) from exc_value
    File "/usr/local/lib/python3.11/site-packages/django/db/backends/utils.py", line 87, in _execute
      return self.cursor.execute(sql)
             ^^^^^^^^^^^^^^^^^^^^^^^^
    File "/usr/local/lib/python3.11/site-packages/psycopg/cursor.py", line 732, in execute
      raise ex.with_traceback(None)
  django.db.utils.ProgrammingError: constraint "idx_20523_sqlite_autoindex_paperless_mail_mailrule_1" of relation "paperless_mail_mailrule" does not exist
    Applying paperless_mail.0024_alter_mailrule_name_and_more...
  ```
  
  
  ### Browser logs
  
  _No response_
  
  ### Paperless-ngx version
  
  2.10.0
  
  ### Host OS
  
  Kubernetes 1.30.2 / Talos 1.7.5
  
  ### Installation method
  
  Docker - official image
  
  ### System status
  
  _No response_
  
  ### Browser
  
  Firefox
  
  ### Configuration changes
  
  Not really
  
  ### Please confirm the following
  
  - [X] I believe this issue is a bug that affects all users of Paperless-ngx, not something specific to my installation.
  - [X] I have already searched for relevant existing issues and discussions before opening this report.
  - [X] I have updated the title field above with a concise description.