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.



75
76
77
78
79
# File 'lib/dm-migrations/sql/postgres.rb', line 75

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