alembic.ini 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. # A generic, single database configuration.
  2. [alembic]
  3. # path to migration scripts
  4. script_location = alembic
  5. # template used to generate migration files
  6. file_template = %%(year)d%%(month).2d%%(day).2d%%(minute).2d_%%(slug)s_%%(rev)s
  7. # sys.path path, will be prepended to sys.path if present.
  8. # defaults to the current working directory.
  9. prepend_sys_path = .
  10. # timezone to use when rendering the date within the migration file
  11. # as well as the filename.
  12. # If specified, requires the python-dateutil library that can be
  13. # installed by adding `alembic[tz]` to the pip requirements
  14. # string value is passed to dateutil.tz.gettz()
  15. # leave blank for localtime
  16. # timezone =
  17. # max length of characters to apply to the
  18. # "slug" field
  19. truncate_slug_length = 40
  20. # set to 'true' to run the environment during
  21. # the 'revision' command, regardless of autogenerate
  22. # revision_environment = false
  23. # set to 'true' to allow .pyc and .pyo files without
  24. # a source .py file to be detected as revisions in the
  25. # versions/ directory
  26. # sourceless = false
  27. # version location specification; This defaults
  28. # to alembic/versions. When using multiple version
  29. # directories, initial revisions must be specified with --version-path.
  30. # The path separator used here should be the separator specified by "version_path_separator"
  31. # version_locations = %(here)s/bar:%(here)s/bat:alembic/versions
  32. # version path separator; As mentioned above, this is the character used to split
  33. # version_locations. Valid values are:
  34. #
  35. # version_path_separator = :
  36. # version_path_separator = ;
  37. # version_path_separator = space
  38. version_path_separator = os # default: use os.pathsep
  39. # the output encoding used when revision files
  40. # are written from script.py.mako
  41. # output_encoding = utf-8
  42. sqlalchemy.url = driver://user:pass@localhost/dbname
  43. [post_write_hooks]
  44. # post_write_hooks defines scripts or Python functions that are run
  45. # on newly generated revision scripts. See the documentation for further
  46. # detail and examples
  47. # Logging configuration
  48. [loggers]
  49. keys = root,sqlalchemy,alembic
  50. [handlers]
  51. keys = console
  52. [formatters]
  53. keys = generic
  54. [logger_root]
  55. level = WARN
  56. handlers = console
  57. qualname =
  58. [logger_sqlalchemy]
  59. level = WARN
  60. handlers =
  61. qualname = sqlalchemy.engine
  62. [logger_alembic]
  63. level = INFO
  64. handlers =
  65. qualname = alembic
  66. [handler_console]
  67. class = StreamHandler
  68. args = (sys.stderr,)
  69. level = NOTSET
  70. formatter = generic
  71. [formatter_generic]
  72. format = %(levelname)-5.5s [%(name)s] %(message)s
  73. datefmt = %H:%M:%S