Fix table sorting for FK reference column in new table wizard
also add LargeBinary data type option
This commit is contained in:
parent
2f8411ba2f
commit
45b8d9fb84
2 changed files with 4 additions and 6 deletions
|
@ -24,13 +24,10 @@
|
|||
Views with info about the underlying Rattail tables
|
||||
"""
|
||||
|
||||
from __future__ import unicode_literals, absolute_import
|
||||
|
||||
import os
|
||||
import sys
|
||||
import warnings
|
||||
|
||||
import six
|
||||
from sqlalchemy_utils import get_mapper
|
||||
|
||||
from rattail.util import simple_error
|
||||
|
@ -203,8 +200,8 @@ class TableView(MasterView):
|
|||
branch_name = None
|
||||
kwargs['branch_name'] = branch_name
|
||||
|
||||
kwargs['existing_tables'] = [{'name': table.name}
|
||||
for table in model.Base.metadata.sorted_tables]
|
||||
kwargs['existing_tables'] = [{'name': table}
|
||||
for table in sorted(model.Base.metadata.tables)]
|
||||
|
||||
kwargs['model_dir'] = (os.path.dirname(model.__file__)
|
||||
+ os.sep)
|
||||
|
@ -294,7 +291,7 @@ class TableView(MasterView):
|
|||
'column': column,
|
||||
'sequence': i,
|
||||
'column_name': column.name,
|
||||
'data_type': six.text_type(repr(column.type)),
|
||||
'data_type': str(repr(column.type)),
|
||||
'nullable': column.nullable,
|
||||
'description': column.doc,
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue