Skip to content

Commit

Permalink
[#1705] Add vocabulary column to tag table
Browse files Browse the repository at this point in the history
  • Loading branch information
Sean Hammond committed Jan 30, 2012
1 parent dd19ce6 commit ba1f50e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion ckan/model/tag.py
Expand Up @@ -7,6 +7,7 @@
from domain_object import DomainObject
from package import Package
from core import *
import vocabulary

__all__ = ['tag_table', 'package_tag_table', 'Tag', 'PackageTag',
'PackageTagRevision', 'package_tag_revision_table',
Expand All @@ -17,7 +18,11 @@

tag_table = Table('tag', metadata,
Column('id', types.UnicodeText, primary_key=True, default=make_uuid),
Column('name', types.Unicode(MAX_TAG_LENGTH), nullable=False, unique=True),
Column('name', types.Unicode(MAX_TAG_LENGTH), nullable=False,
unique=True),
Column('vocabulary_id',
types.Unicode(vocabulary.VOCABULARY_NAME_MAX_LENGTH),
ForeignKey('vocabulary.id'))
)

package_tag_table = Table('package_tag', metadata,
Expand Down

0 comments on commit ba1f50e

Please sign in to comment.