Sha256: 86fae312c15707c0645224a3009713222de7e0f9c00194fcde5e1798893a4235
Contents?: true
Size: 772 Bytes
Versions: 22
Compression:
Stored size: 772 Bytes
Contents
require 'eucalypt/migration/namespaces/migration-drop/generators/index' require 'eucalypt/app' require 'eucalypt/errors' require 'eucalypt/helpers' module Eucalypt class MigrationDrop < Thor include Eucalypt::Helpers using Colorize option :name, aliases: '-n', type: :string, desc: "Index name" desc "index [TABLE] *[COLUMNS]", "Removes an index from a table".colorize(:grey) def index(table, *columns) directory = File.expand_path('.') if Eucalypt.app? directory migration = Eucalypt::Generators::Drop::Index.new migration.destination_root = directory migration.generate(table: table, columns: columns, name: options[:name]||'index') else Eucalypt::Error.wrong_directory end end end end
Version data entries
22 entries across 22 versions & 1 rubygems