 
         coils-trigger-exists   (pos? (count coils-trigger))
 
+        sql-to-drop-trigger    (str "DROP TRIGGER IF EXISTS trigger_afterinsert ON " table-name ";")
       sql-to-insert-trigger-row "
 INSERT INTO coils_triggers
 (




(defn make-log-table-trigger-function []
    (let [coils-trigger-fn-exists-result      (korma.core/exec-raw
                                                  ["select exists(select * from pg_proc where proname = 'trigger_function_afterinsert');" []]
                                                  :results)

        (if (not coils-trigger-exists )
        (do
            (korma.core/exec-raw   [sql-to-insert-trigger-row [table-name  coils-tables-trigger-version]]   [])
            (korma.core/exec-raw   [sql-to-drop-trigger []]   [])
            (korma.core/exec-raw   [sql-to-create-insert-trigger []]   [])
            (korma.core/exec-raw   [sql-to-create-update-trigger []]   [])

                      )
                      nil
