You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
class CreateProjectTitleAndDescriptionAndStoryTranslationsForMobilityTableBackend < ActiveRecord::Migration[5.1]
def change
add_column :project_translations, :title, :string
add_column :project_translations, :description, :string
add_column :project_translations, :story, :string
end
end
Which doesn't work if project_translations table doesn't exist beforehand.
This should be either mentioned in the documentation explicitly or the generator should assume there's no such a table and create an appropriate migration.
The text was updated successfully, but these errors were encountered:
The only thing that would trigger using the "add columns" template rather than the default "create table" template is the existence of a table project_translations, which it checks for here. But I'm not sure why setting the backend explicitly would change the result in that case... anyway, if it works on a fresh project I agree with closing. Let me know if you see it again.
rails generate mobility:translations project title:string description:string story:string
yields
Which doesn't work if
project_translations
table doesn't exist beforehand.This should be either mentioned in the documentation explicitly or the generator should assume there's no such a table and create an appropriate migration.
The text was updated successfully, but these errors were encountered: