PostgreSQL types in context based multi-tenancy

Đang mở
#538 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
48/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
elixir, postgresql
Lĩnh vực
databases

Hướng nghiên cứu

Theo dõi cách xử lý custom_statements và các luồng migration có tenant và không có tenant được mô tả trong issue. Kiểm tra cách một statement có thể được đánh dấu là global, sau đó xác minh rằng statement CREATE TYPE chạy một lần cho cơ sở dữ liệu, trong khi các statement có phạm vi tenant vẫn chạy cho từng tenant; xác nhận hành vi khi tenant thứ hai được tạo.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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
Ngôn ngữ chính
Elixir
Star
191
Fork
186
Merge trung bình
16 giờ 4 phút
Pull request đã merge (30 ngày)
17

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của ash-project/ash_postgres

Tất cả issue của ash-project/ash_postgres

Issue tương tự

Thêm issue về Elixir

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.