プロジェクト

全般

プロフィール

Vote #80104

完了

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

Admin Redmine さんが3年以上前に追加. 3年以上前に更新.

ステータス:
Closed
優先度:
通常
担当者:
-
カテゴリ:
Plugin API_20
対象バージョン:
開始日:
2022/05/09
期日:
進捗率:

0%

予定工数:
category_id:
20
version_id:
127
issue_org_id:
31485
author_id:
58128
assigned_to_id:
332
comments:
3
status_id:
5
tracker_id:
3
plus1:
0
affected_version:
closed_on:
affected_version_id:
ステータス-->[Closed]

説明

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@":https://www.postgresql.org/docs/current/sql-createindex.html 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@.


journals

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

It was added by this commit for Rails 3.2.0.
https://github.com/rails/rails/commit/15fb4302b6ff16e641b6279a3530eb8ed97f2899
--------------------------------------------------------------------------------
Committed the patch. Thank you.
--------------------------------------------------------------------------------

Admin Redmine さんが3年以上前に更新

  • カテゴリPlugin API_20 にセット
  • 対象バージョン4.1.0_127 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0