We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN 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']
```

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `migrations/versions/aefa134809bf_.py`
Content:
```
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 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/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))

{"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"}], "after_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.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    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"}]}