summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/sql/base.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2014-04-19 12:31:19 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2014-04-19 12:31:19 -0400
commitc33d0378802abbc729de55ba205a4309e5d68f6b (patch)
tree1e8994db447e9908827c6494db8d0241a7a6de52 /lib/sqlalchemy/sql/base.py
parent1fb4ad75a38ce84d0e7b170927025500b73b5519 (diff)
downloadsqlalchemy-c33d0378802abbc729de55ba205a4309e5d68f6b.tar.gz
- Liberalized the contract for :class:`.Index` a bit in that you can
specify a :func:`.text` expression as the target; the index no longer needs to have a table-bound column present if the index is to be manually added to the table, either via inline declaration or via :meth:`.Table.append_constraint`. fixes #3028
Diffstat (limited to 'lib/sqlalchemy/sql/base.py')
-rw-r--r--lib/sqlalchemy/sql/base.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/sqlalchemy/sql/base.py b/lib/sqlalchemy/sql/base.py
index 59f30ed69..28f324ad9 100644
--- a/lib/sqlalchemy/sql/base.py
+++ b/lib/sqlalchemy/sql/base.py
@@ -489,6 +489,9 @@ class ColumnCollection(util.OrderedProperties):
for this dictionary.
"""
+ if not column.key:
+ raise exc.ArgumentError(
+ "Can't add unnamed column to column collection")
self[column.key] = column
def __delitem__(self, key):