Possible unsafe migrations warning

オープン
#462 コメント 3 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
elixir, postgresql
領域
databases

調査の方向性

まず、issue に示されている一意なアルバムインデックスの生成済み migration を再現し、それを生成する migration codegen パスを追跡します。安全でない PostgreSQL インデックス作成をどのように検出または表現すべきかを判断し、その後、生成済み migration が non-concurrent インデックスを処理するか警告することを示すテストカバレッジを追加します。

索引モデルが issue の本文から書いたものです。

説明

enhancement

I'm working through the book and I see that when a migration is generated for new index it's not applying concurrently: true

  def up do
    create unique_index(:albums, [:name, :artist_id],
             name: "albums_unique_album_names_per_artist_index"
           )
  end

This locks the table and with bigger databases can cause problems:
postgres docs
there are some libraries that will let you know about unsafe migrations where you can check what to avoid
rails - there is also one for elixir but as ash generates the migrations most of the stuff can be applied by changing the codegen.

主要言語
Elixir
スター
191
フォーク
186
平均マージ
16時間 4分
マージ済み PR(30日)
17

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

ash-project/ash_postgres のほかの issue

ash-project/ash_postgres の issue をすべて見る

似ている issue

Elixir の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。