title: Alembic migrations when some tables exists
body: <p>I have some migrations in alembic, and try to run <code>alembic upgrade head</code> to up-to-date my DB for revision, but in some cases I have tables, which already exists, so I have an error:</p>
  
  <pre><code>alembic upgrade head
  INFO  [alembic.runtime.migration] Context impl PostgresqlImpl.
  INFO  [alembic.runtime.migration] Will assume transactional DDL.
  INFO  [alembic.runtime.migration] Running upgrade  -&gt; 3137cf88d8c6, create tables
  Traceback (most recent call last):
    File "/home/toweya/.virtualenvs/numus3/lib/python3.5/site-packages/sqlalchemy/engine/base.py", line 1182, in _execute_context
      context)
    File "/home/toweya/.virtualenvs/numus3/lib/python3.5/site-packages/sqlalchemy/engine/default.py", line 470, in do_execute
      cursor.execute(statement, parameters)
  psycopg2.ProgrammingError: relation "City" already exists
  
  
  The above exception was the direct cause of the following exception:
  
  Traceback (most recent call last):
    File "/home/toweya/.virtualenvs/numus3/bin/alembic", line 11, in &lt;module&gt;
      sys.exit(main())
    File "/home/toweya/.virtualenvs/numus3/lib/python3.5/site-packages/alembic/config.py", line 479, in main
      CommandLine(prog=prog).main(argv=argv)
    File "/home/toweya/.virtualenvs/numus3/lib/python3.5/site-packages/alembic/config.py", line 473, in main
      self.run_cmd(cfg, options)
    File "/home/toweya/.virtualenvs/numus3/lib/python3.5/site-packages/alembic/config.py", line 456, in run_cmd
      **dict((k, getattr(options, k, None)) for k in kwarg)
    File "/home/toweya/.virtualenvs/numus3/lib/python3.5/site-packages/alembic/command.py", line 254, in upgrade
      script.run_env()
    File "/home/toweya/.virtualenvs/numus3/lib/python3.5/site-packages/alembic/script/base.py", line 416, in run_env
      util.load_python_file(self.dir, 'env.py')
    File "/home/toweya/.virtualenvs/numus3/lib/python3.5/site-packages/alembic/util/pyfiles.py", line 93, in load_python_file
      module = load_module_py(module_id, path)
    File "/home/toweya/.virtualenvs/numus3/lib/python3.5/site-packages/alembic/util/compat.py", line 64, in load_module_py
      module_id, path).load_module(module_id)
    File "&lt;frozen importlib._bootstrap_external&gt;", line 388, in _check_name_wrapper
    File "&lt;frozen importlib._bootstrap_external&gt;", line 809, in load_module
    File "&lt;frozen importlib._bootstrap_external&gt;", line 668, in load_module
    File "&lt;frozen importlib._bootstrap&gt;", line 268, in _load_module_shim
    File "&lt;frozen importlib._bootstrap&gt;", line 693, in _load
    File "&lt;frozen importlib._bootstrap&gt;", line 673, in _load_unlocked
    File "&lt;frozen importlib._bootstrap_external&gt;", line 665, in exec_module
    File "&lt;frozen importlib._bootstrap&gt;", line 222, in _call_with_frames_removed
    File "numus/env.py", line 68, in &lt;module&gt;
      run_migrations_online()
    File "numus/env.py", line 63, in run_migrations_online
      context.run_migrations()
    File "&lt;string&gt;", line 8, in run_migrations
    File "/home/toweya/.virtualenvs/numus3/lib/python3.5/site-packages/alembic/runtime/environment.py", line 817, in run_migrations
      self.get_context().run_migrations(**kw)
    File "/home/toweya/.virtualenvs/numus3/lib/python3.5/site-packages/alembic/runtime/migration.py", line 323, in run_migrations
      step.migration_fn(**kw)
    File "/home/toweya/PycharmProjects/NumusPortal/portal/db_manage/numus/versions/3137cf88d8c6_create_tables.py", line 30, in upgrade
      sa.Column('name', sa.String(64), nullable=False),
    File "&lt;string&gt;", line 8, in create_table
    File "&lt;string&gt;", line 3, in create_table
    File "/home/toweya/.virtualenvs/numus3/lib/python3.5/site-packages/alembic/operations/ops.py", line 1106, in create_table
      return operations.invoke(op)
    File "/home/toweya/.virtualenvs/numus3/lib/python3.5/site-packages/alembic/operations/base.py", line 318, in invoke
      return fn(self, operation)
    File "/home/toweya/.virtualenvs/numus3/lib/python3.5/site-packages/alembic/operations/toimpl.py", line 101, in create_table
      operations.impl.create_table(table)
    File "/home/toweya/.virtualenvs/numus3/lib/python3.5/site-packages/alembic/ddl/impl.py", line 194, in create_table
      self._exec(schema.CreateTable(table))
    File "/home/toweya/.virtualenvs/numus3/lib/python3.5/site-packages/alembic/ddl/impl.py", line 118, in _exec
      return conn.execute(construct, *multiparams, **params)
    File "/home/toweya/.virtualenvs/numus3/lib/python3.5/site-packages/sqlalchemy/engine/base.py", line 945, in execute
      return meth(self, multiparams, params)
    File "/home/toweya/.virtualenvs/numus3/lib/python3.5/site-packages/sqlalchemy/sql/ddl.py", line 68, in _execute_on_connection
      return connection._execute_ddl(self, multiparams, params)
    File "/home/toweya/.virtualenvs/numus3/lib/python3.5/site-packages/sqlalchemy/engine/base.py", line 1002, in _execute_ddl
      compiled
    File "/home/toweya/.virtualenvs/numus3/lib/python3.5/site-packages/sqlalchemy/engine/base.py", line 1189, in _execute_context
      context)
    File "/home/toweya/.virtualenvs/numus3/lib/python3.5/site-packages/sqlalchemy/engine/base.py", line 1393, in _handle_dbapi_exception
      exc_info
    File "/home/toweya/.virtualenvs/numus3/lib/python3.5/site-packages/sqlalchemy/util/compat.py", line 203, in raise_from_cause
      reraise(type(exception), exception, tb=exc_tb, cause=cause)
    File "/home/toweya/.virtualenvs/numus3/lib/python3.5/site-packages/sqlalchemy/util/compat.py", line 186, in reraise
      raise value.with_traceback(tb)
    File "/home/toweya/.virtualenvs/numus3/lib/python3.5/site-packages/sqlalchemy/engine/base.py", line 1182, in _execute_context
      context)
    File "/home/toweya/.virtualenvs/numus3/lib/python3.5/site-packages/sqlalchemy/engine/default.py", line 470, in do_execute
      cursor.execute(statement, parameters)
  sqlalchemy.exc.ProgrammingError: (psycopg2.ProgrammingError) relation "City" already exists
   [SQL: '\nCREATE TABLE "City" (\n\tid SERIAL NOT NULL, \n\tgeoid INTEGER NOT NULL, \n\tname VARCHAR(64) NOT NULL, \n\tPRIMARY KEY (id), \n\tUNIQUE (geoid)\n)\n\n']
  </code></pre>
  
  <p>How can I ignore existing tables?<br>
  That means something like: if table exist - continue but not abort</p>