25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

117 lines
3.5 KiB

  1. # A generic, single database configuration.
  2. [alembic]
  3. # path to migration scripts
  4. script_location = alembic
  5. # template used to generate migration file names; The default value is %%(rev)s_%%(slug)s
  6. # Uncomment the line below if you want the files to be prepended with date and time
  7. # see https://alembic.sqlalchemy.org/en/latest/tutorial.html#editing-the-ini-file
  8. # for all available tokens
  9. # file_template = %%(year)d_%%(month).2d_%%(day).2d_%%(hour).2d%%(minute).2d-%%(rev)s_%%(slug)s
  10. # sys.path path, will be prepended to sys.path if present.
  11. # defaults to the current working directory.
  12. prepend_sys_path = .
  13. # timezone to use when rendering the date within the migration file
  14. # as well as the filename.
  15. # If specified, requires the python-dateutil library that can be
  16. # installed by adding `alembic[tz]` to the pip requirements
  17. # string value is passed to dateutil.tz.gettz()
  18. # leave blank for localtime
  19. # timezone =
  20. # max length of characters to apply to the
  21. # "slug" field
  22. # truncate_slug_length = 40
  23. # set to 'true' to run the environment during
  24. # the 'revision' command, regardless of autogenerate
  25. # revision_environment = false
  26. # set to 'true' to allow .pyc and .pyo files without
  27. # a source .py file to be detected as revisions in the
  28. # versions/ directory
  29. # sourceless = false
  30. # version location specification; This defaults
  31. # to alembic/versions. When using multiple version
  32. # directories, initial revisions must be specified with --version-path.
  33. # The path separator used here should be the separator specified by "version_path_separator" below.
  34. # version_locations = %(here)s/bar:%(here)s/bat:alembic/versions
  35. # version path separator; As mentioned above, this is the character used to split
  36. # version_locations. The default within new alembic.ini files is "os", which uses os.pathsep.
  37. # If this key is omitted entirely, it falls back to the legacy behavior of splitting on spaces and/or commas.
  38. # Valid values for version_path_separator are:
  39. #
  40. # version_path_separator = :
  41. # version_path_separator = ;
  42. # version_path_separator = space
  43. version_path_separator = os # Use os.pathsep. Default configuration used for new projects.
  44. # set to 'true' to search source files recursively
  45. # in each "version_locations" directory
  46. # new in Alembic version 1.10
  47. # recursive_version_locations = false
  48. # the output encoding used when revision files
  49. # are written from script.py.mako
  50. # output_encoding = utf-8
  51. sqlalchemy.url = driver://user:pass@localhost/dbname
  52. [post_write_hooks]
  53. # post_write_hooks defines scripts or Python functions that are run
  54. # on newly generated revision scripts. See the documentation for further
  55. # detail and examples
  56. # format using "black" - use the console_scripts runner, against the "black" entrypoint
  57. # hooks = black
  58. # black.type = console_scripts
  59. # black.entrypoint = black
  60. # black.options = -l 79 REVISION_SCRIPT_FILENAME
  61. # lint with attempts to fix using "ruff" - use the exec runner, execute a binary
  62. # hooks = ruff
  63. # ruff.type = exec
  64. # ruff.executable = %(here)s/.venv/bin/ruff
  65. # ruff.options = --fix REVISION_SCRIPT_FILENAME
  66. # Logging configuration
  67. [loggers]
  68. keys = root,sqlalchemy,alembic
  69. [handlers]
  70. keys = console
  71. [formatters]
  72. keys = generic
  73. [logger_root]
  74. level = WARN
  75. handlers = console
  76. qualname =
  77. [logger_sqlalchemy]
  78. level = WARN
  79. handlers =
  80. qualname = sqlalchemy.engine
  81. [logger_alembic]
  82. level = INFO
  83. handlers =
  84. qualname = alembic
  85. [handler_console]
  86. class = StreamHandler
  87. args = (sys.stderr,)
  88. level = NOTSET
  89. formatter = generic
  90. [formatter_generic]
  91. format = %(levelname)-5.5s [%(name)s] %(message)s
  92. datefmt = %H:%M:%S