 
             (span {:className "input-group-btn"}
                   (button {:className "btn btn-default" :type "button"
-                           :onClick #(let [table-name    (.. (js/document.getElementById "tablename") -value  )]
-                                       (sql  (str "create table " table-name " (did     integer)") {}
+                           :onClick #(let [table-name    (.. (js/document.getElementById "tablename") -value  )
+                                           create-sql    (str "create table " table-name " (id       serial NOT NULL,tfield    character varying,  CONSTRAINT  " table-name "_PK    PRIMARY KEY (id))")]
+                                       (sql create-sql  {}
                                              (fn [ss]
                                                (do
                                                  (set! (js/document.getElementById "tablename") -value  "")


(defn get-tables []
(remote "!get-list-of-tables"
        {:session-id  (:session-id @webapp.framework.client.system-globals.client-session-atom)}

            (reset! webapp.framework.client.system-globals/app-state (assoc-in @webapp.framework.client.system-globals/app-state [:ui :table-list] result2))))
)
(get-tables)

(defn-ui-component     main   [app] {}
  (div nil
