新月実装開発部

eb88658c anonymous 2015-12-12 00:03
@markdown
ファイル用のテーブルを作成。またどうせ後で変更するんだろうけど…
```clojure
(defn create-files-table
  [db-spec]
  (let [{:keys [id blob varchar varchar-ignorecase-unique]} (db-types db-spec)]
    (sql/db-do-commands
      db-spec
      (sql/create-table-ddl
        :files
        [:id           id]
        [:file_name    varchar-ignorecase-unique "NOT NULL"]
        [:application    varchar-ignorecase-unique "NOT NULL"]
        [:time_created "TIMESTAMP NULL"]
        [:time_first_post "TIMESTAMP NULL"]
        [:time_updated "TIMESTAMP NULL"]
        [:num_records "INTEGER DEFAULT 0"]
        [:num_deleted_records "INTEGER DEFAULT 0"]))))
```

Top of this page. | <<last 0 1 2 3 | Archive | Mobile

limit: 1536KB

(新月実装開発部/200/0.1MB)

Powered by shinGETsu.