alembic.ini 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. # Licensed to the Apache Software Foundation (ASF) under one
  2. # or more contributor license agreements. See the NOTICE file
  3. # distributed with this work for additional information
  4. # regarding copyright ownership. The ASF licenses this file
  5. # to you under the Apache License, Version 2.0 (the
  6. # "License"); you may not use this file except in compliance
  7. # with the License. You may obtain a copy of the License at
  8. #
  9. # http://www.apache.org/licenses/LICENSE-2.0
  10. #
  11. # Unless required by applicable law or agreed to in writing,
  12. # software distributed under the License is distributed on an
  13. # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  14. # KIND, either express or implied. See the License for the
  15. # specific language governing permissions and limitations
  16. # under the License.
  17. # A generic, single database configuration.
  18. [alembic]
  19. # path to migration scripts
  20. # Use forward slashes (/) also on windows to provide an os agnostic path
  21. script_location = %(here)s/migrations
  22. # template used to generate migration file names; The default value is %%(rev)s_%%(slug)s
  23. # Uncomment the line below if you want the files to be prepended with date and time
  24. # see https://alembic.sqlalchemy.org/en/latest/tutorial.html#editing-the-ini-file
  25. # for all available tokens
  26. # file_template = %%(year)d_%%(month).2d_%%(day).2d_%%(hour).2d%%(minute).2d-%%(rev)s_%%(slug)s
  27. # sys.path path, will be prepended to sys.path if present.
  28. # defaults to the current working directory.
  29. prepend_sys_path = .
  30. # timezone to use when rendering the date within the migration file
  31. # as well as the filename.
  32. # If specified, requires the python>=3.9 or backports.zoneinfo library.
  33. # Any required deps can installed by adding `alembic[tz]` to the pip requirements
  34. # string value is passed to ZoneInfo()
  35. # leave blank for localtime
  36. # timezone =
  37. # max length of characters to apply to the "slug" field
  38. # truncate_slug_length = 40
  39. # set to 'true' to run the environment during
  40. # the 'revision' command, regardless of autogenerate
  41. # revision_environment = false
  42. # set to 'true' to allow .pyc and .pyo files without
  43. # a source .py file to be detected as revisions in the
  44. # versions/ directory
  45. # sourceless = false
  46. # version location specification; This defaults
  47. # to alembic/versions. When using multiple version
  48. # directories, initial revisions must be specified with --version-path.
  49. # The path separator used here should be the separator specified by "version_path_separator" below.
  50. # version_locations = %(here)s/bar:%(here)s/bat:alembic/versions
  51. # version path separator; As mentioned above, this is the character used to split
  52. # version_locations. The default within new alembic.ini files is "os", which uses os.pathsep.
  53. # If this key is omitted entirely, it falls back to the legacy behavior of splitting on spaces and/or commas.
  54. # Valid values for version_path_separator are:
  55. #
  56. # version_path_separator = :
  57. # version_path_separator = ;
  58. # version_path_separator = space
  59. version_path_separator = os # Use os.pathsep. Default configuration used for new projects.
  60. # set to 'true' to search source files recursively
  61. # in each "version_locations" directory
  62. # new in Alembic version 1.10
  63. # recursive_version_locations = false
  64. # the output encoding used when revision files
  65. # are written from script.py.mako
  66. # output_encoding = utf-8
  67. sqlalchemy.url = scheme://localhost/airflow
  68. [post_write_hooks]
  69. # post_write_hooks defines scripts or Python functions that are run
  70. # on newly generated revision scripts. See the documentation for further
  71. # detail and examples
  72. # format using "black" - use the console_scripts runner, against the "black" entrypoint
  73. # hooks = black
  74. # black.type = console_scripts
  75. # black.entrypoint = black
  76. # black.options = -l 79 REVISION_SCRIPT_FILENAME
  77. # lint with attempts to fix using "ruff" - use the exec runner, execute a binary
  78. # hooks = ruff
  79. # ruff.type = exec
  80. # ruff.executable = %(here)s/.venv/bin/ruff
  81. # ruff.options = --fix REVISION_SCRIPT_FILENAME
  82. # Logging configuration
  83. [loggers]
  84. keys = root,sqlalchemy,alembic
  85. [handlers]
  86. keys = console
  87. [formatters]
  88. keys = generic
  89. [logger_root]
  90. level = WARN
  91. handlers = console
  92. qualname =
  93. [logger_sqlalchemy]
  94. level = WARN
  95. handlers =
  96. qualname = sqlalchemy.engine
  97. [logger_alembic]
  98. level = INFO
  99. handlers =
  100. qualname = alembic
  101. [handler_console]
  102. class = StreamHandler
  103. args = (sys.stderr,)
  104. level = NOTSET
  105. formatter = generic
  106. [formatter_generic]
  107. format = %(levelname)-5.5s [%(name)s] %(message)s
  108. datefmt = %H:%M:%S