PostgreSQL types in context based multi-tenancy

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

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

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

評価

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

調査の方向性

issue に記載されている custom_statements の処理と、tenant 用および非 tenant 用のマイグレーションパスを追跡します。ステートメントを global としてマークできる方法を確認し、CREATE TYPE ステートメントがデータベースごとに 1 回実行される一方で、tenant スコープのステートメントは引き続き tenant ごとに実行されることを検証します。2 番目の tenant が作成された場合の動作も確認します。

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

説明

enhancement good first issue

Is your feature request related to a problem? Please describe.

When creating a PostgreSQL custom enum type via CREATE TYPE foo AS ENUM ('bar', 'foobar') inside the custom_statements block while utilising context based multi-tenancy, the statement is placed into the tenant migration. This will fail to execute this statement as soon as a second tenant is created. Types in this context are global for the entire database.

Describe the solution you'd like

A configuration option that a statement should be place in the non-tenant migration set.

Describe alternatives you've considered

Currently, the only workaround is manual intervention.

Express the feature either with a change to resource syntax, or with a change to the resource interface

postgres do 
  custom_statements do
    statement :foo do
      global? true
      up "..."
      down "..."
    end
  end
end
主要言語
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 を短くまとめたダイジェスト。