Sha256: 7866b3b97147dad03734e67383811e0bb2d51be1905d4691c31f0e22b1332515

Contents?: true

Size: 701 Bytes

Versions: 4

Compression:

Stored size: 701 Bytes

Contents

class CreateThecoreSettings < ActiveRecord::Migration[7.0]
  def change
    create_table :thecore_settings, if_not_exists: true 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 :thecore_settings, :key
    add_index :thecore_settings, [:ns, :key], unique: true
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
thecore_settings-3.0.8 db/migrate/20161227101955_create_thecore_settings.rb
thecore_settings-3.0.7 db/migrate/20161227101955_create_thecore_settings.rb
thecore_settings-3.0.6 db/migrate/20161227101955_create_thecore_settings.rb
thecore_settings-3.0.5 db/migrate/20161227101955_create_thecore_settings.rb