Browse Source

Triggers seem to work

Eren Yilmaz 5 years ago
parent
commit
b18b281c56
1 changed files with 2 additions and 2 deletions
  1. 2 2
      db_setup.py

+ 2 - 2
db_setup.py

@@ -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