Class: Veracode::ActiveRecord::Schema

Inherits:
Object
  • Object
show all
Defined in:
lib/veracode/schema.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.define(info = {}, &block) ⇒ Object



24
25
26
# File 'lib/veracode/schema.rb', line 24

def self.define(info={}, &block)
  Schema.new.instance_eval(&block)
end

Instance Method Details

#add_column(table_name, column_name, type, options = {}) ⇒ Object



37
# File 'lib/veracode/schema.rb', line 37

def add_column(table_name, column_name, type, options = {}) ; end

#add_foreign_key(from_table, to_table, options = {}) ⇒ Object



45
46
47
# File 'lib/veracode/schema.rb', line 45

def add_foreign_key(from_table, to_table, options = {})
  Veracode::log_error "schema.rb: ActiveRecord::ConnectionAdapters::OracleEnhancedSchemaStatementsExt#add_foreign_key called"
end

#add_index(table_name, column_name, options = {}) ⇒ Object



38
# File 'lib/veracode/schema.rb', line 38

def add_index(table_name, column_name, options = {}) ; end

#add_index_options(table_name, column_name, options = {}) ⇒ Object



39
# File 'lib/veracode/schema.rb', line 39

def add_index_options(table_name, column_name, options = {}) ; end

#add_index_sort_order(option_strings, column_names, options = {}) ⇒ Object



40
# File 'lib/veracode/schema.rb', line 40

def add_index_sort_order(option_strings, column_names, options = {}) ; end

#add_primary_key_trigger(table_name, options = {}) ⇒ Object



48
49
50
# File 'lib/veracode/schema.rb', line 48

def add_primary_key_trigger(table_name, options = {})
  Veracode::log_error "schema.rb: ActiveRecord::ConnectionAdapters::OracleEnhancedSchemaStatementsExt#add_primary_key_trigger called"
end

#add_synonym(name, table_name, options = {}) ⇒ Object



51
52
53
# File 'lib/veracode/schema.rb', line 51

def add_synonym(name, table_name, options = {})
  Veracode::log_error "schema.rb: ActiveRecord::ConnectionAdapters::OracleEnhancedSchemaStatementsExt#add_synonym called"
end

#add_timestamps(table_name) ⇒ Object



41
# File 'lib/veracode/schema.rb', line 41

def add_timestamps(table_name) ; end

#create_table(name, options = {}) {|td| ... } ⇒ Object

Yields:

  • (td)


28
29
30
31
32
33
# File 'lib/veracode/schema.rb', line 28

def create_table(name, options={})
  td = Model.new(name)
  td.integer('id')
  yield td if block_given?
  Veracode.add_to_archive Veracode.format_variable("@@#{td.name}", td.attributes, 'class')
end