Sha256: d14608ac0dfe19fd0314b4542052235476b79cd7b22dc4ef2d97ec481b3e023e

Contents?: true

Size: 1.86 KB

Versions: 9

Compression:

Stored size: 1.86 KB

Contents

class SetupHasAccountsEngine < ActiveRecord::Migration
  def self.up
    create_table "account_types" do |t|
      t.string   "name",       :limit => 100
      t.string   "title",      :limit => 100
      t.datetime "created_at"
      t.datetime "updated_at"
    end

    create_table "accounts" do |t|
      t.string   "title",           :limit => 100
      t.integer  "parent_id"
      t.integer  "account_type_id"
      t.integer  "number"
      t.string   "code"
      t.integer  "type"
      t.integer  "holder_id"
      t.string   "holder_type"
      t.integer  "bank_id"
      t.integer  "esr_id"
      t.integer  "pc_id"
      t.datetime "created_at"
      t.datetime "updated_at"
    end

    add_index "accounts", ["bank_id"], :name => "index_accounts_on_bank_id"
    add_index "accounts", ["code"], :name => "index_accounts_on_code"
    add_index "accounts", ["holder_id", "holder_type"], :name => "index_accounts_on_holder_id_and_holder_type"
    add_index "accounts", ["type"], :name => "index_accounts_on_type"

    create_table "banks" do |t|
      t.integer  "vcard_id"
      t.datetime "created_at"
      t.datetime "updated_at"
    end

    create_table "bookings" do |t|
      t.string   "title",             :limit => 100
      t.decimal  "amount"
      t.integer  "credit_account_id"
      t.integer  "debit_account_id"
      t.date     "value_date"
      t.text     "comments",          :limit => 1000, :default => ""
      t.string   "scan"
      t.string   "debit_currency",                    :default => "CHF"
      t.string   "credit_currency",                   :default => "CHF"
      t.float    "exchange_rate",                     :default => 1.0
      t.datetime "created_at"
      t.datetime "updated_at"
      t.integer  "reference_id"
      t.string   "reference_type"
    end
  end

  def self.down
    drop_table :account_types, :accounts, :banks, :bookings
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
has_accounts-0.9.2 lib/generators/has_accounts/templates/migration.rb
has_accounts-0.9.1 lib/generators/has_accounts/templates/migration.rb
has_accounts-0.9.0 lib/generators/has_accounts/templates/migration.rb
has_accounts-0.8.3 lib/generators/has_accounts/templates/migration.rb
has_accounts-0.8.2 lib/generators/has_accounts/templates/migration.rb
has_accounts-0.8.1 lib/generators/has_accounts/templates/migration.rb
has_accounts-0.8.0 lib/generators/has_accounts/templates/migration.rb
has_accounts-0.7.1 lib/generators/has_accounts/templates/migration.rb
has_accounts-0.7.0 lib/generators/has_accounts/templates/migration.rb