gpt4 book ai didi

ruby-on-rails - gem 公寓 : One of the following schema(s) is invalid

转载 作者:行者123 更新时间:2023-11-29 11:49:28 26 4
gpt4 key购买 nike

在执行 rake db:migrate 时,出现此错误:

Migrating alpha tenant One of the following schema(s) is invalid: "alpha" "public"

我的公寓初始化器配置:

require 'apartment/elevators/subdomain'
# require 'apartment/elevators/first_subdomain'

#
# Apartment Configuration
#
Apartment.configure do |config|

config.tenant_names = YAML::load_file('./config/site-settings.yml').symbolize_keys

end

# Rails.application.config.middleware.use 'Apartment::Elevators::Domain'
Rails.application.config.middleware.use 'Apartment::Elevators::Subdomain'

最佳答案

我遇到了同样的问题,这里的解决方案帮助了我

我只是在我的 Multi-Tenancy 的子域模型中添加了一个名为 create_tenantafter_create 回调,即 user.rb app/models/user.rb

在下面找到 Stackoverflow 上的链接以获得详细答案 https://stackoverflow.com/a/57771338/10907864

关于ruby-on-rails - gem 公寓 : One of the following schema(s) is invalid,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43719312/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com