Guest User

Untitled

a guest
May 17th, 2018
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. desc 'Creating sqlite database for subscribtions'
  2. task :create_db do
  3. DataMapper.setup(:default, {
  4. :adapter => 'mysql',
  5. :database => "snowy",
  6. :username => 'root',
  7. :password => '',
  8. :host => 'localhost'
  9. })
  10.  
  11. class Subscription
  12. include DataMapper::Resource
  13.  
  14. property :id, Serial
  15. property :mail, String
  16. property :city, String
  17. property :status, String
  18. property :activation_code, String
  19. end
  20. Subscription.auto_migrate!
  21. end
Add Comment
Please, Sign In to add comment