Skip to content

Instantly share code, notes, and snippets.

@kumarshantanu
Created August 24, 2010 19:50
Show Gist options
  • Select an option

  • Save kumarshantanu/548180 to your computer and use it in GitHub Desktop.

Select an option

Save kumarshantanu/548180 to your computer and use it in GitHub Desktop.
(def blog-entry-meta
(entity-meta :entry :autoid (from-row BlogEntry.)
:cols [[:autoid :int "NOT NULL PRIMARY KEY AUTO_INCREMENT"]
[:title "varchar(30)" "NOT NULL"]
[:content "varchar(500)" "NOT NULL"]
[:whenposted "DATETIME" "NOT NULL"]
[:isdeleted "BOOLEAN" "NOT NULL DEFAULT false"]] ))
(def entry-comment-meta
(entity-meta :comment :autoid (from-row EntryComment.)
:cols [[:autoid :int "NOT NULL PRIMARY KEY AUTO_INCREMENT"]
[:entryid :int "NOT NULL"]
[:content "varchar(500)" "NOT NULL"]
[:name "varchar(50)" "NOT NULL"]
[:email "varchar(50)" "NOT NULL"]
[:url "varchar(100)"]
[:whenposted "DATETIME" "NOT NULL"]
[:isdeleted "BOOLEAN" "NOT NULL DEFAULT false"]] ))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment