Skip to content

Commit

Permalink
fix job loading when selecting good job
Browse files Browse the repository at this point in the history
  • Loading branch information
orangewolf committed Oct 3, 2023
1 parent f54672e commit 3552664
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 1 deletion.
2 changes: 1 addition & 1 deletion config/initializers/apartment.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

# Add any models that you do not want to be multi-tenanted, but remain in the global (public) namespace.
# A typical example would be a Customer or Tenant model that stores each Tenant's information.
config.excluded_models = %w{ Account AccountCrossSearch DomainName Endpoint User UserStat SolrEndpoint FcrepoEndpoint RedisEndpoint }
config.excluded_models = %w{ Account AccountCrossSearch DomainName Endpoint User UserStat SolrEndpoint FcrepoEndpoint RedisEndpoint GoodJob::Execution GoodJob::Job GoodJob::Process }

# In order to migrate all of your Tenants you need to provide a list of Tenant names to Apartment.
# You can make this dynamic by providing a Proc object to be called on migrations.
Expand Down
16 changes: 16 additions & 0 deletions db/migrate/20230406183810_setup_good_jobs_schema.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# frozen_string_literal: true

# This migration pre-sets the shared_extensions schema for in prep for good_jobs
class SetupGoodJobsSchema < ActiveRecord::Migration[5.2]
def change
# Create Schema
ActiveRecord::Base.connection.execute 'CREATE SCHEMA IF NOT EXISTS shared_extensions;'
# Enable Hstore
ActiveRecord::Base.connection.execute 'CREATE EXTENSION IF NOT EXISTS HSTORE SCHEMA shared_extensions;'
# Enable UUID-OSSP
ActiveRecord::Base.connection.execute 'CREATE EXTENSION IF NOT EXISTS "uuid-ossp" SCHEMA shared_extensions;'
ActiveRecord::Base.connection.execute 'CREATE EXTENSION IF NOT EXISTS "pgcrypto" SCHEMA shared_extensions;'
# Grant usage to public
ActiveRecord::Base.connection.execute 'GRANT usage ON SCHEMA shared_extensions to public;'
end
end
2 changes: 2 additions & 0 deletions db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@
ActiveRecord::Schema.define(version: 2023_08_04_073106) do

# These are extensions that must be enabled in order to support this database
enable_extension "hstore"
enable_extension "pgcrypto"
enable_extension "plpgsql"
enable_extension "uuid-ossp"

create_table "account_cross_searches", force: :cascade do |t|
t.bigint "search_account_id"
Expand Down

0 comments on commit 3552664

Please sign in to comment.