Sha256: 4d64c6027960d602699f282c592b65590b3f55287f2bf5e0f8506d054672df86
Contents?: true
Size: 726 Bytes
Versions: 12
Compression:
Stored size: 726 Bytes
Contents
require_relative 'model_attribute' module Lanes module Command class GenerateMigration < NamedCommand include MigrationSupport OPTIONS ||= { timestamps: true } class_options OPTIONS argument :fields, type: :array, default: [] attr_reader :file_name, :table_name def set_variables super @file_name = name.underscore prefix = extension.db_table_prefix @table_name = prefix ? "#{prefix}_#{name.tableize}" : name.tableize end def generate_module create_migration end end end end
Version data entries
12 entries across 12 versions & 1 rubygems