Method: SchemaRD::MigrationContext::Loader#create_table
- Defined in:
- lib/schemard/schema_parser.rb
#create_table(table_name, options = {}) {|TableDefinition.new(table, with_comment: @parse_db_comment)| ... } ⇒ Object
57 58 59 60 61 62 63 64 |
# File 'lib/schemard/schema_parser.rb', line 57 def create_table(table_name, = {}) if [:comment] && @parse_db_comment [:parsed_db_comment] = .delete(:comment) end table = SchemaRD::Table.new(.merge(name: table_name)) @schema.add_table(table_name, table) yield TableDefinition.new(table, with_comment: @parse_db_comment) end |