alembic.ini 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. # A generic, single database configuration.
  2. [alembic]
  3. # path to migration scripts
  4. script_location = migrations
  5. # template used to generate migration files
  6. # file_template = %%(rev)s_%%(slug)s
  7. # timezone to use when rendering the date
  8. # within the migration file as well as the filename.
  9. # string value is passed to dateutil.tz.gettz()
  10. # leave blank for localtime
  11. # timezone =
  12. # max length of characters to apply to the
  13. # "slug" field
  14. # truncate_slug_length = 40
  15. # set to 'true' to run the environment during
  16. # the 'revision' command, regardless of autogenerate
  17. # revision_environment = false
  18. # set to 'true' to allow .pyc and .pyo files without
  19. # a source .py file to be detected as revisions in the
  20. # versions/ directory
  21. # sourceless = false
  22. # version location specification; this defaults
  23. # to migrations/versions. When using multiple version
  24. # directories, initial revisions must be specified with --version-path
  25. # version_locations = %(here)s/bar %(here)s/bat migrations/versions
  26. # the output encoding used when revision files
  27. # are written from script.py.mako
  28. # output_encoding = utf-8
  29. [post_write_hooks]
  30. # post_write_hooks defines scripts or Python functions that are run
  31. # on newly generated revision scripts. See the documentation for further
  32. # detail and examples
  33. # format using "black" - use the console_scripts runner, against the "black" entrypoint
  34. # hooks=black
  35. # black.type=console_scripts
  36. # black.entrypoint=black
  37. # black.options=-l 79
  38. # Logging configuration
  39. [loggers]
  40. keys = root,sqlalchemy,alembic
  41. [handlers]
  42. keys = console
  43. [formatters]
  44. keys = generic
  45. [logger_root]
  46. level = WARN
  47. handlers = console
  48. qualname =
  49. [logger_sqlalchemy]
  50. level = WARN
  51. handlers =
  52. qualname = sqlalchemy.engine
  53. [logger_alembic]
  54. level = INFO
  55. handlers =
  56. qualname = alembic
  57. [handler_console]
  58. class = StreamHandler
  59. args = (sys.stderr,)
  60. level = NOTSET
  61. formatter = generic
  62. [formatter_generic]
  63. format = %(levelname)-5.5s [%(name)s] %(message)s
  64. datefmt = %H:%M:%S