Skip to content

Commit

Permalink
Tue monen kentän indeksejä
Browse files Browse the repository at this point in the history
  • Loading branch information
tatut committed Sep 14, 2016
1 parent f5bba25 commit 5cdb648
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sekalaista/taulun_partitiointi.clj
Expand Up @@ -33,7 +33,7 @@
(str/join
"\n"
(map #(str "CREATE " (when uniikki? "UNIQUE ")
"INDEX " (:taulu %) "_" kentta "_idx"
"INDEX " (:taulu %) "_" (str/replace kentta #"," "_") "_idx"
" ON " (:taulu %) " (" kentta ");")
taulut)))

Expand Down Expand Up @@ -76,6 +76,7 @@
"\n\n-- Luo indeksit osille\n"
(luo-indeksimaaritykset partitiot "id" true) "\n"
(luo-indeksimaaritykset partitiot "urakka" false)
(luo-indeksimaaritykset partitiot "ulkoinen_id,luoja" true)
"\n\n-- Luo insert trigger\n"
(luo-insert-trigger partitiot "aika" "date")

Expand Down

0 comments on commit 5cdb648

Please sign in to comment.