Sha256: 4ef04a6bddf828b0ce3e22855f6c9e3be77024b0bd8ad7bcb43459c7deba591d

Contents?: true

Size: 367 Bytes

Versions: 19

Compression:

Stored size: 367 Bytes

Contents

class CreateShopsIfNotExistent < ActiveRecord::Migration

  def change
    unless table_exists? :shops or table_exists? :disco_app_shops
      create_table :shops  do |t|
        t.string :shopify_domain, null: false
        t.string :shopify_token, null: false
        t.timestamps
      end

      add_index :shops, :shopify_domain, unique: true
    end
  end

end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
disco_app-0.6.0 db/migrate/20150525000000_create_shops_if_not_existent.rb
disco_app-0.6.1 db/migrate/20150525000000_create_shops_if_not_existent.rb
disco_app-0.6.2 db/migrate/20150525000000_create_shops_if_not_existent.rb
disco_app-0.6.3 db/migrate/20150525000000_create_shops_if_not_existent.rb
disco_app-0.6.4 db/migrate/20150525000000_create_shops_if_not_existent.rb
disco_app-0.6.5 db/migrate/20150525000000_create_shops_if_not_existent.rb
disco_app-0.6.6 db/migrate/20150525000000_create_shops_if_not_existent.rb
disco_app-0.6.7 db/migrate/20150525000000_create_shops_if_not_existent.rb
disco_app-0.6.8 db/migrate/20150525000000_create_shops_if_not_existent.rb
disco_app-0.6.9 db/migrate/20150525000000_create_shops_if_not_existent.rb
disco_app-0.7.0 db/migrate/20150525000000_create_shops_if_not_existent.rb
disco_app-0.7.1 db/migrate/20150525000000_create_shops_if_not_existent.rb
disco_app-0.7.2 db/migrate/20150525000000_create_shops_if_not_existent.rb
disco_app-0.8.0 db/migrate/20150525000000_create_shops_if_not_existent.rb
disco_app-0.8.1 db/migrate/20150525000000_create_shops_if_not_existent.rb
disco_app-0.8.2 db/migrate/20150525000000_create_shops_if_not_existent.rb
disco_app-0.8.3 db/migrate/20150525000000_create_shops_if_not_existent.rb
disco_app-0.8.4 db/migrate/20150525000000_create_shops_if_not_existent.rb
disco_app-0.8.5 db/migrate/20150525000000_create_shops_if_not_existent.rb