Class: Veracode::ActiveRecord::Schema
- Inherits:
-
Object
- Object
- Veracode::ActiveRecord::Schema
- Defined in:
- lib/veracode/schema.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#add_column(table_name, column_name, type, options = {}) ⇒ Object
ActiveRecord::ConnectionAdapters::SchemaStatements api.rubyonrails.org/classes/ActiveRecord/ConnectionAdapters/SchemaStatements.html.
-
#add_foreign_key(from_table, to_table, options = {}) ⇒ Object
ActiveRecord::ConnectionAdapters::OracleEnhancedSchemaStatementsExt rubydoc.info/gems/activerecord-oracle_enhanced-adapter/ActiveRecord/ConnectionAdapters/OracleEnhancedSchemaStatementsExt.
- #add_index(table_name, column_name, options = {}) ⇒ Object
- #add_index_options(table_name, column_name, options = {}) ⇒ Object
- #add_index_sort_order(option_strings, column_names, options = {}) ⇒ Object
- #add_primary_key_trigger(table_name, options = {}) ⇒ Object
- #add_synonym(name, table_name, options = {}) ⇒ Object
- #add_timestamps(table_name) ⇒ Object
- #create_table(name, options = {}) {|td| ... } ⇒ Object
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
ActiveRecord::ConnectionAdapters::SchemaStatements api.rubyonrails.org/classes/ActiveRecord/ConnectionAdapters/SchemaStatements.html
37 |
# File 'lib/veracode/schema.rb', line 37 def add_column(table_name, column_name, type, = {}) ; end |
#add_foreign_key(from_table, to_table, options = {}) ⇒ Object
ActiveRecord::ConnectionAdapters::OracleEnhancedSchemaStatementsExt rubydoc.info/gems/activerecord-oracle_enhanced-adapter/ActiveRecord/ConnectionAdapters/OracleEnhancedSchemaStatementsExt
45 46 47 |
# File 'lib/veracode/schema.rb', line 45 def add_foreign_key(from_table, to_table, = {}) 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, = {}) ; end |
#add_index_options(table_name, column_name, options = {}) ⇒ Object
39 |
# File 'lib/veracode/schema.rb', line 39 def (table_name, column_name, = {}) ; 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, = {}) ; 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, = {}) 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, = {}) 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 (table_name) ; end |
#create_table(name, options = {}) {|td| ... } ⇒ Object
28 29 30 31 32 33 |
# File 'lib/veracode/schema.rb', line 28 def create_table(name, ={}) 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 |