Created
December 1, 2011 01:55
-
-
Save fteem/1412726 to your computer and use it in GitHub Desktop.
My Posts table config
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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