seed_data_migrations 0.0.1.6 → 0.0.1.7
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.
@@ -10,39 +10,39 @@ module ActiveRecord
|
|
10
10
|
end
|
11
11
|
|
12
12
|
# Exception that can be raised to stop migrations from going backwards.
|
13
|
-
class IrreversibleDataMigration <
|
13
|
+
class IrreversibleDataMigration < DataMigrationError
|
14
14
|
end
|
15
15
|
|
16
|
-
class DuplicateDataMigrationVersionError <
|
16
|
+
class DuplicateDataMigrationVersionError < DataMigrationError#:nodoc:
|
17
17
|
def initialize(version)
|
18
18
|
super("Multiple migrations have the version number #{version}")
|
19
19
|
end
|
20
20
|
end
|
21
21
|
|
22
|
-
class DuplicateDataMigrationNameError <
|
22
|
+
class DuplicateDataMigrationNameError < DataMigrationError#:nodoc:
|
23
23
|
def initialize(name)
|
24
24
|
super("Multiple migrations have the name #{name}")
|
25
25
|
end
|
26
26
|
end
|
27
27
|
|
28
|
-
class UnknownDataMigrationVersionError <
|
28
|
+
class UnknownDataMigrationVersionError < DataMigrationError #:nodoc:
|
29
29
|
def initialize(version)
|
30
30
|
super("No migration with version number #{version}")
|
31
31
|
end
|
32
32
|
end
|
33
33
|
|
34
|
-
class IllegalDataMigrationNameError <
|
34
|
+
class IllegalDataMigrationNameError < DataMigrationError#:nodoc:
|
35
35
|
def initialize(name)
|
36
36
|
super("Illegal name for migration file: #{name}\n\t(only lower case letters, numbers, and '_' allowed)")
|
37
37
|
end
|
38
38
|
end
|
39
39
|
|
40
|
-
class PendingDataMigrationError <
|
40
|
+
class PendingDataMigrationError < DataMigrationError#:nodoc:
|
41
41
|
def initialize
|
42
42
|
if defined?(Rails)
|
43
|
-
super("Migrations are pending. To resolve this issue, run:\n\n\tbin/rake db:
|
43
|
+
super("Migrations are pending. To resolve this issue, run:\n\n\tbin/rake db:migrate_data RAILS_ENV=#{::Rails.env}")
|
44
44
|
else
|
45
|
-
super("Migrations are pending. To resolve this issue, run:\n\n\tbin/rake db:
|
45
|
+
super("Migrations are pending. To resolve this issue, run:\n\n\tbin/rake db:migrate_data")
|
46
46
|
end
|
47
47
|
end
|
48
48
|
end
|