Sha256: eeb8aa7ed483d270ffe6f8a099e0056f38a01cb944fd1d30867428a8af02cf93
Contents?: true
Size: 725 Bytes
Versions: 3
Compression:
Stored size: 725 Bytes
Contents
# frozen_string_literal: true module Sequel module Generators class MigrationGenerator < ::Rails::Generators::NamedBase include ::Rails::Generators::Migration source_root File.expand_path("templates", __dir__) argument :attributes, type: :array, default: [], banner: "field[:type][:index] field[:type][:index]" def self.next_migration_number _dirname Time.now.strftime "%Y%m%d%H%M%S" end def create_migration_file migration_template "migration.rb.erb", "db/migrate/#{file_name}.rb" migration_template "up.sql.erb", "db/migrate/#{file_name}_up.sql" migration_template "down.sql.erb", "db/migrate/#{file_name}_down.sql" end end end end
Version data entries
3 entries across 3 versions & 1 rubygems