소스 검색

Fix triggers

Eren Yilmaz 6 년 전
부모
커밋
886152ee63
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      db_setup.py

+ 2 - 2
db_setup.py

@@ -158,7 +158,7 @@ def create_triggers(cursor):
     cursor.execute('''
                 CREATE TRIGGER IF NOT EXISTS not_more_ordered_than_available_after_insert
                 AFTER INSERT ON orders
-                WHEN 0 <= 
+                WHEN 0 >
                     -- sell_ordered_amount
                     (SELECT COALESCE(SUM(orders.ordered_amount - orders.executed_amount),0)
                      FROM orders, ownership
@@ -174,7 +174,7 @@ def create_triggers(cursor):
     cursor.execute('''
                 CREATE TRIGGER IF NOT EXISTS not_more_ordered_than_available_after_update
                 AFTER UPDATE ON orders
-                WHEN 0 <= 
+                WHEN 0 >
                     -- sell_ordered_amount
                     (SELECT COALESCE(SUM(orders.ordered_amount - orders.executed_amount),0)
                      FROM orders, ownership