From 79b7424746c7636cd23a7869169431afa6941b06 Mon Sep 17 00:00:00 2001
From: Sebastian Reichel <sre@ring0.de>
Date: Sat, 8 Dec 2012 23:35:33 +0100
Subject: rename table sells -> sales

---
 sql/trigger.sql | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

(limited to 'sql/trigger.sql')

diff --git a/sql/trigger.sql b/sql/trigger.sql
index 8a9bede..d26a39d 100644
--- a/sql/trigger.sql
+++ b/sql/trigger.sql
@@ -12,15 +12,15 @@ CREATE TRIGGER IF NOT EXISTS update_product_amount_on_restock_update AFTER UPDAT
 	UPDATE products SET amount = products.amount + NEW.amount WHERE products.id = NEW.product;
 END;
 
-CREATE TRIGGER IF NOT EXISTS update_product_amount_on_sells_insert AFTER INSERT ON sells BEGIN
+CREATE TRIGGER IF NOT EXISTS update_product_amount_on_sales_insert AFTER INSERT ON sales BEGIN
 	UPDATE products SET amount = products.amount - 1 WHERE products.id = NEW.product;
 END;
 
-CREATE TRIGGER IF NOT EXISTS update_product_amount_on_sells_delete AFTER DELETE ON sells BEGIN
+CREATE TRIGGER IF NOT EXISTS update_product_amount_on_sales_delete AFTER DELETE ON sales BEGIN
 	UPDATE products SET amount = products.amount + 1 WHERE products.id = OLD.product;
 END;
 
-CREATE TRIGGER IF NOT EXISTS update_product_amount_on_sells_update AFTER UPDATE ON sells BEGIN
+CREATE TRIGGER IF NOT EXISTS update_product_amount_on_sales_update AFTER UPDATE ON sales BEGIN
 	UPDATE products SET amount = products.amount + 1 WHERE products.id = OLD.product;
 	UPDATE products SET amount = products.amount - 1 WHERE products.id = NEW.product;
 END;
-- 
cgit v1.2.3

