Project

General

Profile

Actions

Patch #31485

closed

Add support for :sql ActiveRecord::Base.schema_format in redmine:plugins:migrate

Added by Kouhei Sutou almost 5 years ago. Updated almost 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Plugin API
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:

Description

ActiveRecord uses db/schema.rb when ActiveRecord::Base.schema_format is :ruby and db/structure.sql when ActiveRecord::Base.schema_format is :sql.

:sql is needed to use SQL that isn't supported by Active Record's migration API.
For example, WITH of PostgreSQL's CREATE INDEX isn't supported.

I'm using SQL that isn't supported by Active Record's migration API in https://github.com/clear-code/redmine_full_text_search .

db:migrate in Rails supports :ruby and :sql.
https://github.com/rails/rails/blob/master/activerecord/lib/active_record/railties/databases.rake#L91-L93

So it's better that redmine:plugins:migrate also supports :ruby and :sql.


Files


Related issues

Related to Redmine - Defect #38199: Fix deprecation warning for db:structure:dump in db:migrate when using sql schema formatClosedGo MAEDA

Actions
Actions #1

Updated by Go MAEDA almost 5 years ago

  • Target version set to 4.1.0
Actions #3

Updated by Go MAEDA almost 5 years ago

  • Status changed from New to Closed
  • Assignee set to Go MAEDA

Committed the patch. Thank you.

Actions #4

Updated by Go MAEDA about 1 year ago

  • Related to Defect #38199: Fix deprecation warning for db:structure:dump in db:migrate when using sql schema format added
Actions

Also available in: Atom PDF