Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Ruby 或 Rails 中的任何工具可以让我从数据库中提取所有表模式并生成 Ruby 等效的“DLL”语句?
可以让我将架构从 Microsoft SQL Server 移植到 Postgres,或将 MySQL 移植到 Sqlite。
在 Rails/ActiveRecord 中,您可以使用rake db:schema:dump生成 db/schema.rb 并将rake db:schema:load其加载到数据库中。
rake db:schema:dump
rake db:schema:load