diff --git a/pokedex/db/__init__.py b/pokedex/db/__init__.py index 37b3746..0bb1705 100644 --- a/pokedex/db/__init__.py +++ b/pokedex/db/__init__.py @@ -49,7 +49,7 @@ def connect(uri=None, session_args={}, engine_args={}, engine_prefix=''): # Easy solution : drop the vowels, differents words are unlikely to # end up the same after the vowels are gone for table in metadata.tables.values(): - table.description = table.name[:] + table._orginal_name = table.name[:] if len(table.name) > 30: for letter in ['a', 'e', 'i', 'o', 'u', 'y']: table.name=table.name.replace(letter,'') diff --git a/pokedex/db/load.py b/pokedex/db/load.py index 782c19e..bc52578 100644 --- a/pokedex/db/load.py +++ b/pokedex/db/load.py @@ -147,12 +147,12 @@ def load(session, tables=[], directory=None, drop_tables=False, verbose=False, s # Shorten table names, Oracle limits table and column names to 30 chars for table in table_objs: - tname = table.name[:] - oradict[tname]=table.description - if len(tname) > 30: + table._orginal_name = table.name[:] + oradict[table.name]=table._orginal_name + if len(table._orginal_name) > 30: for letter in ['a', 'e', 'i', 'o', 'u', 'y']: table.name=table.name.replace(letter,'') - oradict[tname]=table.description + oradict[table.name]=table._orginal_name if recursive: table_objs.extend(find_dependent_tables(table_objs))