module ZeroDowntimeMigrations::DSL

Attributes

current[RW]
data[RW]
ddl[RW]
index[RW]
safe[RW]

Public Instance Methods

data?() click to toggle source
  # File lib/zero_downtime_migrations/dsl.rb
5 def data?
6   !!@data
7 end
ddl?() click to toggle source
   # File lib/zero_downtime_migrations/dsl.rb
 9 def ddl?
10   !!@ddl
11 end
index?() click to toggle source
   # File lib/zero_downtime_migrations/dsl.rb
13 def index?
14   !!@index
15 end
migrating?() click to toggle source
   # File lib/zero_downtime_migrations/dsl.rb
17 def migrating?
18   !!@current
19 end
mixed?() click to toggle source
   # File lib/zero_downtime_migrations/dsl.rb
21 def mixed?
22   [data?, ddl?, index?].select(&:itself).size > 1
23 end
safe?() click to toggle source
   # File lib/zero_downtime_migrations/dsl.rb
25 def safe?
26   !!@safe || ENV["SAFETY_ASSURED"].presence
27 end
safety_assured() click to toggle source
   # File lib/zero_downtime_migrations/dsl.rb
29 def safety_assured
30   Migration.safe = true
31 end
unsafe?() click to toggle source
   # File lib/zero_downtime_migrations/dsl.rb
33 def unsafe?
34   !safe?
35 end