From 745ad73d7bf2b057bcda7e131af2ce0112318c52 Mon Sep 17 00:00:00 2001 From: Paul DobbinSchmaltz Date: Thu, 19 Dec 2024 13:43:46 -0600 Subject: [PATCH] Make the server runnable in production env Don't autoload templates. These are just used as generators and will fail with syntax errors at autoload time in the production env. Don't add environmnet-specific encrypted credentials keys to the repo. - Also, we needed to check in config/credentials/production.yml.enc. Fix the schema dumps for the solid trifecta to use *_structure.sql, as expected in this app (as per the application config: `config.active_record.schema_format = :sql`). - This was required to get the database tables built when running e.g. `RAILS_ENV=production DB_PASSWORD= rails db:create` ... and friends. - Basically, there's no other way that the databases for the solid_* gems can be created/added (we don't have their migration files). - See: https://github.com/rails/solid_cache/issues/228 --- .gitignore | 1 + config/application.rb | 2 +- config/credentials/production.yml.enc | 1 + config/database.yml | 2 +- db/cable_schema.rb | 13 - db/cable_structure.sql | 130 ++++ db/cache_schema.rb | 16 - db/cache_structure.sql | 131 ++++ db/queue_schema.rb | 169 ------ db/queue_structure.sql | 833 ++++++++++++++++++++++++++ 10 files changed, 1098 insertions(+), 200 deletions(-) create mode 100644 config/credentials/production.yml.enc delete mode 100644 db/cable_schema.rb create mode 100644 db/cable_structure.sql delete mode 100644 db/cache_schema.rb create mode 100644 db/cache_structure.sql delete mode 100644 db/queue_schema.rb create mode 100644 db/queue_structure.sql diff --git a/.gitignore b/.gitignore index d10870a7..8ebc55a2 100644 --- a/.gitignore +++ b/.gitignore @@ -32,6 +32,7 @@ # Ignore master key for decrypting credentials and more. /config/master.key +/config/credentials/*.key /app/assets/builds/* !/app/assets/builds/.keep diff --git a/config/application.rb b/config/application.rb index f7db05fd..022f9833 100644 --- a/config/application.rb +++ b/config/application.rb @@ -29,7 +29,7 @@ class Application < Rails::Application # Please, add to the `ignore` list any other `lib` subdirectories that do # not contain `.rb` files, or that should not be reloaded or eager loaded. # Common ones are `templates`, `generators`, or `middleware`, for example. - config.autoload_lib(ignore: %w[assets tasks]) + config.autoload_lib(ignore: %w[assets tasks templates]) # Configuration for the application, engines, and railties goes here. # diff --git a/config/credentials/production.yml.enc b/config/credentials/production.yml.enc new file mode 100644 index 00000000..17454bad --- /dev/null +++ b/config/credentials/production.yml.enc @@ -0,0 +1 @@ +yDaM7cxL47Q/z3xc+I9Izm/LoSyele5jMaPT33ugHbeLNOvwx+gGh2D6TzIdKVcjO/L3M1S8GGT209kqntJcAs0/iNPO04IKstcPYdDc4pqzaw5xq8ND+hMQ+o42luaoXBNwE0yqxsX0E+4Aq4jyU2uPn7lm0XRCbykee1KENlFX7lwbuvDAHyUFMRkaxhNeNHFQotp+tw+HBhYmSXDpfzpC2DdmsncOXX68chtIE9/kirecF5yV1VW7d6N88gZRmiK60jHdPR/DriDvCNBGLyCgnuPabW870CckmAiTJKFf/nsGUh4Fq4e908oxrR0LoY2ItP1DXHdlq4Pgp1+fkt7jrDzaNwnjx4OqLmx+y+wzIXXF0LaQ0Hix5tADmETXfRNNV67sJZ34UNn/0tQ5vPAy4JqHTLv2pLJHbpw3d7WyXeDmj4hCMJSK2vNililgXSGXtmMUjoXYFwTQ1+UfoAbl1u3sXv1Mg6srzq1J9ZHdPRNn1oZyPz1q--pZqoLx0eufR0I5a3--7n4oId0EAaQAtUYeuRfhRg== diff --git a/config/database.yml b/config/database.yml index bb8a84b0..9b5f895d 100644 --- a/config/database.yml +++ b/config/database.yml @@ -82,7 +82,7 @@ production: <<: *default database: minesweeper_alliance_production username: minesweeper_alliance - password: <%= ENV["MINESWEEPER_ALLIANCE_DATABASE_PASSWORD"] %> + password: <%= ENV["DB_PASSWORD"] %> cache: <<: *primary_production database: minesweeper_alliance_production_cache diff --git a/db/cable_schema.rb b/db/cable_schema.rb deleted file mode 100644 index 7389a703..00000000 --- a/db/cable_schema.rb +++ /dev/null @@ -1,13 +0,0 @@ -# frozen_string_literal: true - -ActiveRecord::Schema[7.1].define(version: 1) do - create_table "solid_cable_messages", force: :cascade do |t| - t.binary "channel", limit: 1024, null: false - t.binary "payload", limit: 536_870_912, null: false - t.datetime "created_at", null: false - t.integer "channel_hash", limit: 8, null: false - t.index ["channel"], name: "index_solid_cable_messages_on_channel" - t.index ["channel_hash"], name: "index_solid_cable_messages_on_channel_hash" - t.index ["created_at"], name: "index_solid_cable_messages_on_created_at" - end -end diff --git a/db/cable_structure.sql b/db/cable_structure.sql new file mode 100644 index 00000000..005b86c0 --- /dev/null +++ b/db/cable_structure.sql @@ -0,0 +1,130 @@ +SET statement_timeout = 0; +SET lock_timeout = 0; +SET idle_in_transaction_session_timeout = 0; +SET transaction_timeout = 0; +SET client_encoding = 'UTF8'; +SET standard_conforming_strings = on; +SELECT pg_catalog.set_config('search_path', '', false); +SET check_function_bodies = false; +SET xmloption = content; +SET client_min_messages = warning; +SET row_security = off; + +SET default_tablespace = ''; + +SET default_table_access_method = heap; + +-- +-- Name: ar_internal_metadata; Type: TABLE; Schema: public; Owner: - +-- + +CREATE TABLE public.ar_internal_metadata ( + key character varying NOT NULL, + value character varying, + created_at timestamp(6) with time zone NOT NULL, + updated_at timestamp(6) with time zone NOT NULL +); + + +-- +-- Name: schema_migrations; Type: TABLE; Schema: public; Owner: - +-- + +CREATE TABLE public.schema_migrations ( + version character varying NOT NULL +); + + +-- +-- Name: solid_cable_messages; Type: TABLE; Schema: public; Owner: - +-- + +CREATE TABLE public.solid_cable_messages ( + id bigint NOT NULL, + channel bytea NOT NULL, + payload bytea NOT NULL, + created_at timestamp(6) with time zone NOT NULL, + channel_hash bigint NOT NULL +); + + +-- +-- Name: solid_cable_messages_id_seq; Type: SEQUENCE; Schema: public; Owner: - +-- + +CREATE SEQUENCE public.solid_cable_messages_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +-- +-- Name: solid_cable_messages_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - +-- + +ALTER SEQUENCE public.solid_cable_messages_id_seq OWNED BY public.solid_cable_messages.id; + + +-- +-- Name: solid_cable_messages id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public.solid_cable_messages ALTER COLUMN id SET DEFAULT nextval('public.solid_cable_messages_id_seq'::regclass); + + +-- +-- Name: ar_internal_metadata ar_internal_metadata_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public.ar_internal_metadata + ADD CONSTRAINT ar_internal_metadata_pkey PRIMARY KEY (key); + + +-- +-- Name: schema_migrations schema_migrations_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public.schema_migrations + ADD CONSTRAINT schema_migrations_pkey PRIMARY KEY (version); + + +-- +-- Name: solid_cable_messages solid_cable_messages_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public.solid_cable_messages + ADD CONSTRAINT solid_cable_messages_pkey PRIMARY KEY (id); + + +-- +-- Name: index_solid_cable_messages_on_channel; Type: INDEX; Schema: public; Owner: - +-- + +CREATE INDEX index_solid_cable_messages_on_channel ON public.solid_cable_messages USING btree (channel); + + +-- +-- Name: index_solid_cable_messages_on_channel_hash; Type: INDEX; Schema: public; Owner: - +-- + +CREATE INDEX index_solid_cable_messages_on_channel_hash ON public.solid_cable_messages USING btree (channel_hash); + + +-- +-- Name: index_solid_cable_messages_on_created_at; Type: INDEX; Schema: public; Owner: - +-- + +CREATE INDEX index_solid_cable_messages_on_created_at ON public.solid_cable_messages USING btree (created_at); + + +-- +-- PostgreSQL database dump complete +-- + +SET search_path TO "$user", public; + +INSERT INTO "schema_migrations" (version) VALUES +('1'); + diff --git a/db/cache_schema.rb b/db/cache_schema.rb deleted file mode 100644 index ef316bf7..00000000 --- a/db/cache_schema.rb +++ /dev/null @@ -1,16 +0,0 @@ -# frozen_string_literal: true - -ActiveRecord::Schema[7.2].define(version: 1) do - create_table "solid_cache_entries", force: :cascade do |t| - t.binary "key", limit: 1024, null: false - t.binary "value", limit: 536_870_912, null: false - t.datetime "created_at", null: false - t.integer "key_hash", limit: 8, null: false - t.integer "byte_size", limit: 4, null: false - t.index ["byte_size"], name: "index_solid_cache_entries_on_byte_size" - t.index %w[key_hash byte_size], - name: "index_solid_cache_entries_on_key_hash_and_byte_size" - t.index ["key_hash"], name: "index_solid_cache_entries_on_key_hash", - unique: true - end -end diff --git a/db/cache_structure.sql b/db/cache_structure.sql new file mode 100644 index 00000000..55772326 --- /dev/null +++ b/db/cache_structure.sql @@ -0,0 +1,131 @@ +SET statement_timeout = 0; +SET lock_timeout = 0; +SET idle_in_transaction_session_timeout = 0; +SET transaction_timeout = 0; +SET client_encoding = 'UTF8'; +SET standard_conforming_strings = on; +SELECT pg_catalog.set_config('search_path', '', false); +SET check_function_bodies = false; +SET xmloption = content; +SET client_min_messages = warning; +SET row_security = off; + +SET default_tablespace = ''; + +SET default_table_access_method = heap; + +-- +-- Name: ar_internal_metadata; Type: TABLE; Schema: public; Owner: - +-- + +CREATE TABLE public.ar_internal_metadata ( + key character varying NOT NULL, + value character varying, + created_at timestamp(6) with time zone NOT NULL, + updated_at timestamp(6) with time zone NOT NULL +); + + +-- +-- Name: schema_migrations; Type: TABLE; Schema: public; Owner: - +-- + +CREATE TABLE public.schema_migrations ( + version character varying NOT NULL +); + + +-- +-- Name: solid_cache_entries; Type: TABLE; Schema: public; Owner: - +-- + +CREATE TABLE public.solid_cache_entries ( + id bigint NOT NULL, + key bytea NOT NULL, + value bytea NOT NULL, + created_at timestamp(6) with time zone NOT NULL, + key_hash bigint NOT NULL, + byte_size integer NOT NULL +); + + +-- +-- Name: solid_cache_entries_id_seq; Type: SEQUENCE; Schema: public; Owner: - +-- + +CREATE SEQUENCE public.solid_cache_entries_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +-- +-- Name: solid_cache_entries_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - +-- + +ALTER SEQUENCE public.solid_cache_entries_id_seq OWNED BY public.solid_cache_entries.id; + + +-- +-- Name: solid_cache_entries id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public.solid_cache_entries ALTER COLUMN id SET DEFAULT nextval('public.solid_cache_entries_id_seq'::regclass); + + +-- +-- Name: ar_internal_metadata ar_internal_metadata_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public.ar_internal_metadata + ADD CONSTRAINT ar_internal_metadata_pkey PRIMARY KEY (key); + + +-- +-- Name: schema_migrations schema_migrations_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public.schema_migrations + ADD CONSTRAINT schema_migrations_pkey PRIMARY KEY (version); + + +-- +-- Name: solid_cache_entries solid_cache_entries_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public.solid_cache_entries + ADD CONSTRAINT solid_cache_entries_pkey PRIMARY KEY (id); + + +-- +-- Name: index_solid_cache_entries_on_byte_size; Type: INDEX; Schema: public; Owner: - +-- + +CREATE INDEX index_solid_cache_entries_on_byte_size ON public.solid_cache_entries USING btree (byte_size); + + +-- +-- Name: index_solid_cache_entries_on_key_hash; Type: INDEX; Schema: public; Owner: - +-- + +CREATE UNIQUE INDEX index_solid_cache_entries_on_key_hash ON public.solid_cache_entries USING btree (key_hash); + + +-- +-- Name: index_solid_cache_entries_on_key_hash_and_byte_size; Type: INDEX; Schema: public; Owner: - +-- + +CREATE INDEX index_solid_cache_entries_on_key_hash_and_byte_size ON public.solid_cache_entries USING btree (key_hash, byte_size); + + +-- +-- PostgreSQL database dump complete +-- + +SET search_path TO "$user", public; + +INSERT INTO "schema_migrations" (version) VALUES +('1'); + diff --git a/db/queue_schema.rb b/db/queue_schema.rb deleted file mode 100644 index 74520672..00000000 --- a/db/queue_schema.rb +++ /dev/null @@ -1,169 +0,0 @@ -# frozen_string_literal: true - -# rubocop:todo Metrics/BlockLength -ActiveRecord::Schema[7.1].define(version: 1) do - create_table "solid_queue_blocked_executions", force: :cascade do |t| - t.bigint "job_id", null: false - t.string "queue_name", null: false - t.integer "priority", default: 0, null: false - t.string "concurrency_key", null: false - t.datetime "expires_at", null: false - t.datetime "created_at", null: false - t.index %w[concurrency_key priority job_id], - name: "index_solid_queue_blocked_executions_for_release" - t.index %w[expires_at concurrency_key], - name: "index_solid_queue_blocked_executions_for_maintenance" - t.index ["job_id"], - name: "index_solid_queue_blocked_executions_on_job_id", unique: true - end - - create_table "solid_queue_claimed_executions", force: :cascade do |t| - t.bigint "job_id", null: false - t.bigint "process_id" - t.datetime "created_at", null: false - t.index ["job_id"], - name: "index_solid_queue_claimed_executions_on_job_id", unique: true - t.index %w[process_id job_id], - # rubocop:todo Layout/LineLength - name: "index_solid_queue_claimed_executions_on_process_id_and_job_id" - # rubocop:enable Layout/LineLength - end - - create_table "solid_queue_failed_executions", force: :cascade do |t| - t.bigint "job_id", null: false - t.text "error" - t.datetime "created_at", null: false - t.index ["job_id"], - name: "index_solid_queue_failed_executions_on_job_id", unique: true - end - - create_table "solid_queue_jobs", force: :cascade do |t| - t.string "queue_name", null: false - t.string "class_name", null: false - t.text "arguments" - t.integer "priority", default: 0, null: false - t.string "active_job_id" - t.datetime "scheduled_at" - t.datetime "finished_at" - t.string "concurrency_key" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.index ["active_job_id"], name: "index_solid_queue_jobs_on_active_job_id" - t.index ["class_name"], name: "index_solid_queue_jobs_on_class_name" - t.index ["finished_at"], name: "index_solid_queue_jobs_on_finished_at" - t.index %w[queue_name finished_at], - name: "index_solid_queue_jobs_for_filtering" - t.index %w[scheduled_at finished_at], - name: "index_solid_queue_jobs_for_alerting" - end - - create_table "solid_queue_pauses", force: :cascade do |t| - t.string "queue_name", null: false - t.datetime "created_at", null: false - t.index ["queue_name"], name: "index_solid_queue_pauses_on_queue_name", - unique: true - end - - create_table "solid_queue_processes", force: :cascade do |t| - t.string "kind", null: false - t.datetime "last_heartbeat_at", null: false - t.bigint "supervisor_id" - t.integer "pid", null: false - t.string "hostname" - t.text "metadata" - t.datetime "created_at", null: false - t.string "name", null: false - t.index ["last_heartbeat_at"], - name: "index_solid_queue_processes_on_last_heartbeat_at" - t.index %w[name supervisor_id], - # rubocop:todo Layout/LineLength - name: "index_solid_queue_processes_on_name_and_supervisor_id", unique: true - # rubocop:enable Layout/LineLength - t.index ["supervisor_id"], - name: "index_solid_queue_processes_on_supervisor_id" - end - - create_table "solid_queue_ready_executions", force: :cascade do |t| - t.bigint "job_id", null: false - t.string "queue_name", null: false - t.integer "priority", default: 0, null: false - t.datetime "created_at", null: false - t.index ["job_id"], name: "index_solid_queue_ready_executions_on_job_id", - unique: true - t.index %w[priority job_id], name: "index_solid_queue_poll_all" - t.index %w[queue_name priority job_id], - name: "index_solid_queue_poll_by_queue" - end - - create_table "solid_queue_recurring_executions", force: :cascade do |t| - t.bigint "job_id", null: false - t.string "task_key", null: false - t.datetime "run_at", null: false - t.datetime "created_at", null: false - t.index ["job_id"], - # rubocop:todo Layout/LineLength - name: "index_solid_queue_recurring_executions_on_job_id", unique: true - # rubocop:enable Layout/LineLength - t.index %w[task_key run_at], - # rubocop:todo Layout/LineLength - name: "index_solid_queue_recurring_executions_on_task_key_and_run_at", unique: true - # rubocop:enable Layout/LineLength - end - - create_table "solid_queue_recurring_tasks", force: :cascade do |t| - t.string "key", null: false - t.string "schedule", null: false - t.string "command", limit: 2048 - t.string "class_name" - t.text "arguments" - t.string "queue_name" - t.integer "priority", default: 0 - t.boolean "static", default: true, null: false - t.text "description" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.index ["key"], name: "index_solid_queue_recurring_tasks_on_key", - unique: true - t.index ["static"], name: "index_solid_queue_recurring_tasks_on_static" - end - - create_table "solid_queue_scheduled_executions", force: :cascade do |t| - t.bigint "job_id", null: false - t.string "queue_name", null: false - t.integer "priority", default: 0, null: false - t.datetime "scheduled_at", null: false - t.datetime "created_at", null: false - t.index ["job_id"], - # rubocop:todo Layout/LineLength - name: "index_solid_queue_scheduled_executions_on_job_id", unique: true - # rubocop:enable Layout/LineLength - t.index %w[scheduled_at priority job_id], - name: "index_solid_queue_dispatch_all" - end - - create_table "solid_queue_semaphores", force: :cascade do |t| - t.string "key", null: false - t.integer "value", default: 1, null: false - t.datetime "expires_at", null: false - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.index ["expires_at"], name: "index_solid_queue_semaphores_on_expires_at" - t.index %w[key value], - name: "index_solid_queue_semaphores_on_key_and_value" - t.index ["key"], name: "index_solid_queue_semaphores_on_key", unique: true - end - - add_foreign_key "solid_queue_blocked_executions", "solid_queue_jobs", - column: "job_id", on_delete: :cascade - add_foreign_key "solid_queue_claimed_executions", "solid_queue_jobs", - column: "job_id", on_delete: :cascade - add_foreign_key "solid_queue_failed_executions", "solid_queue_jobs", - column: "job_id", on_delete: :cascade - add_foreign_key "solid_queue_ready_executions", "solid_queue_jobs", - column: "job_id", on_delete: :cascade - add_foreign_key "solid_queue_recurring_executions", "solid_queue_jobs", - column: "job_id", on_delete: :cascade - add_foreign_key "solid_queue_scheduled_executions", "solid_queue_jobs", - column: "job_id", on_delete: :cascade -end -# rubocop:enable Metrics/BlockLength diff --git a/db/queue_structure.sql b/db/queue_structure.sql new file mode 100644 index 00000000..1644867c --- /dev/null +++ b/db/queue_structure.sql @@ -0,0 +1,833 @@ +SET statement_timeout = 0; +SET lock_timeout = 0; +SET idle_in_transaction_session_timeout = 0; +SET transaction_timeout = 0; +SET client_encoding = 'UTF8'; +SET standard_conforming_strings = on; +SELECT pg_catalog.set_config('search_path', '', false); +SET check_function_bodies = false; +SET xmloption = content; +SET client_min_messages = warning; +SET row_security = off; + +SET default_tablespace = ''; + +SET default_table_access_method = heap; + +-- +-- Name: ar_internal_metadata; Type: TABLE; Schema: public; Owner: - +-- + +CREATE TABLE public.ar_internal_metadata ( + key character varying NOT NULL, + value character varying, + created_at timestamp(6) with time zone NOT NULL, + updated_at timestamp(6) with time zone NOT NULL +); + + +-- +-- Name: schema_migrations; Type: TABLE; Schema: public; Owner: - +-- + +CREATE TABLE public.schema_migrations ( + version character varying NOT NULL +); + + +-- +-- Name: solid_queue_blocked_executions; Type: TABLE; Schema: public; Owner: - +-- + +CREATE TABLE public.solid_queue_blocked_executions ( + id bigint NOT NULL, + job_id bigint NOT NULL, + queue_name character varying NOT NULL, + priority integer DEFAULT 0 NOT NULL, + concurrency_key character varying NOT NULL, + expires_at timestamp(6) with time zone NOT NULL, + created_at timestamp(6) with time zone NOT NULL +); + + +-- +-- Name: solid_queue_blocked_executions_id_seq; Type: SEQUENCE; Schema: public; Owner: - +-- + +CREATE SEQUENCE public.solid_queue_blocked_executions_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +-- +-- Name: solid_queue_blocked_executions_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - +-- + +ALTER SEQUENCE public.solid_queue_blocked_executions_id_seq OWNED BY public.solid_queue_blocked_executions.id; + + +-- +-- Name: solid_queue_claimed_executions; Type: TABLE; Schema: public; Owner: - +-- + +CREATE TABLE public.solid_queue_claimed_executions ( + id bigint NOT NULL, + job_id bigint NOT NULL, + process_id bigint, + created_at timestamp(6) with time zone NOT NULL +); + + +-- +-- Name: solid_queue_claimed_executions_id_seq; Type: SEQUENCE; Schema: public; Owner: - +-- + +CREATE SEQUENCE public.solid_queue_claimed_executions_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +-- +-- Name: solid_queue_claimed_executions_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - +-- + +ALTER SEQUENCE public.solid_queue_claimed_executions_id_seq OWNED BY public.solid_queue_claimed_executions.id; + + +-- +-- Name: solid_queue_failed_executions; Type: TABLE; Schema: public; Owner: - +-- + +CREATE TABLE public.solid_queue_failed_executions ( + id bigint NOT NULL, + job_id bigint NOT NULL, + error text, + created_at timestamp(6) with time zone NOT NULL +); + + +-- +-- Name: solid_queue_failed_executions_id_seq; Type: SEQUENCE; Schema: public; Owner: - +-- + +CREATE SEQUENCE public.solid_queue_failed_executions_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +-- +-- Name: solid_queue_failed_executions_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - +-- + +ALTER SEQUENCE public.solid_queue_failed_executions_id_seq OWNED BY public.solid_queue_failed_executions.id; + + +-- +-- Name: solid_queue_jobs; Type: TABLE; Schema: public; Owner: - +-- + +CREATE TABLE public.solid_queue_jobs ( + id bigint NOT NULL, + queue_name character varying NOT NULL, + class_name character varying NOT NULL, + arguments text, + priority integer DEFAULT 0 NOT NULL, + active_job_id character varying, + scheduled_at timestamp(6) with time zone, + finished_at timestamp(6) with time zone, + concurrency_key character varying, + created_at timestamp(6) with time zone NOT NULL, + updated_at timestamp(6) with time zone NOT NULL +); + + +-- +-- Name: solid_queue_jobs_id_seq; Type: SEQUENCE; Schema: public; Owner: - +-- + +CREATE SEQUENCE public.solid_queue_jobs_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +-- +-- Name: solid_queue_jobs_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - +-- + +ALTER SEQUENCE public.solid_queue_jobs_id_seq OWNED BY public.solid_queue_jobs.id; + + +-- +-- Name: solid_queue_pauses; Type: TABLE; Schema: public; Owner: - +-- + +CREATE TABLE public.solid_queue_pauses ( + id bigint NOT NULL, + queue_name character varying NOT NULL, + created_at timestamp(6) with time zone NOT NULL +); + + +-- +-- Name: solid_queue_pauses_id_seq; Type: SEQUENCE; Schema: public; Owner: - +-- + +CREATE SEQUENCE public.solid_queue_pauses_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +-- +-- Name: solid_queue_pauses_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - +-- + +ALTER SEQUENCE public.solid_queue_pauses_id_seq OWNED BY public.solid_queue_pauses.id; + + +-- +-- Name: solid_queue_processes; Type: TABLE; Schema: public; Owner: - +-- + +CREATE TABLE public.solid_queue_processes ( + id bigint NOT NULL, + kind character varying NOT NULL, + last_heartbeat_at timestamp(6) with time zone NOT NULL, + supervisor_id bigint, + pid integer NOT NULL, + hostname character varying, + metadata text, + created_at timestamp(6) with time zone NOT NULL, + name character varying NOT NULL +); + + +-- +-- Name: solid_queue_processes_id_seq; Type: SEQUENCE; Schema: public; Owner: - +-- + +CREATE SEQUENCE public.solid_queue_processes_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +-- +-- Name: solid_queue_processes_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - +-- + +ALTER SEQUENCE public.solid_queue_processes_id_seq OWNED BY public.solid_queue_processes.id; + + +-- +-- Name: solid_queue_ready_executions; Type: TABLE; Schema: public; Owner: - +-- + +CREATE TABLE public.solid_queue_ready_executions ( + id bigint NOT NULL, + job_id bigint NOT NULL, + queue_name character varying NOT NULL, + priority integer DEFAULT 0 NOT NULL, + created_at timestamp(6) with time zone NOT NULL +); + + +-- +-- Name: solid_queue_ready_executions_id_seq; Type: SEQUENCE; Schema: public; Owner: - +-- + +CREATE SEQUENCE public.solid_queue_ready_executions_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +-- +-- Name: solid_queue_ready_executions_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - +-- + +ALTER SEQUENCE public.solid_queue_ready_executions_id_seq OWNED BY public.solid_queue_ready_executions.id; + + +-- +-- Name: solid_queue_recurring_executions; Type: TABLE; Schema: public; Owner: - +-- + +CREATE TABLE public.solid_queue_recurring_executions ( + id bigint NOT NULL, + job_id bigint NOT NULL, + task_key character varying NOT NULL, + run_at timestamp(6) with time zone NOT NULL, + created_at timestamp(6) with time zone NOT NULL +); + + +-- +-- Name: solid_queue_recurring_executions_id_seq; Type: SEQUENCE; Schema: public; Owner: - +-- + +CREATE SEQUENCE public.solid_queue_recurring_executions_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +-- +-- Name: solid_queue_recurring_executions_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - +-- + +ALTER SEQUENCE public.solid_queue_recurring_executions_id_seq OWNED BY public.solid_queue_recurring_executions.id; + + +-- +-- Name: solid_queue_recurring_tasks; Type: TABLE; Schema: public; Owner: - +-- + +CREATE TABLE public.solid_queue_recurring_tasks ( + id bigint NOT NULL, + key character varying NOT NULL, + schedule character varying NOT NULL, + command character varying(2048), + class_name character varying, + arguments text, + queue_name character varying, + priority integer DEFAULT 0, + static boolean DEFAULT true NOT NULL, + description text, + created_at timestamp(6) with time zone NOT NULL, + updated_at timestamp(6) with time zone NOT NULL +); + + +-- +-- Name: solid_queue_recurring_tasks_id_seq; Type: SEQUENCE; Schema: public; Owner: - +-- + +CREATE SEQUENCE public.solid_queue_recurring_tasks_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +-- +-- Name: solid_queue_recurring_tasks_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - +-- + +ALTER SEQUENCE public.solid_queue_recurring_tasks_id_seq OWNED BY public.solid_queue_recurring_tasks.id; + + +-- +-- Name: solid_queue_scheduled_executions; Type: TABLE; Schema: public; Owner: - +-- + +CREATE TABLE public.solid_queue_scheduled_executions ( + id bigint NOT NULL, + job_id bigint NOT NULL, + queue_name character varying NOT NULL, + priority integer DEFAULT 0 NOT NULL, + scheduled_at timestamp(6) with time zone NOT NULL, + created_at timestamp(6) with time zone NOT NULL +); + + +-- +-- Name: solid_queue_scheduled_executions_id_seq; Type: SEQUENCE; Schema: public; Owner: - +-- + +CREATE SEQUENCE public.solid_queue_scheduled_executions_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +-- +-- Name: solid_queue_scheduled_executions_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - +-- + +ALTER SEQUENCE public.solid_queue_scheduled_executions_id_seq OWNED BY public.solid_queue_scheduled_executions.id; + + +-- +-- Name: solid_queue_semaphores; Type: TABLE; Schema: public; Owner: - +-- + +CREATE TABLE public.solid_queue_semaphores ( + id bigint NOT NULL, + key character varying NOT NULL, + value integer DEFAULT 1 NOT NULL, + expires_at timestamp(6) with time zone NOT NULL, + created_at timestamp(6) with time zone NOT NULL, + updated_at timestamp(6) with time zone NOT NULL +); + + +-- +-- Name: solid_queue_semaphores_id_seq; Type: SEQUENCE; Schema: public; Owner: - +-- + +CREATE SEQUENCE public.solid_queue_semaphores_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +-- +-- Name: solid_queue_semaphores_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - +-- + +ALTER SEQUENCE public.solid_queue_semaphores_id_seq OWNED BY public.solid_queue_semaphores.id; + + +-- +-- Name: solid_queue_blocked_executions id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public.solid_queue_blocked_executions ALTER COLUMN id SET DEFAULT nextval('public.solid_queue_blocked_executions_id_seq'::regclass); + + +-- +-- Name: solid_queue_claimed_executions id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public.solid_queue_claimed_executions ALTER COLUMN id SET DEFAULT nextval('public.solid_queue_claimed_executions_id_seq'::regclass); + + +-- +-- Name: solid_queue_failed_executions id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public.solid_queue_failed_executions ALTER COLUMN id SET DEFAULT nextval('public.solid_queue_failed_executions_id_seq'::regclass); + + +-- +-- Name: solid_queue_jobs id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public.solid_queue_jobs ALTER COLUMN id SET DEFAULT nextval('public.solid_queue_jobs_id_seq'::regclass); + + +-- +-- Name: solid_queue_pauses id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public.solid_queue_pauses ALTER COLUMN id SET DEFAULT nextval('public.solid_queue_pauses_id_seq'::regclass); + + +-- +-- Name: solid_queue_processes id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public.solid_queue_processes ALTER COLUMN id SET DEFAULT nextval('public.solid_queue_processes_id_seq'::regclass); + + +-- +-- Name: solid_queue_ready_executions id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public.solid_queue_ready_executions ALTER COLUMN id SET DEFAULT nextval('public.solid_queue_ready_executions_id_seq'::regclass); + + +-- +-- Name: solid_queue_recurring_executions id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public.solid_queue_recurring_executions ALTER COLUMN id SET DEFAULT nextval('public.solid_queue_recurring_executions_id_seq'::regclass); + + +-- +-- Name: solid_queue_recurring_tasks id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public.solid_queue_recurring_tasks ALTER COLUMN id SET DEFAULT nextval('public.solid_queue_recurring_tasks_id_seq'::regclass); + + +-- +-- Name: solid_queue_scheduled_executions id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public.solid_queue_scheduled_executions ALTER COLUMN id SET DEFAULT nextval('public.solid_queue_scheduled_executions_id_seq'::regclass); + + +-- +-- Name: solid_queue_semaphores id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public.solid_queue_semaphores ALTER COLUMN id SET DEFAULT nextval('public.solid_queue_semaphores_id_seq'::regclass); + + +-- +-- Name: ar_internal_metadata ar_internal_metadata_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public.ar_internal_metadata + ADD CONSTRAINT ar_internal_metadata_pkey PRIMARY KEY (key); + + +-- +-- Name: schema_migrations schema_migrations_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public.schema_migrations + ADD CONSTRAINT schema_migrations_pkey PRIMARY KEY (version); + + +-- +-- Name: solid_queue_blocked_executions solid_queue_blocked_executions_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public.solid_queue_blocked_executions + ADD CONSTRAINT solid_queue_blocked_executions_pkey PRIMARY KEY (id); + + +-- +-- Name: solid_queue_claimed_executions solid_queue_claimed_executions_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public.solid_queue_claimed_executions + ADD CONSTRAINT solid_queue_claimed_executions_pkey PRIMARY KEY (id); + + +-- +-- Name: solid_queue_failed_executions solid_queue_failed_executions_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public.solid_queue_failed_executions + ADD CONSTRAINT solid_queue_failed_executions_pkey PRIMARY KEY (id); + + +-- +-- Name: solid_queue_jobs solid_queue_jobs_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public.solid_queue_jobs + ADD CONSTRAINT solid_queue_jobs_pkey PRIMARY KEY (id); + + +-- +-- Name: solid_queue_pauses solid_queue_pauses_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public.solid_queue_pauses + ADD CONSTRAINT solid_queue_pauses_pkey PRIMARY KEY (id); + + +-- +-- Name: solid_queue_processes solid_queue_processes_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public.solid_queue_processes + ADD CONSTRAINT solid_queue_processes_pkey PRIMARY KEY (id); + + +-- +-- Name: solid_queue_ready_executions solid_queue_ready_executions_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public.solid_queue_ready_executions + ADD CONSTRAINT solid_queue_ready_executions_pkey PRIMARY KEY (id); + + +-- +-- Name: solid_queue_recurring_executions solid_queue_recurring_executions_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public.solid_queue_recurring_executions + ADD CONSTRAINT solid_queue_recurring_executions_pkey PRIMARY KEY (id); + + +-- +-- Name: solid_queue_recurring_tasks solid_queue_recurring_tasks_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public.solid_queue_recurring_tasks + ADD CONSTRAINT solid_queue_recurring_tasks_pkey PRIMARY KEY (id); + + +-- +-- Name: solid_queue_scheduled_executions solid_queue_scheduled_executions_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public.solid_queue_scheduled_executions + ADD CONSTRAINT solid_queue_scheduled_executions_pkey PRIMARY KEY (id); + + +-- +-- Name: solid_queue_semaphores solid_queue_semaphores_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public.solid_queue_semaphores + ADD CONSTRAINT solid_queue_semaphores_pkey PRIMARY KEY (id); + + +-- +-- Name: index_solid_queue_blocked_executions_for_maintenance; Type: INDEX; Schema: public; Owner: - +-- + +CREATE INDEX index_solid_queue_blocked_executions_for_maintenance ON public.solid_queue_blocked_executions USING btree (expires_at, concurrency_key); + + +-- +-- Name: index_solid_queue_blocked_executions_for_release; Type: INDEX; Schema: public; Owner: - +-- + +CREATE INDEX index_solid_queue_blocked_executions_for_release ON public.solid_queue_blocked_executions USING btree (concurrency_key, priority, job_id); + + +-- +-- Name: index_solid_queue_blocked_executions_on_job_id; Type: INDEX; Schema: public; Owner: - +-- + +CREATE UNIQUE INDEX index_solid_queue_blocked_executions_on_job_id ON public.solid_queue_blocked_executions USING btree (job_id); + + +-- +-- Name: index_solid_queue_claimed_executions_on_job_id; Type: INDEX; Schema: public; Owner: - +-- + +CREATE UNIQUE INDEX index_solid_queue_claimed_executions_on_job_id ON public.solid_queue_claimed_executions USING btree (job_id); + + +-- +-- Name: index_solid_queue_claimed_executions_on_process_id_and_job_id; Type: INDEX; Schema: public; Owner: - +-- + +CREATE INDEX index_solid_queue_claimed_executions_on_process_id_and_job_id ON public.solid_queue_claimed_executions USING btree (process_id, job_id); + + +-- +-- Name: index_solid_queue_dispatch_all; Type: INDEX; Schema: public; Owner: - +-- + +CREATE INDEX index_solid_queue_dispatch_all ON public.solid_queue_scheduled_executions USING btree (scheduled_at, priority, job_id); + + +-- +-- Name: index_solid_queue_failed_executions_on_job_id; Type: INDEX; Schema: public; Owner: - +-- + +CREATE UNIQUE INDEX index_solid_queue_failed_executions_on_job_id ON public.solid_queue_failed_executions USING btree (job_id); + + +-- +-- Name: index_solid_queue_jobs_for_alerting; Type: INDEX; Schema: public; Owner: - +-- + +CREATE INDEX index_solid_queue_jobs_for_alerting ON public.solid_queue_jobs USING btree (scheduled_at, finished_at); + + +-- +-- Name: index_solid_queue_jobs_for_filtering; Type: INDEX; Schema: public; Owner: - +-- + +CREATE INDEX index_solid_queue_jobs_for_filtering ON public.solid_queue_jobs USING btree (queue_name, finished_at); + + +-- +-- Name: index_solid_queue_jobs_on_active_job_id; Type: INDEX; Schema: public; Owner: - +-- + +CREATE INDEX index_solid_queue_jobs_on_active_job_id ON public.solid_queue_jobs USING btree (active_job_id); + + +-- +-- Name: index_solid_queue_jobs_on_class_name; Type: INDEX; Schema: public; Owner: - +-- + +CREATE INDEX index_solid_queue_jobs_on_class_name ON public.solid_queue_jobs USING btree (class_name); + + +-- +-- Name: index_solid_queue_jobs_on_finished_at; Type: INDEX; Schema: public; Owner: - +-- + +CREATE INDEX index_solid_queue_jobs_on_finished_at ON public.solid_queue_jobs USING btree (finished_at); + + +-- +-- Name: index_solid_queue_pauses_on_queue_name; Type: INDEX; Schema: public; Owner: - +-- + +CREATE UNIQUE INDEX index_solid_queue_pauses_on_queue_name ON public.solid_queue_pauses USING btree (queue_name); + + +-- +-- Name: index_solid_queue_poll_all; Type: INDEX; Schema: public; Owner: - +-- + +CREATE INDEX index_solid_queue_poll_all ON public.solid_queue_ready_executions USING btree (priority, job_id); + + +-- +-- Name: index_solid_queue_poll_by_queue; Type: INDEX; Schema: public; Owner: - +-- + +CREATE INDEX index_solid_queue_poll_by_queue ON public.solid_queue_ready_executions USING btree (queue_name, priority, job_id); + + +-- +-- Name: index_solid_queue_processes_on_last_heartbeat_at; Type: INDEX; Schema: public; Owner: - +-- + +CREATE INDEX index_solid_queue_processes_on_last_heartbeat_at ON public.solid_queue_processes USING btree (last_heartbeat_at); + + +-- +-- Name: index_solid_queue_processes_on_name_and_supervisor_id; Type: INDEX; Schema: public; Owner: - +-- + +CREATE UNIQUE INDEX index_solid_queue_processes_on_name_and_supervisor_id ON public.solid_queue_processes USING btree (name, supervisor_id); + + +-- +-- Name: index_solid_queue_processes_on_supervisor_id; Type: INDEX; Schema: public; Owner: - +-- + +CREATE INDEX index_solid_queue_processes_on_supervisor_id ON public.solid_queue_processes USING btree (supervisor_id); + + +-- +-- Name: index_solid_queue_ready_executions_on_job_id; Type: INDEX; Schema: public; Owner: - +-- + +CREATE UNIQUE INDEX index_solid_queue_ready_executions_on_job_id ON public.solid_queue_ready_executions USING btree (job_id); + + +-- +-- Name: index_solid_queue_recurring_executions_on_job_id; Type: INDEX; Schema: public; Owner: - +-- + +CREATE UNIQUE INDEX index_solid_queue_recurring_executions_on_job_id ON public.solid_queue_recurring_executions USING btree (job_id); + + +-- +-- Name: index_solid_queue_recurring_executions_on_task_key_and_run_at; Type: INDEX; Schema: public; Owner: - +-- + +CREATE UNIQUE INDEX index_solid_queue_recurring_executions_on_task_key_and_run_at ON public.solid_queue_recurring_executions USING btree (task_key, run_at); + + +-- +-- Name: index_solid_queue_recurring_tasks_on_key; Type: INDEX; Schema: public; Owner: - +-- + +CREATE UNIQUE INDEX index_solid_queue_recurring_tasks_on_key ON public.solid_queue_recurring_tasks USING btree (key); + + +-- +-- Name: index_solid_queue_recurring_tasks_on_static; Type: INDEX; Schema: public; Owner: - +-- + +CREATE INDEX index_solid_queue_recurring_tasks_on_static ON public.solid_queue_recurring_tasks USING btree (static); + + +-- +-- Name: index_solid_queue_scheduled_executions_on_job_id; Type: INDEX; Schema: public; Owner: - +-- + +CREATE UNIQUE INDEX index_solid_queue_scheduled_executions_on_job_id ON public.solid_queue_scheduled_executions USING btree (job_id); + + +-- +-- Name: index_solid_queue_semaphores_on_expires_at; Type: INDEX; Schema: public; Owner: - +-- + +CREATE INDEX index_solid_queue_semaphores_on_expires_at ON public.solid_queue_semaphores USING btree (expires_at); + + +-- +-- Name: index_solid_queue_semaphores_on_key; Type: INDEX; Schema: public; Owner: - +-- + +CREATE UNIQUE INDEX index_solid_queue_semaphores_on_key ON public.solid_queue_semaphores USING btree (key); + + +-- +-- Name: index_solid_queue_semaphores_on_key_and_value; Type: INDEX; Schema: public; Owner: - +-- + +CREATE INDEX index_solid_queue_semaphores_on_key_and_value ON public.solid_queue_semaphores USING btree (key, value); + + +-- +-- Name: solid_queue_recurring_executions fk_rails_318a5533ed; Type: FK CONSTRAINT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public.solid_queue_recurring_executions + ADD CONSTRAINT fk_rails_318a5533ed FOREIGN KEY (job_id) REFERENCES public.solid_queue_jobs(id) ON DELETE CASCADE; + + +-- +-- Name: solid_queue_failed_executions fk_rails_39bbc7a631; Type: FK CONSTRAINT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public.solid_queue_failed_executions + ADD CONSTRAINT fk_rails_39bbc7a631 FOREIGN KEY (job_id) REFERENCES public.solid_queue_jobs(id) ON DELETE CASCADE; + + +-- +-- Name: solid_queue_blocked_executions fk_rails_4cd34e2228; Type: FK CONSTRAINT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public.solid_queue_blocked_executions + ADD CONSTRAINT fk_rails_4cd34e2228 FOREIGN KEY (job_id) REFERENCES public.solid_queue_jobs(id) ON DELETE CASCADE; + + +-- +-- Name: solid_queue_ready_executions fk_rails_81fcbd66af; Type: FK CONSTRAINT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public.solid_queue_ready_executions + ADD CONSTRAINT fk_rails_81fcbd66af FOREIGN KEY (job_id) REFERENCES public.solid_queue_jobs(id) ON DELETE CASCADE; + + +-- +-- Name: solid_queue_claimed_executions fk_rails_9cfe4d4944; Type: FK CONSTRAINT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public.solid_queue_claimed_executions + ADD CONSTRAINT fk_rails_9cfe4d4944 FOREIGN KEY (job_id) REFERENCES public.solid_queue_jobs(id) ON DELETE CASCADE; + + +-- +-- Name: solid_queue_scheduled_executions fk_rails_c4316f352d; Type: FK CONSTRAINT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public.solid_queue_scheduled_executions + ADD CONSTRAINT fk_rails_c4316f352d FOREIGN KEY (job_id) REFERENCES public.solid_queue_jobs(id) ON DELETE CASCADE; + + +-- +-- PostgreSQL database dump complete +-- + +SET search_path TO "$user", public; + +INSERT INTO "schema_migrations" (version) VALUES +('1'); +