summaryrefslogtreecommitdiff
path: root/alembic/templates
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2022-05-31 16:18:57 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2022-05-31 16:21:27 -0400
commit2cd9e1ae0c1c8c6becc43029b71b1c1fd2303dda (patch)
tree50592fd2d458855e0c464636ff8b4b85e96a97ba /alembic/templates
parent11839b743d1c13ce04948526fe66f51a12de4429 (diff)
downloadalembic-2cd9e1ae0c1c8c6becc43029b71b1c1fd2303dda.tar.gz
remove pylons template
also some other doc updates Fixes: #987 Change-Id: Icf3513201a4e26296cef15e2d6b3703759f6e831
Diffstat (limited to 'alembic/templates')
-rw-r--r--alembic/templates/pylons/README1
-rw-r--r--alembic/templates/pylons/alembic.ini.mako71
-rw-r--r--alembic/templates/pylons/env.py86
-rw-r--r--alembic/templates/pylons/script.py.mako24
4 files changed, 0 insertions, 182 deletions
diff --git a/alembic/templates/pylons/README b/alembic/templates/pylons/README
deleted file mode 100644
index ed3c28e..0000000
--- a/alembic/templates/pylons/README
+++ /dev/null
@@ -1 +0,0 @@
-Configuration that reads from a Pylons project environment. \ No newline at end of file
diff --git a/alembic/templates/pylons/alembic.ini.mako b/alembic/templates/pylons/alembic.ini.mako
deleted file mode 100644
index 82facf9..0000000
--- a/alembic/templates/pylons/alembic.ini.mako
+++ /dev/null
@@ -1,71 +0,0 @@
-# a Pylons configuration.
-
-[alembic]
-# path to migration scripts
-script_location = ${script_location}
-
-# template used to generate migration file names; The default value is %%(rev)s_%%(slug)s
-# Uncomment the line below if you want the files to be prepended with date and time
-# see https://alembic.sqlalchemy.org/en/latest/tutorial.html#editing-the-ini-file
-# for all available tokens
-# file_template = %%(year)d_%%(month).2d_%%(day).2d_%%(hour).2d%%(minute).2d-%%(rev)s_%%(slug)s
-
-# sys.path path, will be prepended to sys.path if present.
-# defaults to the current working directory.
-prepend_sys_path = .
-
-# timezone to use when rendering the date within the migration file
-# as well as the filename.
-# If specified, requires the python-dateutil library that can be
-# installed by adding `alembic[tz]` to the pip requirements
-# string value is passed to dateutil.tz.gettz()
-# leave blank for localtime
-# timezone =
-
-# max length of characters to apply to the
-# "slug" field
-# truncate_slug_length = 40
-
-# set to 'true' to run the environment during
-# the 'revision' command, regardless of autogenerate
-# revision_environment = false
-
-# set to 'true' to allow .pyc and .pyo files without
-# a source .py file to be detected as revisions in the
-# versions/ directory
-# sourceless = false
-
-# version location specification; This defaults
-# to ${script_location}/versions. When using multiple version
-# directories, initial revisions must be specified with --version-path.
-# The path separator used here should be the separator specified by "version_path_separator" below.
-# version_locations = %(here)s/bar:%(here)s/bat:${script_location}/versions
-
-# version path separator; As mentioned above, this is the character used to split
-# version_locations. The default within new alembic.ini files is "os", which uses os.pathsep.
-# If this key is omitted entirely, it falls back to the legacy behavior of splitting on spaces and/or commas.
-# Valid values for version_path_separator are:
-#
-# version_path_separator = :
-# version_path_separator = ;
-# version_path_separator = space
-version_path_separator = os # Use os.pathsep. Default configuration used for new projects.
-
-# the output encoding used when revision files
-# are written from script.py.mako
-# output_encoding = utf-8
-
-[post_write_hooks]
-# post_write_hooks defines scripts or Python functions that are run
-# on newly generated revision scripts. See the documentation for further
-# detail and examples
-
-# format using "black" - use the console_scripts runner, against the "black" entrypoint
-# hooks = black
-# black.type = console_scripts
-# black.entrypoint = black
-# black.options = -l 79 REVISION_SCRIPT_FILENAME
-
-pylons_config_file = ./development.ini
-
-# that's it !
diff --git a/alembic/templates/pylons/env.py b/alembic/templates/pylons/env.py
deleted file mode 100644
index 99bc19e..0000000
--- a/alembic/templates/pylons/env.py
+++ /dev/null
@@ -1,86 +0,0 @@
-"""Pylons bootstrap environment.
-
-Place 'pylons_config_file' into alembic.ini, and the application will
-be loaded from there.
-
-"""
-from logging.config import fileConfig
-
-from paste.deploy import loadapp
-
-from alembic import context
-
-
-try:
- # if pylons app already in, don't create a new app
- from pylons import config as pylons_config
-
- pylons_config["__file__"]
-except:
- config = context.config
- # can use config['__file__'] here, i.e. the Pylons
- # ini file, instead of alembic.ini
- config_file = config.get_main_option("pylons_config_file")
- if config_file is not None:
- fileConfig(config_file)
- wsgi_app = loadapp("config:%s" % config_file, relative_to=".")
-
-
-# customize this section for non-standard engine configurations.
-meta = __import__(
- "%s.model.meta" % wsgi_app.config["pylons.package"]
-).model.meta
-
-# add your model's MetaData object here
-# for 'autogenerate' support
-# from myapp import mymodel
-# target_metadata = mymodel.Base.metadata
-target_metadata = None
-
-
-def run_migrations_offline() -> None:
- """Run migrations in 'offline' mode.
-
- This configures the context with just a URL
- and not an Engine, though an Engine is acceptable
- here as well. By skipping the Engine creation
- we don't even need a DBAPI to be available.
-
- Calls to context.execute() here emit the given string to the
- script output.
-
- """
- context.configure(
- url=meta.engine.url,
- target_metadata=target_metadata,
- literal_binds=True,
- dialect_opts={"paramstyle": "named"},
- )
- with context.begin_transaction():
- context.run_migrations()
-
-
-def run_migrations_online() -> None:
- """Run migrations in 'online' mode.
-
- In this scenario we need to create an Engine
- and associate a connection with the context.
-
- """
- # specify here how the engine is acquired
- # engine = meta.engine
- raise NotImplementedError("Please specify engine connectivity here")
-
- with engine.connect() as connection: # noqa
- context.configure(
- connection=connection, target_metadata=target_metadata
- )
-
- with context.begin_transaction():
- context.run_migrations()
-
-
-if context.is_offline_mode():
- run_migrations_offline()
-else:
- run_migrations_online()
diff --git a/alembic/templates/pylons/script.py.mako b/alembic/templates/pylons/script.py.mako
deleted file mode 100644
index 55df286..0000000
--- a/alembic/templates/pylons/script.py.mako
+++ /dev/null
@@ -1,24 +0,0 @@
-"""${message}
-
-Revision ID: ${up_revision}
-Revises: ${down_revision | comma,n}
-Create Date: ${create_date}
-
-"""
-from alembic import op
-import sqlalchemy as sa
-${imports if imports else ""}
-
-# revision identifiers, used by Alembic.
-revision = ${repr(up_revision)}
-down_revision = ${repr(down_revision)}
-branch_labels = ${repr(branch_labels)}
-depends_on = ${repr(depends_on)}
-
-
-def upgrade() -> None:
- ${upgrades if upgrades else "pass"}
-
-
-def downgrade() -> None:
- ${downgrades if downgrades else "pass"}