prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  IntegrityError: (psycopg2.IntegrityError) column "field_identifier" contains null values
  https://sentry.eventyay.com/eventyay/api/issues/25/
  
  ```
  IntegrityError: (psycopg2.IntegrityError) column "field_identifier" contains null values
   [SQL: 'ALTER TABLE custom_forms ADD COLUMN field_identifier VARCHAR NOT NULL']
  (25 additional frame(s) were not displayed)
  ...
    File "sqlalchemy/engine/base.py", line 1189, in _execute_context
      context)
    File "sqlalchemy/engine/base.py", line 1402, in _handle_dbapi_exception
      exc_info
    File "sqlalchemy/util/compat.py", line 203, in raise_from_cause
      reraise(type(exception), exception, tb=exc_tb, cause=cause)
    File "sqlalchemy/engine/base.py", line 1182, in _execute_context
      context)
    File "sqlalchemy/engine/default.py", line 470, in do_execute
      cursor.execute(statement, parameters)
  
  IntegrityError: (psycopg2.IntegrityError) column "field_identifier" contains null values
   [SQL: 'ALTER TABLE custom_forms ADD COLUMN field_identifier VARCHAR NOT NULL']
  ```
  
  </issue>
  <code>
  [start of migrations/versions/aefa134809bf_.py]
  1 """empty message
  2 
  3 Revision ID: aefa134809bf
  4 Revises: 2b39d8c05788
  5 Create Date: 2017-07-21 20:37:50.193436
  6 
  7 """
  8 
  9 from alembic import op
  10 import sqlalchemy as sa
  11 import sqlalchemy_utils
  12 
  13 
  14 # revision identifiers, used by Alembic.
  15 revision = 'aefa134809bf'
  16 down_revision = '2b39d8c05788'
  17 
  18 
  19 def upgrade():
  20     # ### commands auto generated by Alembic - please adjust! ###
  21     op.add_column('custom_forms', sa.Column('field_identifier', sa.String(), nullable=False))
  22     op.add_column('custom_forms', sa.Column('form', sa.String(), nullable=False))
  23     op.add_column('custom_forms', sa.Column('is_fixed', sa.Boolean(), nullable=True))
  24     op.add_column('custom_forms', sa.Column('is_included', sa.Boolean(), nullable=True))
  25     op.add_column('custom_forms', sa.Column('is_required', sa.Boolean(), nullable=True))
  26     op.add_column('custom_forms', sa.Column('type', sa.String(), nullable=False))
  27     op.create_unique_constraint('custom_form_identifier', 'custom_forms', ['event_id', 'field_identifier', 'form'])
  28     op.drop_column('custom_forms', 'speaker_form')
  29     op.drop_column('custom_forms', 'session_form')
  30     # ### end Alembic commands ###
  31 
  32 
  33 def downgrade():
  34     # ### commands auto generated by Alembic - please adjust! ###
  35     op.add_column('custom_forms', sa.Column('session_form', sa.VARCHAR(), autoincrement=False, nullable=False))
  36     op.add_column('custom_forms', sa.Column('speaker_form', sa.VARCHAR(), autoincrement=False, nullable=False))
  37     op.drop_constraint('custom_form_identifier', 'custom_forms', type_='unique')
  38     op.drop_column('custom_forms', 'type')
  39     op.drop_column('custom_forms', 'is_required')
  40     op.drop_column('custom_forms', 'is_included')
  41     op.drop_column('custom_forms', 'is_fixed')
  42     op.drop_column('custom_forms', 'form')
  43     op.drop_column('custom_forms', 'field_identifier')
  44     # ### end Alembic commands ###
  45
  [end of migrations/versions/aefa134809bf_.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/migrations/versions/aefa134809bf_.py b/migrations/versions/aefa134809bf_.py
  --- a/migrations/versions/aefa134809bf_.py
  +++ b/migrations/versions/aefa134809bf_.py
  @@ -18,6 +18,7 @@
   
   def upgrade():
       # ### commands auto generated by Alembic - please adjust! ###
  +    op.execute("DELETE FROM custom_forms")
       op.add_column('custom_forms', sa.Column('field_identifier', sa.String(), nullable=False))
       op.add_column('custom_forms', sa.Column('form', sa.String(), nullable=False))
       op.add_column('custom_forms', sa.Column('is_fixed', sa.Boolean(), nullable=True))
  
verification_info: {"golden_diff": "diff --git a/migrations/versions/aefa134809bf_.py b/migrations/versions/aefa134809bf_.py\n--- a/migrations/versions/aefa134809bf_.py\n+++ b/migrations/versions/aefa134809bf_.py\n@@ -18,6 +18,7 @@\n \n def upgrade():\n     # ### commands auto generated by Alembic - please adjust! ###\n+    op.execute(\"DELETE FROM custom_forms\")\n     op.add_column('custom_forms', sa.Column('field_identifier', sa.String(), nullable=False))\n     op.add_column('custom_forms', sa.Column('form', sa.String(), nullable=False))\n     op.add_column('custom_forms', sa.Column('is_fixed', sa.Boolean(), nullable=True))\n", "issue": "IntegrityError: (psycopg2.IntegrityError) column \"field_identifier\" contains null values\nhttps://sentry.eventyay.com/eventyay/api/issues/25/\r\n\r\n```\r\nIntegrityError: (psycopg2.IntegrityError) column \"field_identifier\" contains null values\r\n [SQL: 'ALTER TABLE custom_forms ADD COLUMN field_identifier VARCHAR NOT NULL']\r\n(25 additional frame(s) were not displayed)\r\n...\r\n  File \"sqlalchemy/engine/base.py\", line 1189, in _execute_context\r\n    context)\r\n  File \"sqlalchemy/engine/base.py\", line 1402, in _handle_dbapi_exception\r\n    exc_info\r\n  File \"sqlalchemy/util/compat.py\", line 203, in raise_from_cause\r\n    reraise(type(exception), exception, tb=exc_tb, cause=cause)\r\n  File \"sqlalchemy/engine/base.py\", line 1182, in _execute_context\r\n    context)\r\n  File \"sqlalchemy/engine/default.py\", line 470, in do_execute\r\n    cursor.execute(statement, parameters)\r\n\r\nIntegrityError: (psycopg2.IntegrityError) column \"field_identifier\" contains null values\r\n [SQL: 'ALTER TABLE custom_forms ADD COLUMN field_identifier VARCHAR NOT NULL']\r\n```\n", "before_files": [{"content": "\"\"\"empty message\n\nRevision ID: aefa134809bf\nRevises: 2b39d8c05788\nCreate Date: 2017-07-21 20:37:50.193436\n\n\"\"\"\n\nfrom alembic import op\nimport sqlalchemy as sa\nimport sqlalchemy_utils\n\n\n# revision identifiers, used by Alembic.\nrevision = 'aefa134809bf'\ndown_revision = '2b39d8c05788'\n\n\ndef upgrade():\n    # ### commands auto generated by Alembic - please adjust! ###\n    op.add_column('custom_forms', sa.Column('field_identifier', sa.String(), nullable=False))\n    op.add_column('custom_forms', sa.Column('form', sa.String(), nullable=False))\n    op.add_column('custom_forms', sa.Column('is_fixed', sa.Boolean(), nullable=True))\n    op.add_column('custom_forms', sa.Column('is_included', sa.Boolean(), nullable=True))\n    op.add_column('custom_forms', sa.Column('is_required', sa.Boolean(), nullable=True))\n    op.add_column('custom_forms', sa.Column('type', sa.String(), nullable=False))\n    op.create_unique_constraint('custom_form_identifier', 'custom_forms', ['event_id', 'field_identifier', 'form'])\n    op.drop_column('custom_forms', 'speaker_form')\n    op.drop_column('custom_forms', 'session_form')\n    # ### end Alembic commands ###\n\n\ndef downgrade():\n    # ### commands auto generated by Alembic - please adjust! ###\n    op.add_column('custom_forms', sa.Column('session_form', sa.VARCHAR(), autoincrement=False, nullable=False))\n    op.add_column('custom_forms', sa.Column('speaker_form', sa.VARCHAR(), autoincrement=False, nullable=False))\n    op.drop_constraint('custom_form_identifier', 'custom_forms', type_='unique')\n    op.drop_column('custom_forms', 'type')\n    op.drop_column('custom_forms', 'is_required')\n    op.drop_column('custom_forms', 'is_included')\n    op.drop_column('custom_forms', 'is_fixed')\n    op.drop_column('custom_forms', 'form')\n    op.drop_column('custom_forms', 'field_identifier')\n    # ### end Alembic commands ###\n", "path": "migrations/versions/aefa134809bf_.py"}]}