Class: DbSchema::Changes::CreateColumn

Inherits:
Object
  • Object
show all
Defined in:
lib/db_schema/changes.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(field) ⇒ CreateColumn

Returns a new instance of CreateColumn.



290
291
292
# File 'lib/db_schema/changes.rb', line 290

def initialize(field)
  @field = field
end

Instance Attribute Details

#fieldObject (readonly)

Returns the value of attribute field.



288
289
290
# File 'lib/db_schema/changes.rb', line 288

def field
  @field
end

Instance Method Details

#nameObject



294
295
296
# File 'lib/db_schema/changes.rb', line 294

def name
  field.name
end

#optionsObject



306
307
308
# File 'lib/db_schema/changes.rb', line 306

def options
  field.options
end

#primary_key?Boolean

Returns:

  • (Boolean)


302
303
304
# File 'lib/db_schema/changes.rb', line 302

def primary_key?
  field.primary_key?
end

#typeObject



298
299
300
# File 'lib/db_schema/changes.rb', line 298

def type
  field.type
end