Sfoglia il codice sorgente

Add instruction to insert missing storages

DricomDragon 5 anni fa
parent
commit
dcb11a1fd1
1 ha cambiato i file con 2 aggiunte e 0 eliminazioni
  1. 2 0
      SQL/plpgsql/create_add_missing_stocks.sql

+ 2 - 0
SQL/plpgsql/create_add_missing_stocks.sql

@@ -30,6 +30,8 @@ BEGIN
             IF stoQuantity IS NULL
             THEN
                 RAISE NOTICE 'Pro % for war % not available', proId, warId;
+                INSERT INTO Stock(pro_id, war_id) VALUES (proId, warId);
+                RAISE NOTICE '- Pro % for war % was inserted', proId, warId;
             ELSE 
                 RAISE NOTICE 'Pro % for war % stores %', proId, warId, stoQuantity;
             END IF;