Add an alembic migration for the full initial database with the data. Switch LDAP to using bind and creating a federated login entry. Add LDAP support to the registry and index endpoints. Add a username transliteration and suggestion mechanism. Switch the database and model to require a manual initialization call.

This commit is contained in:
Jake Moshenko 2014-05-13 12:17:26 -04:00
parent 08ccad7fe4
commit 5fdccfe3e6
12 changed files with 739 additions and 75 deletions

View file

@ -2,6 +2,7 @@ from __future__ import with_statement
from alembic import context
from sqlalchemy import engine_from_config, pool
from logging.config import fileConfig
from urllib import unquote
from data.database import all_models
from app import app
@ -10,7 +11,7 @@ from data.model.sqlalchemybridge import gen_sqlalchemy_metadata
# this is the Alembic Config object, which provides
# access to the values within the .ini file in use.
config = context.config
config.set_main_option('sqlalchemy.url', app.config['DB_URI'])
config.set_main_option('sqlalchemy.url', unquote(app.config['DB_URI']))
# Interpret the config file for Python logging.
# This line sets up loggers basically.
@ -39,7 +40,7 @@ def run_migrations_offline():
script output.
"""
url = app.config['DB_CONNECTION']
url = unquote(app.config['DB_URI'])
context.configure(url=url, target_metadata=target_metadata)
with context.begin_transaction():