We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Table 'ralph_ng.transitions_transition' doesn't exist
when I follow the document to setup a develop environment, I met the error" default: django.db.utils.ProgrammingError: (1146, "Table 'ralph_ng.transitions_transition' doesn't exist") ". I think it is because there are no such tables when newly install ralph3 develop environment but ralph3 try to migrate them(from ralph2). I am on mac and have download the default box manually which will  be used in vagrant up.

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `src/ralph/lib/transitions/checks.py`
Content:
```
1 from django.core.checks import Error
2 from django.db.utils import OperationalError
3 from django.template.base import TemplateDoesNotExist
4 from django.template.loader import get_template
5 
6 
7 def check_transition_templates(transition_templates):
8     # to prevent AppRegistryNotReady
9     from ralph.lib.transitions.models import Transition
10 
11     errors = []
12     if transition_templates:
13         if not isinstance(transition_templates, (list, tuple)):
14             errors.append(Error(
15                 'TRANSITION_TEMPLATES must be a list or a tuple',
16                 id='transitions.E001'
17             ))
18         else:
19             for index, item in enumerate(transition_templates):
20                 try:
21                     path, template = item
22                 except (ValueError, TypeError):
23                     errors.append(Error(
24                         'Element #{} must be a two elements tuple'.format(
25                             index
26                         ),
27                         id='transitions.E003'
28                     ))
29                     continue
30                 try:
31                     get_template(path)
32                 except TemplateDoesNotExist:
33                     errors.append(Error(
34                         'Template {} ({}) doesn\'t exist'.format(
35                             template, path
36                         ),
37                         hint='Check TRANSITION_TEMPLATES settings',
38                         id='transitions.E002'
39                     ))
40     excluded_templates = ['']
41     if transition_templates:
42         try:
43             excluded_templates.extend(
44                 {template for template, _ in transition_templates}
45             )
46         except ValueError:
47             pass
48     transitions_with_custom_templates = Transition.objects.exclude(
49         template_name__in=excluded_templates
50     )
51     try:
52         for transition in transitions_with_custom_templates:
53             errors.append(Error(
54                 'Template {} for {} transition is '
55                 'defined only in transition'.format(
56                     transition.template_name, transition
57                 ),
58                 hint=(
59                     'Change your TRANSITION_TEMPLATES settings by adding'
60                     ' ({}, "Your template name") and then '
61                     'edit {} transition').format(
62                         transition.template_name, transition
63                 ),
64                 id='transitions.E004'
65             ))
66     except OperationalError:
67         pass
68     return errors
69
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/src/ralph/lib/transitions/checks.py b/src/ralph/lib/transitions/checks.py
--- a/src/ralph/lib/transitions/checks.py
+++ b/src/ralph/lib/transitions/checks.py
@@ -1,9 +1,14 @@
+import logging
+
 from django.core.checks import Error
-from django.db.utils import OperationalError
+from django.db.utils import DatabaseError
 from django.template.base import TemplateDoesNotExist
 from django.template.loader import get_template
 
 
+logger = logging.getLogger(__name__)
+
+
 def check_transition_templates(transition_templates):
     # to prevent AppRegistryNotReady
     from ralph.lib.transitions.models import Transition
@@ -63,6 +68,6 @@
                 ),
                 id='transitions.E004'
             ))
-    except OperationalError:
-        pass
+    except DatabaseError as e:
+        logger.error(e)
     return errors

{"golden_diff": "diff --git a/src/ralph/lib/transitions/checks.py b/src/ralph/lib/transitions/checks.py\n--- a/src/ralph/lib/transitions/checks.py\n+++ b/src/ralph/lib/transitions/checks.py\n@@ -1,9 +1,14 @@\n+import logging\n+\n from django.core.checks import Error\n-from django.db.utils import OperationalError\n+from django.db.utils import DatabaseError\n from django.template.base import TemplateDoesNotExist\n from django.template.loader import get_template\n \n \n+logger = logging.getLogger(__name__)\n+\n+\n def check_transition_templates(transition_templates):\n     # to prevent AppRegistryNotReady\n     from ralph.lib.transitions.models import Transition\n@@ -63,6 +68,6 @@\n                 ),\n                 id='transitions.E004'\n             ))\n-    except OperationalError:\n-        pass\n+    except DatabaseError as e:\n+        logger.error(e)\n     return errors\n", "issue": "Table 'ralph_ng.transitions_transition' doesn't exist\nwhen I follow the document to setup a develop environment, I met the error\" default: django.db.utils.ProgrammingError: (1146, \"Table 'ralph_ng.transitions_transition' doesn't exist\") \". I think it is because there are no such tables when newly install ralph3 develop environment but ralph3 try to migrate them(from ralph2). I am on mac and have download the default box manually which will  be used in vagrant up.\n", "before_files": [{"content": "from django.core.checks import Error\nfrom django.db.utils import OperationalError\nfrom django.template.base import TemplateDoesNotExist\nfrom django.template.loader import get_template\n\n\ndef check_transition_templates(transition_templates):\n    # to prevent AppRegistryNotReady\n    from ralph.lib.transitions.models import Transition\n\n    errors = []\n    if transition_templates:\n        if not isinstance(transition_templates, (list, tuple)):\n            errors.append(Error(\n                'TRANSITION_TEMPLATES must be a list or a tuple',\n                id='transitions.E001'\n            ))\n        else:\n            for index, item in enumerate(transition_templates):\n                try:\n                    path, template = item\n                except (ValueError, TypeError):\n                    errors.append(Error(\n                        'Element #{} must be a two elements tuple'.format(\n                            index\n                        ),\n                        id='transitions.E003'\n                    ))\n                    continue\n                try:\n                    get_template(path)\n                except TemplateDoesNotExist:\n                    errors.append(Error(\n                        'Template {} ({}) doesn\\'t exist'.format(\n                            template, path\n                        ),\n                        hint='Check TRANSITION_TEMPLATES settings',\n                        id='transitions.E002'\n                    ))\n    excluded_templates = ['']\n    if transition_templates:\n        try:\n            excluded_templates.extend(\n                {template for template, _ in transition_templates}\n            )\n        except ValueError:\n            pass\n    transitions_with_custom_templates = Transition.objects.exclude(\n        template_name__in=excluded_templates\n    )\n    try:\n        for transition in transitions_with_custom_templates:\n            errors.append(Error(\n                'Template {} for {} transition is '\n                'defined only in transition'.format(\n                    transition.template_name, transition\n                ),\n                hint=(\n                    'Change your TRANSITION_TEMPLATES settings by adding'\n                    ' ({}, \"Your template name\") and then '\n                    'edit {} transition').format(\n                        transition.template_name, transition\n                ),\n                id='transitions.E004'\n            ))\n    except OperationalError:\n        pass\n    return errors\n", "path": "src/ralph/lib/transitions/checks.py"}], "after_files": [{"content": "import logging\n\nfrom django.core.checks import Error\nfrom django.db.utils import DatabaseError\nfrom django.template.base import TemplateDoesNotExist\nfrom django.template.loader import get_template\n\n\nlogger = logging.getLogger(__name__)\n\n\ndef check_transition_templates(transition_templates):\n    # to prevent AppRegistryNotReady\n    from ralph.lib.transitions.models import Transition\n\n    errors = []\n    if transition_templates:\n        if not isinstance(transition_templates, (list, tuple)):\n            errors.append(Error(\n                'TRANSITION_TEMPLATES must be a list or a tuple',\n                id='transitions.E001'\n            ))\n        else:\n            for index, item in enumerate(transition_templates):\n                try:\n                    path, template = item\n                except (ValueError, TypeError):\n                    errors.append(Error(\n                        'Element #{} must be a two elements tuple'.format(\n                            index\n                        ),\n                        id='transitions.E003'\n                    ))\n                    continue\n                try:\n                    get_template(path)\n                except TemplateDoesNotExist:\n                    errors.append(Error(\n                        'Template {} ({}) doesn\\'t exist'.format(\n                            template, path\n                        ),\n                        hint='Check TRANSITION_TEMPLATES settings',\n                        id='transitions.E002'\n                    ))\n    excluded_templates = ['']\n    if transition_templates:\n        try:\n            excluded_templates.extend(\n                {template for template, _ in transition_templates}\n            )\n        except ValueError:\n            pass\n    transitions_with_custom_templates = Transition.objects.exclude(\n        template_name__in=excluded_templates\n    )\n    try:\n        for transition in transitions_with_custom_templates:\n            errors.append(Error(\n                'Template {} for {} transition is '\n                'defined only in transition'.format(\n                    transition.template_name, transition\n                ),\n                hint=(\n                    'Change your TRANSITION_TEMPLATES settings by adding'\n                    ' ({}, \"Your template name\") and then '\n                    'edit {} transition').format(\n                        transition.template_name, transition\n                ),\n                id='transitions.E004'\n            ))\n    except DatabaseError as e:\n        logger.error(e)\n    return errors\n", "path": "src/ralph/lib/transitions/checks.py"}]}