Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require 'rubygems'
- require 'active_record'
- ActiveRecord::Base.establish_connection(
- :adapter => "mysql",
- :host => "localhost",
- :database => "listtest",
- :username => "root",
- :password => "mypassword"
- )
- class Parent < ActiveRecord::Base
- has_many :children
- end
- class CreateParents < ActiveRecord::Migration
- def self.up
- create_table :parents do |t|
- end
- end
- def self.down
- drop_table :parents
- end
- end
- CreateParents.up
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement