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.



55
56
57
58
59
# File 'lib/createDBTable.rb', line 55

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

Instance Attribute Details

#schemaObject (readonly)

Returns the value of attribute schema.



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

def schema
  @schema
end

#tablenameObject (readonly)

Returns the value of attribute tablename.



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

def tablename
  @tablename
end

Instance Method Details

#runMigrationProcessObject



61
62
63
64
65
66
67
# File 'lib/createDBTable.rb', line 61

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