adamrt/flask-evolution — pull request #7 by jmhobbs (2013-01-09 02:14:23+00:00)
Title: Removal of "init" causes "create" to fail on fresh code base.

Since the migrations folder doesn't exist it throws an error on a fresh project when you run migrate create.

```
# ./manage.py migrate create
Name for the migration: users
Traceback (most recent call last):
File "./manage.py", line 22, in
manager.run()
File "/data/Working/test-flask-evolution/venv/local/lib/python2.7/site-packages/flask_script/__init__.py", line 351, in run
result = self.handle(sys.argv[0], command, sys.argv[2:])
File "/data/Working/test-flask-evolution/venv/local/lib/python2.7/site-packages/flask_script/__init__.py", line 324, in handle
return command.handle(app, *positional_args, **command_namespace.__dict__)
File "/data/Working/test-flask-evolution/venv/local/lib/python2.7/site-packages/flask_script/commands.py", line 143, in handle
return self.run(*args, **kwargs)
File "./manage.py", line 12, in migrate
evolution.manager(action)
File "/data/Working/test-flask-evolution/venv/local/lib/python2.7/site-packages/flask_evolution.py", line 205, in manager
new_file = Migration().create(name)
File "/data/Working/test-flask-evolution/venv/local/lib/python2.7/site-packages/flask_evolution.py", line 90, in create
num = self.max_migration() + 1
File "/data/Working/test-flask-evolution/venv/local/lib/python2.7/site-packages/flask_evolution.py", line 110, in max_migration
nums = [t[1] for t in self.migration_files_with_version()]
File "/data/Working/test-flask-evolution/venv/local/lib/python2.7/site-packages/flask_evolution.py", line 107, in migration_files_with_version
return [(f, int(migration_file_regex.match(f).groups()[0])) for f in self.migration_files()]
File "/data/Working/test-flask-evolution/venv/local/lib/python2.7/site-packages/flask_evolution.py", line 103, in migration_files
return [f for f in os.listdir(self.migration_path) \
OSError: [Errno 2] No such file or directory: '/data/Working/test-flask-evolution/pack/web/migrations'
```

It looks like this is an expected condition (hence the self-raised error) but if you are already init'ing on "run" automatically I think it'd be worth the effort to create that directory on "create" too.

Change occurred at commit 75b16349c21ebb2eb2903e0a017fddade48755b2