Sha256: 062a70a3fb19513072bfeea715a7437ed26f6a9805feb17b57bef61105e9db0c

Contents?: true

Size: 858 Bytes

Versions: 3

Compression:

Stored size: 858 Bytes

Contents

# This migration comes from spree (originally 20140309024355)
class CreateSpreeStores < ActiveRecord::Migration[4.2]
  def change
    if data_source_exists?(:spree_stores)
      rename_column :spree_stores, :domains, :url
      rename_column :spree_stores, :email, :mail_from_address
      add_column :spree_stores, :meta_description, :text
      add_column :spree_stores, :meta_keywords, :text
      add_column :spree_stores, :seo_title, :string
    else
      create_table :spree_stores do |t|
        t.string :name
        t.string :url
        t.text :meta_description
        t.text :meta_keywords
        t.string :seo_title
        t.string :mail_from_address
        t.string :default_currency
        t.string :code
        t.boolean :default, default: false, null: false

        t.timestamps null: false, precision: 6
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 2 rubygems

Version Path
spree_purchase_order-3.7.0 spec/dummy/db/migrate/20191113195842_create_spree_stores.spree.rb
spree_billing_sisow-0.9.2 spec/dummy/db/migrate/20190729091783_create_spree_stores.spree.rb
spree_billing_sisow-0.9.1 spec/dummy/db/migrate/20190729091783_create_spree_stores.spree.rb