Class: SQL::Postgres::Column

Inherits:
Column
  • Object
show all
Defined in:
lib/dm-migrations/sql/postgres.rb

Instance Attribute Summary

Attributes inherited from Column

#default_value, #name, #not_null, #primary_key, #type, #unique

Instance Method Summary collapse

Constructor Details

#initialize(col_struct) ⇒ Column

Returns a new instance of Column.



79
80
81
82
83
84
85
86
# File 'lib/dm-migrations/sql/postgres.rb', line 79

def initialize(col_struct)
  super()
  @name = col_struct.column_name
  @type = col_struct.data_type
  @default_value = col_struct.column_default

  @not_null = col_struct.is_nullable != 'YES'
end