Sha256: 4133148fed2a62b570f2ab0bc83e925df6e2802fe4e750a468ec84696f7332df

Contents?: true

Size: 417 Bytes

Versions: 13

Compression:

Stored size: 417 Bytes

Contents

class Create<%= @camelize_name %> <%= "<" %> ActiveRecord::Migration[6.1]
  def change
    create_table :<%= 
    len = @snake_case_name.length-1
    if @snake_case_name[len] == 'y'
      filename = @snake_case_name[0..-1] + "ies"
    else
      filename = @snake_case_name + "s"
    end
 %>, id: :uuid do |t|
      <% for field in @migration_fields %><%=field%>
      <% end %>

      t.timestamps
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
graphql_helper_generator-0.1.0 lib/graphql_helper_generator/graphql_model/templates/migration_template.erb
graphql_helper_generator-0.0.31 lib/graphql_helper_generator/graphql_model/templates/migration_template.erb
graphql_helper_generator-0.0.30 lib/graphql_helper_generator/graphql_model/templates/migration_template.erb
graphql_helper_generator-0.0.29 lib/graphql_helper_generator/graphql_model/templates/migration_template.erb
graphql_helper_generator-0.0.28 lib/graphql_helper_generator/graphql_model/templates/migration_template.erb
graphql_helper_generator-0.0.27 lib/graphql_helper_generator/graphql_model/templates/migration_template.erb
graphql_helper_generator-0.0.26 lib/graphql_helper_generator/graphql_model/templates/migration_template.erb
graphql_helper_generator-0.0.25 lib/graphql_helper_generator/graphql_model/templates/migration_template.erb
graphql_helper_generator-0.0.24 lib/graphql_helper_generator/graphql_model/templates/migration_template.erb
graphql_helper_generator-0.0.23 lib/graphql_helper_generator/graphql_model/templates/migration_template.erb
graphql_helper_generator-0.0.22 lib/graphql_helper_generator/graphql_model/templates/migration_template.erb
graphql_helper_generator-0.0.21 lib/graphql_helper_generator/graphql_model/templates/migration_template.erb
graphql_helper_generator-0.0.20 lib/graphql_helper_generator/graphql_model/templates/migration_template.erb