Sha256: 5d8a69a9180815d1fc17aed2632683809664452bbd580c2ac1d66313fa6e12e5

Contents?: true

Size: 1.02 KB

Versions: 174

Compression:

Stored size: 1.02 KB

Contents

class CreateLibraries < ActiveRecord::Migration
  def self.up
    create_table :libraries do |t|
      t.references :patron, :polymorphic => true
      t.string :name, :null => false
      t.text :display_name
      t.string :short_display_name, :null => false
      t.string :zip_code
      t.text :street
      t.text :locality
      t.text :region
      t.string :telephone_number_1
      t.string :telephone_number_2
      t.string :fax_number
      t.text :note
      t.integer :call_number_rows, :default => 1, :null => false
      t.string :call_number_delimiter, :default => "|", :null => false
      t.integer :library_group_id, :default => 1, :null => false
      t.integer :users_count, :default => 0, :null => false
      t.integer :position
      t.integer :country_id

      t.timestamps
      t.datetime :deleted_at
    end
    add_index :libraries, :patron_id, :unique => true
    add_index :libraries, :library_group_id
    add_index :libraries, :name, :unique => true
  end

  def self.down
    drop_table :libraries
  end
end

Version data entries

174 entries across 174 versions & 4 rubygems

Version Path
enju_circulation-0.1.0.pre29 spec/dummy/db/migrate/059_create_libraries.rb
enju_circulation-0.1.0.pre28 spec/dummy/db/migrate/059_create_libraries.rb
enju_circulation-0.1.0.pre27 spec/dummy/db/migrate/059_create_libraries.rb
enju_circulation-0.1.0.pre26 spec/dummy/db/migrate/059_create_libraries.rb
enju_circulation-0.1.0.pre25 spec/dummy/db/migrate/059_create_libraries.rb
enju_circulation-0.1.0.pre24 spec/dummy/db/migrate/059_create_libraries.rb
enju_circulation-0.1.0.pre23 spec/dummy/db/migrate/059_create_libraries.rb
enju_circulation-0.1.0.pre22 spec/dummy/db/migrate/059_create_libraries.rb
enju_circulation-0.1.0.pre21 spec/dummy/db/migrate/059_create_libraries.rb
enju_event-0.1.17.pre12 spec/dummy/db/migrate/059_create_libraries.rb
enju_inter_library_loan-0.1.0.pre7 spec/dummy/db/migrate/059_create_libraries.rb
enju_circulation-0.1.0.pre20 spec/dummy/db/migrate/059_create_libraries.rb
enju_event-0.1.17.pre11 spec/dummy/db/migrate/059_create_libraries.rb
enju_event-0.1.17.pre10 spec/dummy/db/migrate/059_create_libraries.rb
enju_circulation-0.1.0.pre19 spec/dummy/db/migrate/059_create_libraries.rb
enju_circulation-0.1.0.pre18 spec/dummy/db/migrate/059_create_libraries.rb
enju_event-0.1.17.pre9 spec/dummy/db/migrate/059_create_libraries.rb
enju_circulation-0.1.0.pre17 spec/dummy/db/migrate/059_create_libraries.rb
enju_event-0.1.17.pre8 spec/dummy/db/migrate/059_create_libraries.rb
enju_circulation-0.1.0.pre16 spec/dummy/db/migrate/059_create_libraries.rb