Class: SQL::Postgresql::Column

Inherits:
Column show all
Defined in:
lib/gems/dm-migrations-0.9.9/lib/sql/postgresql.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.



69
70
71
72
73
# File 'lib/gems/dm-migrations-0.9.9/lib/sql/postgresql.rb', line 69

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

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