diff options
author | emkael <emkael@tlen.pl> | 2016-03-12 12:07:11 +0100 |
---|---|---|
committer | emkael <emkael@tlen.pl> | 2016-03-12 12:07:11 +0100 |
commit | 7bb05e12bf767ff0e9894ac984bc36b244bcfcb9 (patch) | |
tree | 1bc61f8615d5d7f3830daaf913876a09f5de11a5 /app/python/rcal | |
parent | 48619109291ed90bd0e11f4be27384ca7a95ddf4 (diff) |
* composite primary key for user preference table
Diffstat (limited to 'app/python/rcal')
-rw-r--r-- | app/python/rcal/model.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/app/python/rcal/model.py b/app/python/rcal/model.py index 705fba2..3ecfceb 100644 --- a/app/python/rcal/model.py +++ b/app/python/rcal/model.py @@ -124,9 +124,11 @@ class Category(BASE): user_selections = Table( 'user_selections', BASE.metadata, Column('_user', Integer, - ForeignKey('users.id', onupdate='CASCADE', ondelete='CASCADE')), + ForeignKey('users.id', onupdate='CASCADE', ondelete='CASCADE'), + primary_key=True), Column('_calendar', String(255), - ForeignKey('calendars.uid', onupdate='CASCADE', ondelete='CASCADE')) + ForeignKey('calendars.uid', onupdate='CASCADE', ondelete='CASCADE'), + primary_key=True) ) |