A (more) complete cheatsheet for Arel, including NamedFunction functions, raw SQL and window functions.
posts = Arel::Table.new(:posts)
posts = Post.arel_table # ActiveRecord| # Inspired by http://www.madebyloren.com/posts/migrating-to-uuids-as-primary-keys | |
| task id_to_uuid: :environment do | |
| puts "[START] Convert id to uuid" | |
| ActiveRecord::Base.connection.enable_extension 'uuid-ossp' unless ActiveRecord::Base.connection.extensions.include? 'uuid-ossp' | |
| ActiveRecord::Base.connection.enable_extension 'pgcrypto' unless ActiveRecord::Base.connection.extensions.include? 'pgcrypto' | |
| table_names = ActiveRecord::Base.connection.tables - ["schema_migrations", "ar_internal_metadata", "migration_validators"] | |
| table_names.each do |table_name| | |
| puts "[CREATE] uuid column for #{table_name}" |
| .git | |
| .gitignore | |
| README.md | |
| # | |
| # OS X | |
| # | |
| .DS_Store | |
| .AppleDouble | |
| .LSOverride |
| FIXME: | |
| WARNING: Nokogiri was built against LibXML version 2.7.3, but has dynamically loaded 2.7.8 | |
| or | |
| ERROR -: Incompatible library version: nokogiri.bundle requires version 11.0.0 or later, but libxml2.2.dylib provides version 10.0.0 | |
| gem uninstall nokogiri libxml-ruby | |
| brew update | |
| brew uninstall libxml2 |