prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Database table for SpanType has invalid name 
  How to reproduce the behaviour
  ---------
  - Pull latest changes from master
  - ./manage.py migrate
  - ./api/migrations/0033_auto_20220127_0654.py will migrate the database table for `SpanType` to `label_types_spanType`
  - Delete a project `Project.objects.first().delete()``
  
  Exception:
  
  <img width="511" alt="image" src="https://user-images.githubusercontent.com/6747788/152384221-a6a549b8-1cca-49c0-86e4-6a20f7d0a266.png">
   
  The issue can be resolved by either renaming db table `label_types_spanType` to `label_types_spantype` or by explicitly setting `tb_table` for SpanType model like this: `db_table = "label_types_spanType"`
  
  Your Environment
  ---------
  *   Operating System: macOS Monterey, doccano is locally executed
  *   Python Version Used: 3.9
  
  
  </issue>
  <code>
  [start of backend/api/migrations/0033_auto_20220127_0654.py]
  1 # Generated by Django 3.2.11 on 2022-01-27 06:54
  2 
  3 from django.db import migrations
  4 
  5 
  6 class Migration(migrations.Migration):
  7 
  8     dependencies = [
  9         ('labels', '0003_auto_20220127_0654'),
  10         ('api', '0032_auto_20220127_0654'),
  11     ]
  12 
  13     operations = [
  14         migrations.SeparateDatabaseAndState(
  15             state_operations=[
  16                 migrations.DeleteModel(
  17                     name='CategoryType',
  18                 ),
  19                 migrations.DeleteModel(
  20                     name='RelationTypes',
  21                 ),
  22                 migrations.DeleteModel(
  23                     name='SpanType',
  24                 ),
  25             ],
  26             database_operations=[
  27                 migrations.AlterModelTable(
  28                     name='CategoryType',
  29                     table='label_types_categorytype'
  30                 ),
  31                 migrations.AlterModelTable(
  32                     name='RelationTypes',
  33                     table='label_types_relationtypes'
  34                 ),
  35                 migrations.AlterModelTable(
  36                     name='SpanType',
  37                     table='label_types_spanType'
  38                 )
  39             ]
  40         )
  41     ]
  42
  [end of backend/api/migrations/0033_auto_20220127_0654.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
golden_diff: diff --git a/backend/api/migrations/0033_auto_20220127_0654.py b/backend/api/migrations/0033_auto_20220127_0654.py
  --- a/backend/api/migrations/0033_auto_20220127_0654.py
  +++ b/backend/api/migrations/0033_auto_20220127_0654.py
  @@ -34,7 +34,7 @@
                   ),
                   migrations.AlterModelTable(
                       name='SpanType',
  -                    table='label_types_spanType'
  +                    table='label_types_spantype'
                   )
               ]
           )
  
verification_info: {"golden_diff": "diff --git a/backend/api/migrations/0033_auto_20220127_0654.py b/backend/api/migrations/0033_auto_20220127_0654.py\n--- a/backend/api/migrations/0033_auto_20220127_0654.py\n+++ b/backend/api/migrations/0033_auto_20220127_0654.py\n@@ -34,7 +34,7 @@\n                 ),\n                 migrations.AlterModelTable(\n                     name='SpanType',\n-                    table='label_types_spanType'\n+                    table='label_types_spantype'\n                 )\n             ]\n         )\n", "issue": "Database table for SpanType has invalid name \nHow to reproduce the behaviour\r\n---------\r\n- Pull latest changes from master\r\n- ./manage.py migrate\r\n- ./api/migrations/0033_auto_20220127_0654.py will migrate the database table for `SpanType` to `label_types_spanType`\r\n- Delete a project `Project.objects.first().delete()``\r\n\r\nException:\r\n\r\n<img width=\"511\" alt=\"image\" src=\"https://user-images.githubusercontent.com/6747788/152384221-a6a549b8-1cca-49c0-86e4-6a20f7d0a266.png\">\r\n \r\nThe issue can be resolved by either renaming db table `label_types_spanType` to `label_types_spantype` or by explicitly setting `tb_table` for SpanType model like this: `db_table = \"label_types_spanType\"`\r\n\r\nYour Environment\r\n---------\r\n*   Operating System: macOS Monterey, doccano is locally executed\r\n*   Python Version Used: 3.9\r\n\n", "before_files": [{"content": "# Generated by Django 3.2.11 on 2022-01-27 06:54\n\nfrom django.db import migrations\n\n\nclass Migration(migrations.Migration):\n\n    dependencies = [\n        ('labels', '0003_auto_20220127_0654'),\n        ('api', '0032_auto_20220127_0654'),\n    ]\n\n    operations = [\n        migrations.SeparateDatabaseAndState(\n            state_operations=[\n                migrations.DeleteModel(\n                    name='CategoryType',\n                ),\n                migrations.DeleteModel(\n                    name='RelationTypes',\n                ),\n                migrations.DeleteModel(\n                    name='SpanType',\n                ),\n            ],\n            database_operations=[\n                migrations.AlterModelTable(\n                    name='CategoryType',\n                    table='label_types_categorytype'\n                ),\n                migrations.AlterModelTable(\n                    name='RelationTypes',\n                    table='label_types_relationtypes'\n                ),\n                migrations.AlterModelTable(\n                    name='SpanType',\n                    table='label_types_spanType'\n                )\n            ]\n        )\n    ]\n", "path": "backend/api/migrations/0033_auto_20220127_0654.py"}]}