diff --git a/pokedex/db/__init__.py b/pokedex/db/__init__.py index 6a191d1..ddcf799 100644 --- a/pokedex/db/__init__.py +++ b/pokedex/db/__init__.py @@ -6,7 +6,6 @@ from sqlalchemy import engine_from_config, orm from ..defaults import get_default_db_uri from .tables import Language, metadata from .multilang import MultilangSession, MultilangScopedSession -from .oracle import rewrite_long_table_names, restore_long_table_names ENGLISH_ID = 9 @@ -46,15 +45,6 @@ def connect(uri=None, session_args={}, engine_args={}, engine_prefix=''): if 'auto_setinputsizes' not in uri: uri += '?auto_setinputsizes=FALSE' - # Shorten table names, Oracle limits table and column names to 30 chars - # Easy solution : drop the vowels, differents words are unlikely to - # end up the same after the vowels are gone - rewrite_long_table_names(metadata.tables) - else: - restore_long_table_names(metadata.tables) - - - ### Connect engine_args[engine_prefix + 'url'] = uri engine = engine_from_config(engine_args, prefix=engine_prefix) diff --git a/pokedex/db/load.py b/pokedex/db/load.py index bc52578..89e82c3 100644 --- a/pokedex/db/load.py +++ b/pokedex/db/load.py @@ -138,7 +138,7 @@ def load(session, tables=[], directory=None, drop_tables=False, verbose=False, s table_names = _get_table_names(metadata, tables) table_objs = [metadata.tables[name] for name in table_names] - # Oracle fixery again, load doesn't know we modified the schema + # Oracle fixery, load needs short names # flag for oracle stuff oranames = (session.connection().dialect.name == 'oracle') if oranames: