Sha256: 1e9163423e1c07a1864c95320834f5ea51558742ea1c05bf4743bc0bf53372d8

Contents?: true

Size: 691 Bytes

Versions: 28

Compression:

Stored size: 691 Bytes

Contents

class CreateRailsAdminSettings < ActiveRecord::Migration
  def change
    create_table :rails_admin_settings do |t|
      t.boolean :enabled, default: true
      t.string :kind, null: false, default: 'string'
      t.string :ns, default: 'main'
      t.string :key, null: false
      if Object.const_defined?('Geocoder')
        t.float :latitude
        t.float :longitude
      end
      t.text :raw
      t.string :label
      if defined?(Paperclip)
        t.attachment :file
      elsif defined?(CarrierWave)
        t.string :file
      end
      t.timestamps
    end

    add_index :rails_admin_settings, :key
    add_index :rails_admin_settings, [:ns, :key], unique: true
  end
end

Version data entries

28 entries across 28 versions & 2 rubygems

Version Path
ack_rails_admin_settings-1.2.3.3 lib/generators/rails_admin_settings/templates/migration.rb
ack_rails_admin_settings-1.2.3.2 lib/generators/rails_admin_settings/templates/migration.rb
ack_rails_admin_settings-1.2.3.1 lib/generators/rails_admin_settings/templates/migration.rb
ack_rails_admin_settings-1.2.3 lib/generators/rails_admin_settings/templates/migration.rb
rails_admin_settings-1.2.1 lib/generators/rails_admin_settings/templates/migration.rb
rails_admin_settings-1.2.0 lib/generators/rails_admin_settings/templates/migration.rb
ack_rails_admin_settings-1.2.2.1 lib/generators/rails_admin_settings/templates/migration.rb
ack_rails_admin_settings-1.2.2 lib/generators/rails_admin_settings/templates/migration.rb
ack_rails_admin_settings-1.2.1.3 lib/generators/rails_admin_settings/templates/migration.rb
ack_rails_admin_settings-1.2.1.2 lib/generators/rails_admin_settings/templates/migration.rb
ack_rails_admin_settings-1.2.1.1 lib/generators/rails_admin_settings/templates/migration.rb
ack_rails_admin_settings-1.2.1 lib/generators/rails_admin_settings/templates/migration.rb
ack_rails_admin_settings-1.2.0.2 lib/generators/rails_admin_settings/templates/migration.rb
rails_admin_settings-1.1.4 lib/generators/rails_admin_settings/templates/migration.rb
ack_rails_admin_settings-1.2.0.1 lib/generators/rails_admin_settings/templates/migration.rb
ack_rails_admin_settings-1.1.5 lib/generators/rails_admin_settings/templates/migration.rb
ack_rails_admin_settings-1.1.4 lib/generators/rails_admin_settings/templates/migration.rb
rails_admin_settings-1.1.3 lib/generators/rails_admin_settings/templates/migration.rb
rails_admin_settings-1.1.2 lib/generators/rails_admin_settings/templates/migration.rb
rails_admin_settings-1.1.0.pre.1 lib/generators/rails_admin_settings/templates/migration.rb