新月実装開発部

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"]))))
```
Powered by shinGETsu.