Sha256: 186b709ae3afbe747fd86e994a3c3856aa19195ed7fe4f552f02b2a38bd5a4f0

Contents?: true

Size: 1.07 KB

Versions: 13

Compression:

Stored size: 1.07 KB

Contents

require "active_record"

ActiveRecord::Base.establish_connection(database: ":memory:", adapter: "sqlite3", timeout: 500)
ActiveRecord::Schema.define do
  create_table :addresses, force: true do |t|
    t.string :street
    t.string :city
    t.string :state
    t.string :post_code
    t.integer :person_id
  end

  create_table :categories, force: true do |t|
    t.string :name
  end

  create_table :posts, force: true do |t|
    t.string :title
    t.text :body
    t.boolean :is_public
    t.float :price
    t.datetime :published_at
    t.date :expire_date
    t.integer :category_id
  end

  create_table :tags, force: true do |t|
    t.string :name
  end

  create_table :posts_tags, force: true do |t|
    t.integer :post_id
    t.integer :tag_id
  end

  create_table :comments, force: true do |t|
    t.text :body
    t.integer :post_id
    t.integer :profile_id
  end

  create_table :preferences, force: true do |t|
    t.string :name
  end

  create_table :profiles, force: true do |t|
    t.string :name
    t.integer :age
    t.string :genere
    t.integer :address_id
  end

end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
lolita-4.0.11 spec/orm/active_record.rb
lolita-4.2.0 spec/orm/active_record.rb
lolita-4.0.10 spec/orm/active_record.rb
lolita-4.0.9 spec/orm/active_record.rb
lolita-4.0.8 spec/orm/active_record.rb
lolita-4.0.7 spec/orm/active_record.rb
lolita-4.0.6 spec/orm/active_record.rb
lolita-4.0.5 spec/orm/active_record.rb
lolita-4.0.4 spec/orm/active_record.rb
lolita-4.0.3 spec/orm/active_record.rb
lolita-4.0.2 spec/orm/active_record.rb
lolita-4.0.1 spec/orm/active_record.rb
lolita-4.0.0 spec/orm/active_record.rb