Sha256: 497d794d78f6ac1e2990a21fb0d962091f6ea09f21c2341c1222fd9bcf91d732

Contents?: true

Size: 942 Bytes

Versions: 30

Compression:

Stored size: 942 Bytes

Contents

class CreateLibraries < ActiveRecord::Migration
  def self.up
    create_table :libraries do |t|
      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, :library_group_id
    add_index :libraries, :name, :unique => true
  end

  def self.down
    drop_table :libraries
  end
end

Version data entries

30 entries across 30 versions & 3 rubygems

Version Path
enju_circulation-0.1.0.pre38 spec/dummy/db/migrate/059_create_libraries.rb
enju_leaf-1.1.0.rc14 spec/dummy/db/migrate/059_create_libraries.rb
enju_circulation-0.1.0.pre37 spec/dummy/db/migrate/059_create_libraries.rb
enju_leaf-1.1.0.rc13 spec/dummy/db/migrate/059_create_libraries.rb
enju_circulation-0.1.0.pre36 spec/dummy/db/migrate/059_create_libraries.rb
enju_circulation-0.1.0.pre35 spec/dummy/db/migrate/059_create_libraries.rb
enju_circulation-0.1.0.pre34 spec/dummy/db/migrate/059_create_libraries.rb
enju_circulation-0.1.0.pre33 spec/dummy/db/migrate/059_create_libraries.rb
enju_circulation-0.1.0.pre32 spec/dummy/db/migrate/059_create_libraries.rb
enju_circulation-0.1.0.pre31 spec/dummy/db/migrate/059_create_libraries.rb