alembic.ini 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. # A generic, single database configuration.
  2. [alembic]
  3. # path to migration scripts
  4. script_location = alembic
  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 alembic/versions. When using multiple version
  27. # directories, initial revisions must be specified with --version-path
  28. # version_locations = %(here)s/bar %(here)s/bat alembic/versions
  29. # the output encoding used when revision files
  30. # are written from script.py.mako
  31. # output_encoding = utf-8
  32. sqlalchemy.url = mysql+pymysql://root:root@127.0.0.1:3306/sysdata
  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.stderr,)
  64. level = NOTSET
  65. formatter = generic
  66. [formatter_generic]
  67. format = %(levelname)-5.5s [%(name)s] %(message)s
  68. datefmt = %H:%M:%S