alembic.ini 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. #ident "@(#)$Format:LocalFoodAI:app.py:%an:%ae:%ad:%cn:%ce:%cd:%H:%D:%N$"
  2. # A generic, single database configuration.
  3. [alembic]
  4. # path to migration scripts.
  5. # this is typically a path given in POSIX (e.g. forward slashes)
  6. # format, relative to the token %(here)s which refers to the location of this
  7. # ini file
  8. script_location = %(here)s/alembic
  9. # template used to generate migration file names; The default value is %%(rev)s_%%(slug)s
  10. # Uncomment the line below if you want the files to be prepended with date and time
  11. # see https://alembic.sqlalchemy.org/en/latest/tutorial.html#editing-the-ini-file
  12. # for all available tokens
  13. # file_template = %%(year)d_%%(month).2d_%%(day).2d_%%(hour).2d%%(minute).2d-%%(rev)s_%%(slug)s
  14. # sys.path path, will be prepended to sys.path if present.
  15. # defaults to the current working directory. for multiple paths, the path separator
  16. # is defined by "path_separator" below.
  17. prepend_sys_path = .
  18. # timezone to use when rendering the date within the migration file
  19. # as well as the filename.
  20. # If specified, requires the tzdata library which can be installed by adding
  21. # `alembic[tz]` to the pip requirements.
  22. # string value is passed to ZoneInfo()
  23. # leave blank for localtime
  24. # timezone =
  25. # max length of characters to apply to the "slug" field
  26. # truncate_slug_length = 40
  27. # set to 'true' to run the environment during
  28. # the 'revision' command, regardless of autogenerate
  29. # revision_environment = false
  30. # set to 'true' to allow .pyc and .pyo files without
  31. # a source .py file to be detected as revisions in the
  32. # versions/ directory
  33. # sourceless = false
  34. # version location specification; This defaults
  35. # to <script_location>/versions. When using multiple version
  36. # directories, initial revisions must be specified with --version-path.
  37. # The path separator used here should be the separator specified by "path_separator"
  38. # below.
  39. # version_locations = %(here)s/bar:%(here)s/bat:%(here)s/alembic/versions
  40. # path_separator; This indicates what character is used to split lists of file
  41. # paths, including version_locations and prepend_sys_path within configparser
  42. # files such as alembic.ini.
  43. # The default rendered in new alembic.ini files is "os", which uses os.pathsep
  44. # to provide os-dependent path splitting.
  45. #
  46. # Note that in order to support legacy alembic.ini files, this default does NOT
  47. # take place if path_separator is not present in alembic.ini. If this
  48. # option is omitted entirely, fallback logic is as follows:
  49. #
  50. # 1. Parsing of the version_locations option falls back to using the legacy
  51. # "version_path_separator" key, which if absent then falls back to the legacy
  52. # behavior of splitting on spaces and/or commas.
  53. # 2. Parsing of the prepend_sys_path option falls back to the legacy
  54. # behavior of splitting on spaces, commas, or colons.
  55. #
  56. # Valid values for path_separator are:
  57. #
  58. # path_separator = :
  59. # path_separator = ;
  60. # path_separator = space
  61. # path_separator = newline
  62. #
  63. # Use os.pathsep. Default configuration used for new projects.
  64. path_separator = os
  65. # set to 'true' to search source files recursively
  66. # in each "version_locations" directory
  67. # new in Alembic version 1.10
  68. # recursive_version_locations = false
  69. # the output encoding used when revision files
  70. # are written from script.py.mako
  71. # output_encoding = utf-8
  72. # database URL. This is consumed by the user-maintained env.py script only.
  73. # other means of configuring database URLs may be customized within the env.py
  74. # file.
  75. sqlalchemy.url = mysql+pymysql://db_owner:your_db_password_here@192.168.130.170/food_db
  76. [post_write_hooks]
  77. # post_write_hooks defines scripts or Python functions that are run
  78. # on newly generated revision scripts. See the documentation for further
  79. # detail and examples
  80. # format using "black" - use the console_scripts runner, against the "black" entrypoint
  81. # hooks = black
  82. # black.type = console_scripts
  83. # black.entrypoint = black
  84. # black.options = -l 79 REVISION_SCRIPT_FILENAME
  85. # lint with attempts to fix using "ruff" - use the module runner, against the "ruff" module
  86. # hooks = ruff
  87. # ruff.type = module
  88. # ruff.module = ruff
  89. # ruff.options = check --fix REVISION_SCRIPT_FILENAME
  90. # Alternatively, use the exec runner to execute a binary found on your PATH
  91. # hooks = ruff
  92. # ruff.type = exec
  93. # ruff.executable = ruff
  94. # ruff.options = check --fix REVISION_SCRIPT_FILENAME
  95. # Logging configuration. This is also consumed by the user-maintained
  96. # env.py script only.
  97. [loggers]
  98. keys = root,sqlalchemy,alembic
  99. [handlers]
  100. keys = console
  101. [formatters]
  102. keys = generic
  103. [logger_root]
  104. level = WARNING
  105. handlers = console
  106. qualname =
  107. [logger_sqlalchemy]
  108. level = WARNING
  109. handlers =
  110. qualname = sqlalchemy.engine
  111. [logger_alembic]
  112. level = INFO
  113. handlers =
  114. qualname = alembic
  115. [handler_console]
  116. class = StreamHandler
  117. args = (sys.stderr,)
  118. level = NOTSET
  119. formatter = generic
  120. [formatter_generic]
  121. format = %(levelname)-5.5s [%(name)s] %(message)s
  122. datefmt = %H:%M:%S