|
@@ -170,7 +170,7 @@ def create_triggers(cursor):
|
|
|
FROM ownership
|
|
|
WHERE ownership.rowid = NEW.ownership_id)
|
|
|
BEGIN SELECT RAISE(ROLLBACK, 'Can not order more than you own available.'); END
|
|
|
- ''') # TODO test these triggers
|
|
|
+ ''')
|
|
|
cursor.execute('''
|
|
|
CREATE TRIGGER IF NOT EXISTS not_more_ordered_than_available_after_update
|
|
|
AFTER UPDATE ON orders
|
|
@@ -186,7 +186,7 @@ def create_triggers(cursor):
|
|
|
FROM ownership
|
|
|
WHERE ownership.rowid = NEW.ownership_id)
|
|
|
BEGIN SELECT RAISE(ROLLBACK, 'Can not order more than you own available.'); END
|
|
|
- ''') # TODO test these triggers
|
|
|
+ ''')
|
|
|
cursor.execute('''
|
|
|
CREATE TRIGGER IF NOT EXISTS expiry_dt_in_future_after_insert
|
|
|
AFTER INSERT ON orders
|