Sha256: 3c33bc9c76086d7d1049f056fbeac54447d57452f45f5abf46404732547dff4a

Contents?: true

Size: 895 Bytes

Versions: 1

Compression:

Stored size: 895 Bytes

Contents

class CreateLibraries < ActiveRecord::Migration[5.1]
  def change
    create_table :libraries, id: :uuid, default: 'gen_random_uuid()' do |t|
      t.string :name, null: false, index: {unique: true}
      t.jsonb :display_name_translations
      t.jsonb :short_display_name_translations
      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
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
enju_seed-0.4.0.beta.1 spec/dummy/db/migrate/059_create_libraries.rb