Skip to content

Instantly share code, notes, and snippets.

@robbielamb
Created December 2, 2009 16:23
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 robbielamb/247324 to your computer and use it in GitHub Desktop.
Save robbielamb/247324 to your computer and use it in GitHub Desktop.
#!/usr/bin/env jruby
require 'rubygems'
require 'dm-core'
DataMapper.setup(:default, 'postgres://localhost/test')
# DataMapper.setup(:default, 'mysql://localhost/test')
class Square
include DataMapper::Resource
property :id, Serial
property :width, Float
end
DataMapper.auto_migrate!
Square.create(:width => '02.4')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment