mini_record
mini_record copied to clipboard
ActiveRecord meets DataMapper, with MiniRecord you are be able to write schema inside your models.
### Description adds support for rails and activerecord 6
Adding support for ActiveRecord 5 TableDefinition
Calling `Model.auto_upgrade!` for a second (or any subsequent time) raises a `NameError` after the initial run. ``` irb(main):001:0> Location.auto_upgrade! NameError: no member 'limit' in struct from (irb):1 ``` Model: ```...
Hey, didn't know how else to contact you? I can't find this app anymore, would you be able to send it to me? Thanks, Craig
In ```auto_upgrade!``` if you choose a field with type :boolean it will call ```connection.add_column table_name, column.name, column.type.to_sym, options``` However, options will include ```:limit => 1``` and in turn it will...
Fixed TableDefinition arity check and `#tables` references
When trying to use MiniRecord with Rails 5 ActiveRecord, we get this error: ``` /Users/fred/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/mini_record-0.4.7/lib/mini_record/auto_schema.rb:22:in `init_table_definition': Unsupported number of args for ActiveRecord::ConnectionAdapters::TableDefinition.new() (ArgumentError) from /Users/fred/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/mini_record-0.4.7/lib/mini_record/auto_schema.rb:35:in `table_definition' from /Users/fred/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/mini_record-0.4.7/lib/mini_record/auto_schema.rb:121:in `block in...
Need for changes in table creation because of that commit: https://github.com/rails/rails/commit/fc88e4a5c317830686e3160bb4ba95e49c681b12