Repository: Cloud-CV/EvalAI
Issue: ValueError on deploying to staging server
Root cause: Validation Gap

Following is the error log when tried to run `python manage.py makemigrations` command using auto-deploy script.

```shell

Migrations for 'challenges':
   apps/challenges/migrations/0029_auto_20170717_2208.py:
     - Alter field evaluation_script on challenge
     - Alter field stderr_file on challengeconfiguration
     - Alter field stdout_file on challengeconfiguration
     - Alter field zip_configuration on challengeconfiguration
     - Alter field test_annotation on challengephase
 Traceback (most recent call last):
   File "/home/ubuntu/Projects/EvalAI/manage.py", line 22, in <module>
     execute_from_command_line(sys.argv)
   File "/home/ubuntu/.virtualenvs/EvalAI/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 367, in execute_from_command_line
     utility.execute()
   File "/home/ubuntu/.virtualenvs/EvalAI/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 359, in execute
     self.fetch_command(subcommand).run_from_argv(self.argv)
   File "/home/ubuntu/.virtualenvs/EvalAI/local/lib/python2.7/site-packages/django/core/management/base.py", line 294, in run_from_argv
     self.execute(*args, **cmd_options)
   File "/home/ubuntu/.virtualenvs/EvalAI/local/lib/python2.7/site-packages/django/core/management/base.py", line 345, in execute
     output = self.handle(*args, **options)
   File "/home/ubuntu/.virtualenvs/EvalAI/local/lib/python2.7/site-packages/django/core/management/commands/makemigrations.py", line 189, in handle
     self.write_migration_files(changes)
   File "/home/ubuntu/.virtualenvs/EvalAI/local/lib/python2.7/site-packages/django/core/management/commands/makemigrations.py", line 224, in write_migration_files
     migration_string = writer.as_string()
   File "/home/ubuntu/.virtualenvs/EvalAI/local/lib/python2.7/site-packages/django/db/migrations/writer.py", line 163, in as_string
     operation_string, operation_imports = OperationWriter(operation).serialize()
   File "/home/ubuntu/.virtualenvs/EvalAI/local/lib/python2.7/site-packages/django/db/migrations/writer.py", line 120, in serialize
     _write(arg_name, arg_value)
   File "/home/ubuntu/.virtualenvs/EvalAI/local/lib/python2.7/site-packages/django/db/migrations/writer.py", line 84, in _write
     arg_string, arg_imports = MigrationWriter.serialize(_arg_value)
   File "/home/ubuntu/.virtualenvs/EvalAI/local/lib/python2.7/site-packages/django/db/migrations/writer.py", line 293, in serialize
     return serializer_factory(value).serialize()
   File "/home/ubuntu/.virtualenvs/EvalAI/local/lib/python2.7/site-packages/django/db/migrations/serializer.py", line 228, in serialize
     return self.serialize_deconstructed(path, args, kwargs)
   File "/home/ubuntu/.virtualenvs/EvalAI/local/lib/python2.7/site-packages/django/db/migrations/serializer.py", line 100, in serialize_deconstructed
     arg_string, arg_imports = serializer_factory(arg).serialize()
   File "/home/ubuntu/.virtualenvs/EvalAI/local/lib/python2.7/site-packages/django/db/migrations/serializer.py", line 388, in serializer_factory
     "topics/migrations/#migration-serializing" % (value, get_docs_version())
 ValueError: Cannot serialize: <base.utils.RandomFileName object at 0x7f362d7eaf90>
 There are some values Django cannot serialize into migration files.
 For more, see https://docs.djangoproject.com/en/1.10/topics/migrations/#migration-serializing
```


Sorry, my bad. The migration files are already created during the development and I just needed to run the migrate command. Working perfectly now.