Sha256: f1872b8a7db8eae69d2c7db27e5722f470b685cdcef299635d0a179e27c0647a
Contents?: true
Size: 726 Bytes
Versions: 9
Compression:
Stored size: 726 Bytes
Contents
require_relative 'model_attribute' module Hippo 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
9 entries across 9 versions & 1 rubygems