Sha256: 18d35c962968ea8ec8b0c849289a0bd3961d6ddcfccc9cacb306d62cc28eea2b

Contents?: true

Size: 1.2 KB

Versions: 2

Compression:

Stored size: 1.2 KB

Contents

ActiveRecord::Base.establish_connection(:adapter => "sqlite3", :database => ":memory:")

ActiveRecord::Schema.define(:version => 1) do

  create_table :banyan_categories do |t|
    t.string   :tag
    t.integer  :parent_id
    t.integer  :lft
    t.integer  :rgt
  end

  create_table :banyan_categories_category_groups, :id => false do |t|
    t.integer :category_id
    t.integer :category_group_id
  end

  create_table :banyan_categorizations do |t|
    t.integer  :category_id
    t.integer  :categorizable_id
    t.string   :categorizable_type
  end

  create_table :banyan_category_groups do |t|
    t.string   :tag
    t.integer  :group_categorizable_id
    t.string   :group_categorizable_type
    t.integer  :parent_id
    t.integer  :lft
    t.integer  :rgt
  end

  Banyan::Category.create_translation_table! :name => :string
  Banyan::CategoryGroup.create_translation_table! :name => :string

  add_index :banyan_categories, :tag, :unique => true
  add_index :banyan_category_groups, :tag, :unique => true

  create_table :banyan_models do |t|
    t.integer  :banyan_group_model_id
    t.timestamps
  end

  create_table :banyan_group_models do |t|
  end

  create_table :banyan_single_group_models do |t|
  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
banyan-1.1.1 spec/support/00_schema.rb
banyan-1.0.1 spec/support/00_schema.rb