alembic.ini 2.2 KB

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