Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot Generate Migration for Refinery Extension #3424

Open
mzagaja opened this issue Jan 29, 2019 · 1 comment
Open

Cannot Generate Migration for Refinery Extension #3424

mzagaja opened this issue Jan 29, 2019 · 1 comment

Comments

@mzagaja
Copy link

mzagaja commented Jan 29, 2019

After creating an extension called "Stories" I would like to rename the field "email" to "name" because I would prefer the user just provide their name instead of email.

cd vendor/extensions/stories
rails g migration RenameStoryEMailToName
Please first run 'rake refinery:testing:dummy_app' to create a dummy Refinery CMS application.
rake refinery:testing:dummy_app
Initialized empty Git repository in /Users/mzagaja/Developer/digitalhub/vendor/extensions/stories/spec/dummy/.git/
      create  config/master.key
      append  .gitignore
Copied migration 20190129151851_create_stories_stories.refinery_stories.rb from refinery_stories
Copied migration 20190129151852_create_refinerycms_images_schema.refinery_images.rb from refinery_images
Copied migration 20190129151853_remove_image_ext_from_refinery_images.refinery_images.rb from refinery_images
Copied migration 20190129151854_add_title_and_alt_to_refinery_images.refinery_images.rb from refinery_images
Copied migration 20190129151855_translate_refinery_images.refinery_images.rb from refinery_images
Copied migration 20190129151856_remove_translated_columns_from_refinery_images.refinery_images.rb from refinery_images
Copied migration 20190129151857_add_parent_id_to_refinery_images.refinery_images.rb from refinery_images
Copied migration 20190129151858_create_refinerycms_resources_schema.refinery_resources.rb from refinery_resources
Copied migration 20190129151859_add_translated_title_to_refinery_resources.refinery_resources.rb from refinery_resources
Copied migration 20190129151860_create_refinerycms_pages_schema.refinery_pages.rb from refinery_pages
Copied migration 20190129151861_add_custom_slug_to_refinery_pages.refinery_pages.rb from refinery_pages
Copied migration 20190129151862_add_slug_to_refinery_page_parts.refinery_pages.rb from refinery_pages
Copied migration 20190129151863_update_slug_and_title_in_refinery_page_parts.refinery_pages.rb from refinery_pages
Copied migration 20190129151864_fix_slug_format_in_refinery_page_parts.refinery_pages.rb from refinery_pages
Copied migration 20190129151865_remove_translated_columns_to_refinery_pages.refinery_pages.rb from refinery_pages
Copied migration 20190129151866_remove_translated_columns_to_refinery_page_parts.refinery_pages.rb from refinery_pages
Copied migration 20190129151867_add_children_count_to_refinery_pages.refinery_pages.rb from refinery_pages
Copied migration 20190129151868_create_seo_meta.seo_meta.rb from seo_meta
Copied migration 20190129151869_remove_meta_keywords_from_seo_meta.seo_meta.rb from seo_meta
Created database 'dummy_dev'
Created database 'dummy_test'
== 20190129151851 CreateStoriesStories: migrating =============================
-- create_table(:refinery_stories)
   -> 0.0015s
-- create_table(:refinery_story_translations)
   -> 0.0005s
-- add_index(:refinery_story_translations, :locale, {:name=>:index_refinery_story_translations_on_locale})
   -> 0.0011s
-- add_index(:refinery_story_translations, [:refinery_story_id, :locale], {:name=>:index_845caebe798a0afcd0ff8f6d31a500cb83b87df7, :unique=>true})
   -> 0.0007s
== 20190129151851 CreateStoriesStories: migrated (0.0041s) ====================

== 20190129151852 CreateRefinerycmsImagesSchema: migrating ====================
-- adapter_name()
   -> 0.0000s
-- adapter_name()
   -> 0.0000s
-- adapter_name()
   -> 0.0000s
-- create_table(:refinery_images, {:id=>:integer})
   -> 0.0013s
== 20190129151852 CreateRefinerycmsImagesSchema: migrated (0.0015s) ===========

== 20190129151853 RemoveImageExtFromRefineryImages: migrating =================
-- remove_column(:refinery_images, :image_ext)
   -> 0.0078s
== 20190129151853 RemoveImageExtFromRefineryImages: migrated (0.0078s) ========

== 20190129151854 AddTitleAndAltToRefineryImages: migrating ===================
-- change_table(:refinery_images, {})
   -> 0.0016s
== 20190129151854 AddTitleAndAltToRefineryImages: migrated (0.0017s) ==========

== 20190129151855 TranslateRefineryImages: migrating ==========================
-- adapter_name()
   -> 0.0000s
-- adapter_name()
   -> 0.0000s
-- adapter_name()
   -> 0.0000s
-- create_table(:refinery_image_translations, {:id=>:integer})
   -> 0.0014s
-- add_index(:refinery_image_translations, :locale, {:name=>:index_refinery_image_translations_on_locale})
   -> 0.0011s
-- add_index(:refinery_image_translations, [:refinery_image_id, :locale], {:name=>:index_2f245f0c60154d35c851e1df2ffc4c86571726f0, :unique=>true})
   -> 0.0008s
== 20190129151855 TranslateRefineryImages: migrated (0.0036s) =================

== 20190129151856 RemoveTranslatedColumnsFromRefineryImages: migrating ========
-- remove_column(:refinery_images, :image_title)
   -> 0.0135s
-- remove_column(:refinery_images, :image_alt)
   -> 0.0044s
== 20190129151856 RemoveTranslatedColumnsFromRefineryImages: migrated (0.0180s)

== 20190129151857 AddParentIdToRefineryImages: migrating ======================
-- add_column(:refinery_images, :parent_id, :integer)
   -> 0.0006s
== 20190129151857 AddParentIdToRefineryImages: migrated (0.0007s) =============

== 20190129151858 CreateRefinerycmsResourcesSchema: migrating =================
-- adapter_name()
   -> 0.0000s
-- adapter_name()
   -> 0.0000s
-- adapter_name()
   -> 0.0000s
-- create_table(:refinery_resources, {:id=>:integer})
   -> 0.0019s
== 20190129151858 CreateRefinerycmsResourcesSchema: migrated (0.0024s) ========

== 20190129151859 AddTranslatedTitleToRefineryResources: migrating ============
-- adapter_name()
   -> 0.0000s
-- adapter_name()
   -> 0.0000s
-- adapter_name()
   -> 0.0000s
-- create_table(:refinery_resource_translations, {:id=>:integer})
   -> 0.0014s
-- add_index(:refinery_resource_translations, :locale, {:name=>:index_refinery_resource_translations_on_locale})
   -> 0.0008s
-- add_index(:refinery_resource_translations, [:refinery_resource_id, :locale], {:name=>:index_35a57b749803d8437ea64c64da3fb2cb0fbf457a, :unique=>true})
   -> 0.0009s
== 20190129151859 AddTranslatedTitleToRefineryResources: migrated (0.0049s) ===

== 20190129151860 CreateRefinerycmsPagesSchema: migrating =====================
-- adapter_name()
   -> 0.0000s
-- adapter_name()
   -> 0.0000s
-- adapter_name()
   -> 0.0000s
-- create_table(:refinery_page_parts, {:id=>:integer})
   -> 0.0009s
-- add_index(:refinery_page_parts, :id)
   -> 0.0006s
-- add_index(:refinery_page_parts, :refinery_page_id)
   -> 0.0008s
-- adapter_name()
   -> 0.0000s
-- adapter_name()
   -> 0.0000s
-- adapter_name()
   -> 0.0000s
-- create_table(:refinery_pages, {:id=>:integer})
   -> 0.0012s
-- add_index(:refinery_pages, :depth)
   -> 0.0006s
-- add_index(:refinery_pages, :id)
   -> 0.0007s
-- add_index(:refinery_pages, :lft)
   -> 0.0008s
-- add_index(:refinery_pages, :parent_id)
   -> 0.0010s
-- add_index(:refinery_pages, :rgt)
   -> 0.0012s
-- adapter_name()
   -> 0.0000s
-- adapter_name()
   -> 0.0000s
-- adapter_name()
   -> 0.0000s
-- create_table(:refinery_page_part_translations, {:id=>:integer})
   -> 0.0005s
-- add_index(:refinery_page_part_translations, :locale, {:name=>:index_refinery_page_part_translations_on_locale})
   -> 0.0006s
-- add_index(:refinery_page_part_translations, [:refinery_page_part_id, :locale], {:name=>:index_93b7363baf444ecab114aab0bbdedc79d0ec4f4b, :unique=>true})
   -> 0.0008s
-- adapter_name()
   -> 0.0000s
-- adapter_name()
   -> 0.0000s
-- adapter_name()
   -> 0.0000s
-- create_table(:refinery_page_translations, {:id=>:integer})
   -> 0.0006s
-- add_index(:refinery_page_translations, :locale, {:name=>:index_refinery_page_translations_on_locale})
   -> 0.0005s
-- add_index(:refinery_page_translations, [:refinery_page_id, :locale], {:name=>:index_refinery_page_t10s_on_refinery_page_id_and_locale, :unique=>true})
   -> 0.0007s
== 20190129151860 CreateRefinerycmsPagesSchema: migrated (0.0127s) ============

== 20190129151861 AddCustomSlugToRefineryPages: migrating =====================
-- column_exists?(:refinery_pages, :custom_slug)
   -> 0.0006s
== 20190129151861 AddCustomSlugToRefineryPages: migrated (0.0007s) ============

== 20190129151862 AddSlugToRefineryPageParts: migrating =======================
-- rename_column(:refinery_page_parts, :title, :slug)
   -> 0.0098s
-- add_column(:refinery_page_parts, :title, :string, {})
   -> 0.0006s
== 20190129151862 AddSlugToRefineryPageParts: migrated (0.0105s) ==============

== 20190129151863 UpdateSlugAndTitleInRefineryPageParts: migrating ============
== 20190129151863 UpdateSlugAndTitleInRefineryPageParts: migrated (0.0009s) ===

== 20190129151864 FixSlugFormatInRefineryPageParts: migrating =================
== 20190129151864 FixSlugFormatInRefineryPageParts: migrated (0.0004s) ========

== 20190129151865 RemoveTranslatedColumnsToRefineryPages: migrating ===========
-- remove_column(:refinery_pages, :custom_slug)
   -> 0.0187s
-- remove_column(:refinery_pages, :slug)
   -> 0.0186s
== 20190129151865 RemoveTranslatedColumnsToRefineryPages: migrated (0.0375s) ==

== 20190129151866 RemoveTranslatedColumnsToRefineryPageParts: migrating =======
-- remove_column(:refinery_page_parts, :body)
   -> 0.0092s
== 20190129151866 RemoveTranslatedColumnsToRefineryPageParts: migrated (0.0093s)

== 20190129151867 AddChildrenCountToRefineryPages: migrating ==================
-- add_column(:refinery_pages, :children_count, :integer, {:null=>false, :default=>0})
   -> 0.0014s
== 20190129151867 AddChildrenCountToRefineryPages: migrated (0.0016s) =========

== 20190129151868 CreateSeoMeta: migrating ====================================
-- adapter_name()
   -> 0.0000s
-- adapter_name()
   -> 0.0000s
-- adapter_name()
   -> 0.0000s
-- create_table(:seo_meta, {:id=>:integer})
   -> 0.0012s
-- add_index(:seo_meta, :id)
   -> 0.0008s
-- add_index(:seo_meta, [:seo_meta_id, :seo_meta_type], {:name=>:id_type_index_on_seo_meta})
   -> 0.0010s
== 20190129151868 CreateSeoMeta: migrated (0.0039s) ===========================

== 20190129151869 RemoveMetaKeywordsFromSeoMeta: migrating ====================
-- remove_column(:seo_meta, :meta_keywords)
   -> 0.0085s
== 20190129151869 RemoveMetaKeywordsFromSeoMeta: migrated (0.0086s) ===========

DEPRECATION WARNING: Static attributes will be removed in FactoryBot 5.0. Please use dynamic
attributes instead by wrapping the attribute value in a block:

image { #<Pathname:/Users/mzagaja/.rvm/gems/ruby-2.5.3/bundler/gems/refinerycms-a258cef5dee3/images/spec/fixtures/beach.jpeg> }

To automatically update from static attributes to dynamic ones,
install rubocop-rspec and run:

rubocop \
  --require rubocop-rspec \
  --only FactoryBot/AttributeDefinedStatically \
  --auto-correct

 (called from block (2 levels) in <top (required)> at /Users/mzagaja/.rvm/gems/ruby-2.5.3/bundler/gems/refinerycms-a258cef5dee3/images/spec/factories/image.rb:3)
DEPRECATION WARNING: Static attributes will be removed in FactoryBot 5.0. Please use dynamic
attributes instead by wrapping the attribute value in a block:

image { #<Pathname:/Users/mzagaja/.rvm/gems/ruby-2.5.3/bundler/gems/refinerycms-a258cef5dee3/images/spec/fixtures/beach-alternate.jpeg> }

To automatically update from static attributes to dynamic ones,
install rubocop-rspec and run:

rubocop \
  --require rubocop-rspec \
  --only FactoryBot/AttributeDefinedStatically \
  --auto-correct

 (called from block (2 levels) in <top (required)> at /Users/mzagaja/.rvm/gems/ruby-2.5.3/bundler/gems/refinerycms-a258cef5dee3/images/spec/factories/image.rb:7)
DEPRECATION WARNING: Static attributes will be removed in FactoryBot 5.0. Please use dynamic
attributes instead by wrapping the attribute value in a block:

image { #<Pathname:/Users/mzagaja/.rvm/gems/ruby-2.5.3/bundler/gems/refinerycms-a258cef5dee3/images/spec/fixtures/fathead.png> }

To automatically update from static attributes to dynamic ones,
install rubocop-rspec and run:

rubocop \
  --require rubocop-rspec \
  --only FactoryBot/AttributeDefinedStatically \
  --auto-correct

 (called from block (2 levels) in <top (required)> at /Users/mzagaja/.rvm/gems/ruby-2.5.3/bundler/gems/refinerycms-a258cef5dee3/images/spec/factories/image.rb:11)
DEPRECATION WARNING: Static attributes will be removed in FactoryBot 5.0. Please use dynamic
attributes instead by wrapping the attribute value in a block:

file { #<Pathname:/Users/mzagaja/.rvm/gems/ruby-2.5.3/bundler/gems/refinerycms-a258cef5dee3/resources/spec/fixtures/cape-town-tide-table.pdf> }

To automatically update from static attributes to dynamic ones,
install rubocop-rspec and run:

rubocop \
  --require rubocop-rspec \
  --only FactoryBot/AttributeDefinedStatically \
  --auto-correct

 (called from block (2 levels) in <top (required)> at /Users/mzagaja/.rvm/gems/ruby-2.5.3/bundler/gems/refinerycms-a258cef5dee3/resources/spec/factories/resource.rb:5)
DEPRECATION WARNING: Static attributes will be removed in FactoryBot 5.0. Please use dynamic
attributes instead by wrapping the attribute value in a block:

title { "Body" }

To automatically update from static attributes to dynamic ones,
install rubocop-rspec and run:

rubocop \
  --require rubocop-rspec \
  --only FactoryBot/AttributeDefinedStatically \
  --auto-correct

 (called from block (2 levels) in <top (required)> at /Users/mzagaja/.rvm/gems/ruby-2.5.3/bundler/gems/refinerycms-a258cef5dee3/pages/spec/factories/page_parts.rb:3)
DEPRECATION WARNING: Static attributes will be removed in FactoryBot 5.0. Please use dynamic
attributes instead by wrapping the attribute value in a block:

slug { "side_body" }

To automatically update from static attributes to dynamic ones,
install rubocop-rspec and run:

rubocop \
  --require rubocop-rspec \
  --only FactoryBot/AttributeDefinedStatically \
  --auto-correct

 (called from block (2 levels) in <top (required)> at /Users/mzagaja/.rvm/gems/ruby-2.5.3/bundler/gems/refinerycms-a258cef5dee3/pages/spec/factories/page_parts.rb:4)
Database 'dummy_test' already exists
== 20190129151851 CreateStoriesStories: migrating =============================
-- create_table(:refinery_stories)
   -> 0.0008s
-- create_table(:refinery_story_translations)
   -> 0.0004s
-- add_index(:refinery_story_translations, :locale, {:name=>:index_refinery_story_translations_on_locale})
   -> 0.0005s
-- add_index(:refinery_story_translations, [:refinery_story_id, :locale], {:name=>:index_845caebe798a0afcd0ff8f6d31a500cb83b87df7, :unique=>true})
   -> 0.0006s
== 20190129151851 CreateStoriesStories: migrated (0.0026s) ====================

== 20190129151852 CreateRefinerycmsImagesSchema: migrating ====================
-- adapter_name()
   -> 0.0000s
-- adapter_name()
   -> 0.0000s
-- adapter_name()
   -> 0.0000s
-- create_table(:refinery_images, {:id=>:integer})
   -> 0.0007s
== 20190129151852 CreateRefinerycmsImagesSchema: migrated (0.0009s) ===========

== 20190129151853 RemoveImageExtFromRefineryImages: migrating =================
-- remove_column(:refinery_images, :image_ext)
   -> 0.0045s
== 20190129151853 RemoveImageExtFromRefineryImages: migrated (0.0045s) ========

== 20190129151854 AddTitleAndAltToRefineryImages: migrating ===================
-- change_table(:refinery_images, {})
   -> 0.0010s
== 20190129151854 AddTitleAndAltToRefineryImages: migrated (0.0010s) ==========

== 20190129151855 TranslateRefineryImages: migrating ==========================
-- adapter_name()
   -> 0.0000s
-- adapter_name()
   -> 0.0000s
-- adapter_name()
   -> 0.0000s
-- create_table(:refinery_image_translations, {:id=>:integer})
   -> 0.0007s
-- add_index(:refinery_image_translations, :locale, {:name=>:index_refinery_image_translations_on_locale})
   -> 0.0005s
-- add_index(:refinery_image_translations, [:refinery_image_id, :locale], {:name=>:index_2f245f0c60154d35c851e1df2ffc4c86571726f0, :unique=>true})
   -> 0.0006s
== 20190129151855 TranslateRefineryImages: migrated (0.0020s) =================

== 20190129151856 RemoveTranslatedColumnsFromRefineryImages: migrating ========
-- remove_column(:refinery_images, :image_title)
   -> 0.0042s
-- remove_column(:refinery_images, :image_alt)
   -> 0.0044s
== 20190129151856 RemoveTranslatedColumnsFromRefineryImages: migrated (0.0087s)

== 20190129151857 AddParentIdToRefineryImages: migrating ======================
-- add_column(:refinery_images, :parent_id, :integer)
   -> 0.0006s
== 20190129151857 AddParentIdToRefineryImages: migrated (0.0007s) =============

== 20190129151858 CreateRefinerycmsResourcesSchema: migrating =================
-- adapter_name()
   -> 0.0000s
-- adapter_name()
   -> 0.0000s
-- adapter_name()
   -> 0.0000s
-- create_table(:refinery_resources, {:id=>:integer})
   -> 0.0007s
== 20190129151858 CreateRefinerycmsResourcesSchema: migrated (0.0009s) ========

== 20190129151859 AddTranslatedTitleToRefineryResources: migrating ============
-- adapter_name()
   -> 0.0000s
-- adapter_name()
   -> 0.0000s
-- adapter_name()
   -> 0.0000s
-- create_table(:refinery_resource_translations, {:id=>:integer})
   -> 0.0007s
-- add_index(:refinery_resource_translations, :locale, {:name=>:index_refinery_resource_translations_on_locale})
   -> 0.0004s
-- add_index(:refinery_resource_translations, [:refinery_resource_id, :locale], {:name=>:index_35a57b749803d8437ea64c64da3fb2cb0fbf457a, :unique=>true})
   -> 0.0007s
== 20190129151859 AddTranslatedTitleToRefineryResources: migrated (0.0020s) ===

== 20190129151860 CreateRefinerycmsPagesSchema: migrating =====================
-- adapter_name()
   -> 0.0000s
-- adapter_name()
   -> 0.0000s
-- adapter_name()
   -> 0.0000s
-- create_table(:refinery_page_parts, {:id=>:integer})
   -> 0.0007s
-- add_index(:refinery_page_parts, :id)
   -> 0.0005s
-- add_index(:refinery_page_parts, :refinery_page_id)
   -> 0.0006s
-- adapter_name()
   -> 0.0000s
-- adapter_name()
   -> 0.0000s
-- adapter_name()
   -> 0.0000s
-- create_table(:refinery_pages, {:id=>:integer})
   -> 0.0008s
-- add_index(:refinery_pages, :depth)
   -> 0.0004s
-- add_index(:refinery_pages, :id)
   -> 0.0006s
-- add_index(:refinery_pages, :lft)
   -> 0.0008s
-- add_index(:refinery_pages, :parent_id)
   -> 0.0010s
-- add_index(:refinery_pages, :rgt)
   -> 0.0012s
-- adapter_name()
   -> 0.0000s
-- adapter_name()
   -> 0.0000s
-- adapter_name()
   -> 0.0000s
-- create_table(:refinery_page_part_translations, {:id=>:integer})
   -> 0.0005s
-- add_index(:refinery_page_part_translations, :locale, {:name=>:index_refinery_page_part_translations_on_locale})
   -> 0.0004s
-- add_index(:refinery_page_part_translations, [:refinery_page_part_id, :locale], {:name=>:index_93b7363baf444ecab114aab0bbdedc79d0ec4f4b, :unique=>true})
   -> 0.0014s
-- adapter_name()
   -> 0.0000s
-- adapter_name()
   -> 0.0000s
-- adapter_name()
   -> 0.0000s
-- create_table(:refinery_page_translations, {:id=>:integer})
   -> 0.0004s
-- add_index(:refinery_page_translations, :locale, {:name=>:index_refinery_page_translations_on_locale})
   -> 0.0009s
-- add_index(:refinery_page_translations, [:refinery_page_id, :locale], {:name=>:index_refinery_page_t10s_on_refinery_page_id_and_locale, :unique=>true})
   -> 0.0006s
== 20190129151860 CreateRefinerycmsPagesSchema: migrated (0.0121s) ============

== 20190129151861 AddCustomSlugToRefineryPages: migrating =====================
-- column_exists?(:refinery_pages, :custom_slug)
   -> 0.0006s
== 20190129151861 AddCustomSlugToRefineryPages: migrated (0.0006s) ============

== 20190129151862 AddSlugToRefineryPageParts: migrating =======================
-- rename_column(:refinery_page_parts, :title, :slug)
   -> 0.0132s
-- add_column(:refinery_page_parts, :title, :string, {})
   -> 0.0006s
== 20190129151862 AddSlugToRefineryPageParts: migrated (0.0139s) ==============

== 20190129151863 UpdateSlugAndTitleInRefineryPageParts: migrating ============
== 20190129151863 UpdateSlugAndTitleInRefineryPageParts: migrated (0.0014s) ===

== 20190129151864 FixSlugFormatInRefineryPageParts: migrating =================
== 20190129151864 FixSlugFormatInRefineryPageParts: migrated (0.0008s) ========

== 20190129151865 RemoveTranslatedColumnsToRefineryPages: migrating ===========
-- remove_column(:refinery_pages, :custom_slug)
   -> 0.0271s
-- remove_column(:refinery_pages, :slug)
   -> 0.0288s
== 20190129151865 RemoveTranslatedColumnsToRefineryPages: migrated (0.0560s) ==

== 20190129151866 RemoveTranslatedColumnsToRefineryPageParts: migrating =======
-- remove_column(:refinery_page_parts, :body)
   -> 0.0072s
== 20190129151866 RemoveTranslatedColumnsToRefineryPageParts: migrated (0.0073s)

== 20190129151867 AddChildrenCountToRefineryPages: migrating ==================
-- add_column(:refinery_pages, :children_count, :integer, {:null=>false, :default=>0})
   -> 0.0009s
== 20190129151867 AddChildrenCountToRefineryPages: migrated (0.0010s) =========

== 20190129151868 CreateSeoMeta: migrating ====================================
-- adapter_name()
   -> 0.0000s
-- adapter_name()
   -> 0.0000s
-- adapter_name()
   -> 0.0000s
-- create_table(:seo_meta, {:id=>:integer})
   -> 0.0008s
-- add_index(:seo_meta, :id)
   -> 0.0004s
-- add_index(:seo_meta, [:seo_meta_id, :seo_meta_type], {:name=>:id_type_index_on_seo_meta})
   -> 0.0006s
== 20190129151868 CreateSeoMeta: migrated (0.0021s) ===========================

== 20190129151869 RemoveMetaKeywordsFromSeoMeta: migrating ====================
-- remove_column(:seo_meta, :meta_keywords)
   -> 0.0072s
== 20190129151869 RemoveMetaKeywordsFromSeoMeta: migrated (0.0073s) ===========

Then I run it again and receive the same error:

rails g migration RenameStoryEMailToName
Please first run 'rake refinery:testing:dummy_app' to create a dummy Refinery CMS application.

As a side note I will add I had to add the listen gem to my extension Gemfile to successfully generate the dummy app.

Refinery CMS section of Gemfile is as follows:

# Refinery CMS
gem 'refinerycms', '~> 4.0', :git => 'https://github.com/refinery/refinerycms.git'

# Optionally, specify additional Refinery CMS Extensions here:
gem 'refinerycms-acts-as-indexed', ['~> 3.0', '>= 3.0.0']
gem 'refinerycms-wymeditor', ['~> 2.0', '>= 2.0.0']
gem 'refinerycms-authentication-devise', '~> 2.0.0', :git => 'https://github.com/refinery/refinerycms-authentication-devise.git'
#  gem 'refinerycms-blog', ['~> 4.0', '>= 4.0.0']
#  gem 'refinerycms-inquiries', ['~> 4.0', '>= 4.0.0']
gem 'refinerycms-search', github: 'refinery/refinerycms-search', branch: 'master'
# gem 'refinerycms-page-images', ['~> 4.0', '>= 4.0.0']
gem 'refinerycms-i18n'

gem 'refinerycms-events', path: 'vendor/extensions'

gem 'aws-sdk-translate'

gem 'refinerycms-stories', path: 'vendor/extensions'
@parndt
Copy link
Member

parndt commented Feb 22, 2019

@mzagaja there are two possible solutions to this issue:

1- edit the original migration that the extension generated; both in in vendor/extensions/db/migrate/ and db/migrate/ and change the column

2- generate a migration in the actual application using normal Rails techniques (so you don't need a spec/dummy inside the extension's folder) and then copy it to the vendor/extensions/db/migrate/ folder. You may wish to rename it with the prefix to 2- instead of the date stamp so that rails g refinery:stories still works as expected if you ever regenerate or share your extension.

The error message you're seeing is expected as the "app" in vendor/extensions/stories has no Rails app with which to generate migrations. I'm not sure why you're seeing it after you already generated an extension.

Hope that helps to provide context around how the design of this works and to provide a workaround.

I'm going to leave it open as the continued errors you described (listen & the follow up refusal to generate a migration) are unexpected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants