Class: CreateDBTable

Inherits:
RunRailsMigration show all
Defined in:
lib/createDBTable.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(tablename, schema) ⇒ CreateDBTable

Returns a new instance of CreateDBTable.



51
52
53
54
55
# File 'lib/createDBTable.rb', line 51

def initialize(tablename,schema)
 super(tablename,schema)
  @tablename=tablename
  @schema=schema
end

Instance Attribute Details

#schemaObject (readonly)

Returns the value of attribute schema.



49
50
51
# File 'lib/createDBTable.rb', line 49

def schema
  @schema
end

#tablenameObject (readonly)

Returns the value of attribute tablename.



49
50
51
# File 'lib/createDBTable.rb', line 49

def tablename
  @tablename
end

Instance Method Details

#runMigrationProcessObject



57
58
59
60
61
62
63
# File 'lib/createDBTable.rb', line 57

def runMigrationProcess
 if ((@tablename != '') && (@schema != ''))
  self.runRailsMigration
 else
  return false
 end
end