# -*- coding: utf-8 -*-
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Alembic migration environment (configuration).
import logging
import os
from logging.config import fileConfig
from alembic import context
from sqlalchemy import engine_from_config, pool
from kallithea.model import db
# The alembic.config.Config object, which wraps the current .ini file.
config = context.config
# Default to use the main Kallithea database string in [app:main].
# For advanced uses, this can be overridden by specifying an explicit
# [alembic] sqlalchemy.url.
database_url = (
config.get_main_option('sqlalchemy.url') or
config.get_section_option('app:main', 'sqlalchemy.url')
)
# Configure default logging for Alembic. (This can be overriden by the
# config file, but usually isn't.)
logging.getLogger('alembic').setLevel(logging.INFO)
# Setup Python loggers based on the config file provided to the alembic
Status change: