class DbSchema::Operations::AlterColumnType
Constants
- SERIAL_TYPES
Attributes
name[R]
new_attributes[R]
new_type[R]
old_type[R]
using[R]
Public Class Methods
new(name, old_type:, new_type:, using: nil, **new_attributes)
click to toggle source
# File lib/db_schema/operations.rb, line 88 def initialize(name, old_type:, new_type:, using: nil, **new_attributes) @name = name @old_type = old_type @new_type = new_type @using = using @new_attributes = new_attributes end
Public Instance Methods
from_serial?()
click to toggle source
# File lib/db_schema/operations.rb, line 96 def from_serial? SERIAL_TYPES.include?(old_type) end
to_serial?()
click to toggle source
# File lib/db_schema/operations.rb, line 100 def to_serial? SERIAL_TYPES.include?(new_type) end