Skip to content

Instantly share code, notes, and snippets.

@fteem
Created December 1, 2011 01:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fteem/1412726 to your computer and use it in GitHub Desktop.
Save fteem/1412726 to your computer and use it in GitHub Desktop.
My Posts table config
DataMapper::setup(:default, "sqlite3://#{Dir.pwd}/blog.db")
class Post
include DataMapper::Resource
property :id, Serial
property :title, String
property :body, Text
property :created_at, DateTime
property :updated_at, DateTime
end
DataMapper.finalize
Post.auto_migrate! unless Post.storage_exists?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment