old_sql 1.37.0 → 1.38.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5,6 +5,7 @@ module OldSql
|
|
5
5
|
class InstallMigrationsGenerator < Rails::Generators::Base
|
6
6
|
include Rails::Generators::Migration
|
7
7
|
source_root File.expand_path('../templates', __FILE__)
|
8
|
+
argument :model_name, :type => :string, :default => 'user'
|
8
9
|
|
9
10
|
def self.next_migration_number(dirname)
|
10
11
|
if ActiveRecord::Base.timestamped_migrations
|
@@ -18,7 +19,8 @@ module OldSql
|
|
18
19
|
|
19
20
|
def create_migration_file
|
20
21
|
sleep 1 # ensure scripts have different timestamps
|
21
|
-
|
22
|
+
gsub_file 'add_old_sql_admin_to_users_migration.rb', /users/, "#{model_name}"
|
23
|
+
migration_template 'add_old_sql_admin_to_users_migration.rb', "db/migrate/add_old_sql_admin_to_#{model_name}.rb" rescue p $!.message
|
22
24
|
#sleep 1 # ensure scripts have different timestamps
|
23
25
|
end
|
24
26
|
end
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: old_sql
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 1.
|
5
|
+
version: 1.38.0
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Eddie Gonzales
|
@@ -198,7 +198,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
198
198
|
requirements:
|
199
199
|
- - ">="
|
200
200
|
- !ruby/object:Gem::Version
|
201
|
-
hash: -
|
201
|
+
hash: -3187375667189382122
|
202
202
|
segments:
|
203
203
|
- 0
|
204
204
|
version: "0"
|