Open Source Platform for DTC, B2B Commerce, Marketplaces & Omnichannel. REST APIs, TypeScript SDKs, and production-ready Next.js storefront. Self-host it. Own your data. No vendor lock-in. Zero platform fees.
Ruby b2b-commercee-commerceecommerceecommerce-apiecommerce-frameworkecommerce-platformheadlessheadless-commerceheadless-ecommercemarketplacemulti-tenantmulti-vendormulti-vendor-ecommerceopen-sourcespree-commerce
Change Server app defaults (#13701)
Damian Legawiec29f58c6a9f7f
diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.mdindex ace9e6c10c..0fee356e62 100644--- a/.github/CONTRIBUTING.md+++ b/.github/CONTRIBUTING.md@@ -78,10 +78,11 @@ bin/rails server`bin/setup` handles everything: installs Ruby (via [mise](https://mise.jdx.dev) if available, otherwise uses your system Ruby), system packages (libpq, vips), gems, and prepares the database.-PostgreSQL must be running before you run `bin/setup`. If you don't have it installed locally, start it with Docker:+PostgreSQL and Redis must be running before you run `bin/setup`. If you don't have them installed locally, start them with Docker:```bashdocker run -d --name spree-postgres -p 5432:5432 -e POSTGRES_HOST_AUTH_METHOD=trust postgres:17-alpine+docker run -d --name spree-redis -p 6379:6379 redis:7-alpine```By default the app connects to PostgreSQL at `localhost:5432` as user `postgres` with no password. Override with environment variables if needed:@@ -191,7 +192,7 @@ TypeScript developers don't need Ruby installed. Use Docker Compose from the repdocker compose up -d```-This boots PostgreSQL and the Spree backend automatically. The API is available at `http://localhost:3000`.+This boots PostgreSQL, Redis, Mailpit, and the Spree backend automatically. The API is available at `http://localhost:3000`. All outgoing emails are caught by Mailpit and viewable at `http://localhost:8025`.Then install dependencies and start all packages in watch mode:diff --git a/docker-compose.yml b/docker-compose.ymlindex 15a8cf5ff2..cfbf00ecb0 100644--- a/docker-compose.yml+++ b/docker-compose.yml@@ -1,3 +1,18 @@+x-app: &app+ build:+ context: .+ dockerfile: server/Dockerfile+ depends_on:+ postgres:+ condition: service_healthy+ redis:+ condition: service_healthy+ environment: &app-env+ DATABASE_HOST: postgres+ REDIS_URL: redis://redis:6379/0+ SMTP_HOST: mailpit+ SMTP_PORT: 1025+services:postgres:image: postgres:17-alpine@@ -11,17 +26,31 @@ services:timeout: 5sretries: 5- spree:- build:- context: .- dockerfile: server/Dockerfile- depends_on:- postgres:- condition: service_healthy- environment:- DATABASE_HOST: postgres+ redis:+ image: redis:7-alpine+ volumes:+ - redis_data:/data+ healthcheck:+ test: redis-cli ping+ interval: 5s+ timeout: 5s+ retries: 5++ mailpit:+ image: axllent/mailpit+ ports:+ - "8025:8025"+ - "1025:1025"++ web:+ <<: *appports:- "3000:3000"+ worker:+ <<: *app+ command: bundle exec sidekiq+volumes:postgres_data:+ redis_data:diff --git a/server/Gemfile.common b/server/Gemfile.commonindex 809d58fac3..130a42910f 100644--- a/server/Gemfile.common+++ b/server/Gemfile.common@@ -23,10 +23,9 @@ gem "tailwindcss-rails"# Windows does not include zoneinfo files, so bundle the tzinfo-data gemgem "tzinfo-data", platforms: %i[ windows jruby ]-# Use the database-backed adapters for Rails.cache, Active Job, and Action Cable-gem "solid_cache"-gem "solid_queue"-gem "solid_cable"+# Use Redis for caching, background jobs (Sidekiq), and Action Cable+gem "redis"+gem "sidekiq"# Reduces boot times through caching; required in config/boot.rbgem "bootsnap", require: falsediff --git a/server/Gemfile.lock b/server/Gemfile.lockindex 6a73252c42..c8c074abde 100644--- a/server/Gemfile.lock+++ b/server/Gemfile.lock@@ -275,8 +275,6 @@ GEMdrb (2.2.3)erb (6.0.2)erubi (1.13.1)- et-orbi (1.4.0)- tzinfofactory_bot (6.5.6)activesupport (>= 6.1.0)factory_bot_rails (6.5.1)@@ -308,9 +306,6 @@ GEMfriendly_id-mobility (1.0.5)friendly_id (>= 5.0.0, < 5.6)mobility (>= 1.0.1, < 2.0)- fugit (1.12.1)- et-orbi (~> 1.4)- raabro (~> 1.4)gem-release (2.2.4)geocoder (1.8.6)base64 (>= 0.1.0)@@ -524,7 +519,6 @@ GEMpublic_suffix (7.0.2)puma (7.2.0)nio4r (~> 2.0)- raabro (1.4.0)racc (1.8.1)rack (3.2.5)rack-session (2.1.1)@@ -587,6 +581,10 @@ GEMerbpsych (>= 4.0.0)tsort+ redis (5.4.1)+ redis-client (>= 0.22.0)+ redis-client (0.26.4)+ connection_poolregexp_parser (2.11.3)reline (0.6.3)io-console (~> 0.5)@@ -669,6 +667,12 @@ GEMrexml (~> 3.2, >= 3.2.5)rubyzip (>= 1.2.2, < 3.0)websocket (~> 1.0)+ sidekiq (8.1.1)+ connection_pool (>= 3.0.0)+ json (>= 2.16.0)+ logger (>= 1.7.0)+ rack (>= 3.2.0)+ redis-client (>= 0.26.0)simple_po_parser (1.1.6)simplecov (0.22.0)docile (~> 1.1)@@ -679,22 +683,6 @@ GEMsimplecov (~> 0.19)simplecov-html (0.13.2)simplecov_json_formatter (0.1.4)- solid_cable (3.0.12)- actioncable (>= 7.2)- activejob (>= 7.2)- activerecord (>= 7.2)- railties (>= 7.2)- solid_cache (1.0.10)- activejob (>= 7.2)- activerecord (>= 7.2)- railties (>= 7.2)- solid_queue (1.3.2)- activejob (>= 7.1)- activerecord (>= 7.1)- concurrent-ruby (>= 1.3.1)- fugit (~> 1.11)- railties (>= 7.1)- thor (>= 1.3.1)spree_dev_tools (0.5.3)awesome_printbrakeman@@ -837,11 +825,10 @@ DEPENDENCIESpropshaftpuma (>= 5.0)rails (~> 8.1.2)+ redisrubocop-rails-omakase+ sidekiqsimplecov-cobertura- solid_cable- solid_cache- solid_queuespree!spree_admin!spree_dev_tools@@ -918,7 +905,6 @@ CHECKSUMSdrb (2.2.3) sha256=0b00d6fdb50995fe4a45dea13663493c841112e4068656854646f418fda13373erb (6.0.2) sha256=9fe6264d44f79422c87490a1558479bd0e7dad4dd0e317656e67ea3077b5242berubi (1.13.1) sha256=a082103b0885dbc5ecf1172fede897f9ebdb745a4b97a5e8dc63953db1ee4ad9- et-orbi (1.4.0) sha256=6c7e3c90779821f9e3b324c5e96fda9767f72995d6ae435b96678a4f3e2de8bcfactory_bot (6.5.6) sha256=12beb373214dccc086a7a63763d6718c49769d5606f0501e0a4442676917e077factory_bot_rails (6.5.1) sha256=d3cc4851eae4dea8a665ec4a4516895045e710554d2b5ac9e68b94d351bc6d68faraday (2.14.1) sha256=a43cceedc1e39d188f4d2cdd360a8aaa6a11da0c407052e426ba8d3fb42ef61c@@ -938,7 +924,6 @@ CHECKSUMSfiber-storage (1.0.1) sha256=f48e5b6d8b0be96dac486332b55cee82240057065dc761c1ea692b2e719240e1friendly_id (5.5.1) sha256=e018f2b89bfc143276fee6d378a64792385cd4fddd3d4fce501f59ec19c06207friendly_id-mobility (1.0.5) sha256=8c0cf4d0a1358311db1b2dcc0e4c33077ae929c7e34749485268d066adbaf2e4- fugit (1.12.1) sha256=5898f478ede9b415f0804e42b8f3fd53f814bd85eebffceebdbc34e1107aaf68gem-release (2.2.4) sha256=2f11124c1580c811507c3b47e875e420cf3ed792a98105b49df11971e6e94db3geocoder (1.8.6) sha256=e0ca1554b499f466de9b003f7dff70f89a5888761c2ca68ed9f86b6e5e24e74cgithub_changelog_generator (1.16.4) sha256=21d2dfe41d50cf3a7ffe896774779d9d61da6aaf08d390f8ddff0dacbdf8a611@@ -1035,7 +1020,6 @@ CHECKSUMSpsych (5.3.1) sha256=eb7a57cef10c9d70173ff74e739d843ac3b2c019a003de48447b2963d81b1974public_suffix (7.0.2) sha256=9114090c8e4e7135c1fd0e7acfea33afaab38101884320c65aaa0ffb8e26a857puma (7.2.0) sha256=bf8ef4ab514a4e6d4554cb4326b2004eba5036ae05cf765cfe51aba9706a72a8- raabro (1.4.0) sha256=d4fa9ff5172391edb92b242eed8be802d1934b1464061ae5e70d80962c5da882racc (1.8.1) sha256=4a7f6929691dbec8b5209a0b373bc2614882b55fc5d2e447a21aaa691303d62frack (3.2.5) sha256=4cbd0974c0b79f7a139b4812004a62e4c60b145cba76422e288ee670601ed6d3rack-session (2.1.1) sha256=0b6dc07dea7e4b583f58a48e8b806d4c9f1c6c9214ebc202ec94562cbea2e4e9@@ -1054,6 +1038,8 @@ CHECKSUMSrb-inotify (0.11.1) sha256=a0a700441239b0ff18eb65e3866236cd78613d6b9f78fea1f9ac47a85e47be6erbs (3.10.3) sha256=70627f3919016134d554e6c99195552ae3ef6020fe034c8e983facc9c192daa6rdoc (7.2.0) sha256=8650f76cd4009c3b54955eb5d7e3a075c60a57276766ebf36f9085e8c9f23192+ redis (5.4.1) sha256=b5e675b57ad22b15c9bcc765d5ac26f60b675408af916d31527af9bd5a81faae+ redis-client (0.26.4) sha256=3ad70beff5da2653e02dfeae996e7d8d7147a558da12b16b2282ad345e4c7120regexp_parser (2.11.3) sha256=ca13f381a173b7a93450e53459075c9b76a10433caadcb2f1180f2c741fc55a4reline (0.6.3) sha256=1198b04973565b36ec0f11542ab3f5cfeeec34823f4e54cebde90968092b1835request_store (1.7.0) sha256=e1b75d5346a315f452242a68c937ef8e48b215b9453a77a6c0acdca2934c88cb@@ -1081,14 +1067,12 @@ CHECKSUMSsawyer (0.9.3) sha256=0d0f19298408047037638639fe62f4794483fb04320269169bd41af2bdcf5e41securerandom (0.4.1) sha256=cc5193d414a4341b6e225f0cb4446aceca8e50d5e1888743fac16987638ea0b1selenium-webdriver (4.10.0) sha256=a322af38f9a8966a6c3ab85c365b08c5556cdef72f577905b2b42469faee9d43+ sidekiq (8.1.1) sha256=afdf2736883e1e80c1c9b7c47afe0387e1a4997c87170978a45560d35d429151simple_po_parser (1.1.6) sha256=122687d44d3de516a0e69e2f383a4180f5015e8c5ed5a7f2258f2b376f64cbf3simplecov (0.22.0) sha256=fe2622c7834ff23b98066bb0a854284b2729a569ac659f82621fc22ef36213a5simplecov-cobertura (3.1.0) sha256=6d7f38aa32c965ca2174b2e5bd88cb17138eaf629518854976ac50e628925dc5simplecov-html (0.13.2) sha256=bd0b8e54e7c2d7685927e8d6286466359b6f16b18cb0df47b508e8d73c777246simplecov_json_formatter (0.1.4) sha256=529418fbe8de1713ac2b2d612aa3daa56d316975d307244399fa4838c601b428- solid_cable (3.0.12) sha256=a168a54731a455d5627af48d8441ea3b554b8c1f6e6cd6074109de493e6b0460- solid_cache (1.0.10) sha256=bc05a2fb3ac78a6f43cbb5946679cf9db67dd30d22939ededc385cb93e120d41- solid_queue (1.3.2) sha256=44a53047be4255f616ff13fa5d35980e7b3eee6e31d957eadb88fbe8e0db4509spree (5.4.0.beta2)spree_admin (5.4.0.beta2)spree_api (5.4.0.beta2)diff --git a/server/Procfile.dev b/server/Procfile.devindex 93d75b7601..c38cf8b3d1 100644--- a/server/Procfile.dev+++ b/server/Procfile.dev@@ -1,3 +1,4 @@web: bin/rails servercss: bin/rails tailwindcss:watchadmin_css: bin/rails spree:admin:tailwindcss:watch+worker: bundle exec sidekiqdiff --git a/server/README.md b/server/README.mdindex d6b6136cb3..62384ebdc5 100644--- a/server/README.md+++ b/server/README.md@@ -16,10 +16,11 @@ server/### Local Development (Ruby developers)-PostgreSQL must be running before you start. If you have it installed locally, make sure it's running. Otherwise you can start it with Docker:+PostgreSQL and Redis must be running before you start. If you have them installed locally, make sure they're running. Otherwise you can start them with Docker:```bashdocker run -d --name spree-postgres -p 5432:5432 -e POSTGRES_HOST_AUTH_METHOD=trust postgres:17-alpine+docker run -d --name spree-redis -p 6379:6379 redis:7-alpine```Then run the setup script:@@ -42,6 +43,15 @@ Use `bin/setup --reset` to drop and recreate the database.The app starts at `http://localhost:3000`.+**Emails in local dev:** By default emails are printed to the Rails log. To catch and preview emails with a web UI, run [Mailpit](https://mailpit.axllent.org) and set `SMTP_HOST`:++```bash+docker run -d --name mailpit -p 8025:8025 -p 1025:1025 axllent/mailpit+SMTP_HOST=localhost bin/dev+```++Then open `http://localhost:8025` to see all outgoing emails.+### Docker (TypeScript / frontend developers)From the **repository root**:@@ -50,7 +60,9 @@ From the **repository root**:docker compose up -d```-This boots PostgreSQL and the backend. The API is available at `http://localhost:3000`. The database is automatically created and migrated on first boot.+This boots PostgreSQL, Redis, Mailpit, and the backend. The API is available at `http://localhost:3000`. The database is automatically created and migrated on first boot.++All outgoing emails are caught by Mailpit and viewable at `http://localhost:8025`.To rebuild after changes:@@ -80,9 +92,19 @@ docker compose up -d| Variable | Required | Description ||---|---|---|-| `DATABASE_URL` | Yes | Primary database connection URL |-| `CACHE_DATABASE_URL` | No | Solid Cache database (falls back to `DATABASE_URL`) |-| `QUEUE_DATABASE_URL` | No | Solid Queue database (falls back to `DATABASE_URL`) |-| `CABLE_DATABASE_URL` | No | Action Cable database (falls back to `DATABASE_URL`) |+| `DATABASE_URL` | Yes | PostgreSQL connection URL |+| `REDIS_URL` | Yes | Redis connection URL (caching, background jobs, Action Cable) || `SECRET_KEY_BASE` | Yes | Secret key for session encryption |+### Email (SMTP)++Spree works with any SMTP provider (Resend, Postmark, Mailgun, SendGrid, Amazon SES, etc.).++| Variable | Default | Description |+|---|---|---|+| `SMTP_HOST` | — | SMTP server address |+| `SMTP_PORT` | `587` | SMTP server port |+| `SMTP_USERNAME` | — | SMTP auth username |+| `SMTP_PASSWORD` | — | SMTP auth password |+| `SMTP_FROM_ADDRESS` | — | Default "from" email address |+| `RAILS_HOST` | `example.com` | Host used in mailer URLs |diff --git a/server/bin/jobs b/server/bin/jobsdeleted file mode 100755index dcf59f309a..0000000000--- a/server/bin/jobs+++ /dev/null@@ -1,6 +0,0 @@-#!/usr/bin/env ruby--require_relative "../config/environment"-require "solid_queue/cli"--SolidQueue::Cli.start(ARGV)diff --git a/server/config/application.rb b/server/config/application.rbindex 78e248ccc1..18a0db6b5a 100644--- a/server/config/application.rb+++ b/server/config/application.rb@@ -45,5 +45,8 @@ module Spree# Don't generate system test files.config.generators.system_tests = nil++ # Use Sidekiq for background jobs in all environments.+ config.active_job.queue_adapter = :sidekiqendenddiff --git a/server/config/cable.yml b/server/config/cable.ymlindex b9adc5aa3a..e0e7f621fa 100644--- a/server/config/cable.yml+++ b/server/config/cable.yml@@ -9,9 +9,5 @@ test:adapter: testproduction:- adapter: solid_cable- connects_to:- database:- writing: cable- polling_interval: 0.1.seconds- message_retention: 1.day+ adapter: redis+ url: <%= ENV.fetch("REDIS_URL", "redis://localhost:6379/1") %>diff --git a/server/config/cache.yml b/server/config/cache.ymldeleted file mode 100644index 19d490843b..0000000000--- a/server/config/cache.yml+++ /dev/null@@ -1,16 +0,0 @@-default: &default- store_options:- # Cap age of oldest cache entry to fulfill retention policies- # max_age: <%= 60.days.to_i %>- max_size: <%= 256.megabytes %>- namespace: <%= Rails.env %>--development:- <<: *default--test:- <<: *default--production:- database: cache- <<: *defaultdiff --git a/server/config/database.yml b/server/config/database.ymlindex 8661529f7d..c8ef3392d9 100644--- a/server/config/database.yml+++ b/server/config/database.yml@@ -77,31 +77,9 @@ test:# production:# url: <%= ENV["MY_APP_DATABASE_URL"] %>#-# Connection URLs for non-primary databases can also be configured using-# environment variables. The variable name is formed by concatenating the-# connection name with `_DATABASE_URL`. For example:-#-# CACHE_DATABASE_URL="postgres://cacheuser:cachepass@localhost/cachedatabase"-## Read https://guides.rubyonrails.org/configuring.html#configuring-a-database# for a full overview on how database connection configuration can be specified.#production:- primary: &primary_production- <<: *default- url: <%= ENV['DATABASE_URL'] %>- cache:- <<: *primary_production- url: <%= ENV['CACHE_DATABASE_URL'] || ENV['DATABASE_URL'] %>- database: spree_production_cache- migrations_paths: db/cache_migrate- queue:- <<: *primary_production- url: <%= ENV['QUEUE_DATABASE_URL'] || ENV['DATABASE_URL'] %>- database: spree_production_queue- migrations_paths: db/queue_migrate- cable:- <<: *primary_production- url: <%= ENV['CABLE_DATABASE_URL'] || ENV['DATABASE_URL'] %>- database: spree_production_cable- migrations_paths: db/cable_migrate+ <<: *default+ url: <%= ENV['DATABASE_URL'] %>diff --git a/server/config/environments/development.rb b/server/config/environments/development.rbindex 1f2f9feaf9..5b33fba517 100644--- a/server/config/environments/development.rb+++ b/server/config/environments/development.rb@@ -1,8 +1,14 @@require "active_support/core_ext/integer/time"Rails.application.configure do- # Letter Opener for email previews- config.action_mailer.delivery_method = :letter_opener+ # When SMTP_HOST is set (e.g. Docker with Mailpit), deliver via SMTP.+ # Otherwise use Letter Opener to preview emails in the browser.+ if ENV["SMTP_HOST"].present?+ config.action_mailer.delivery_method = :smtp+ config.action_mailer.smtp_settings = { address: ENV["SMTP_HOST"], port: ENV.fetch("SMTP_PORT", 1025).to_i }+ else+ config.action_mailer.delivery_method = :letter_opener+ endconfig.action_mailer.perform_deliveries = true# Improved file watchingdiff --git a/server/config/environments/production.rb b/server/config/environments/production.rbindex dc739afff0..ec40accc04 100644--- a/server/config/environments/production.rb+++ b/server/config/environments/production.rb@@ -46,28 +46,29 @@ Rails.application.configure do# Don't log any deprecations.config.active_support.report_deprecations = false- # Replace the default in-process memory cache store with a durable alternative.- config.cache_store = :solid_cache_store-- # Replace the default in-process and non-durable queuing backend for Active Job.- config.active_job.queue_adapter = :solid_queue- config.solid_queue.connects_to = { database: { writing: :queue } }-- # Ignore bad email addresses and do not raise email delivery errors.- # Set this to true and configure the email server for immediate delivery to raise delivery errors.- # config.action_mailer.raise_delivery_errors = false-- # Set host to be used by links generated in mailer templates.- config.action_mailer.default_url_options = { host: "example.com" }-- # Specify outgoing SMTP server. Remember to add smtp/* credentials via bin/rails credentials:edit.- # config.action_mailer.smtp_settings = {- # user_name: Rails.application.credentials.dig(:smtp, :user_name),- # password: Rails.application.credentials.dig(:smtp, :password),- # address: "smtp.example.com",- # port: 587,- # authentication: :plain- # }+ # Use Redis for caching if REDIS_URL is set, otherwise fall back to memory store.+ if ENV["REDIS_URL"].present?+ config.cache_store = :redis_cache_store, { url: ENV["REDIS_URL"] }+ else+ config.cache_store = :memory_store+ end++ # SMTP configuration via environment variables.+ # Works with any SMTP provider (Resend, Postmark, Mailgun, SendGrid, SES, etc.)+ if ENV["SMTP_HOST"].present?+ config.action_mailer.delivery_method = :smtp+ config.action_mailer.smtp_settings = {+ address: ENV["SMTP_HOST"],+ port: ENV.fetch("SMTP_PORT", 587).to_i,+ user_name: ENV["SMTP_USERNAME"],+ password: ENV["SMTP_PASSWORD"],+ authentication: :plain,+ enable_starttls_auto: true+ }+ end++ config.action_mailer.default_url_options = { host: ENV.fetch("RAILS_HOST", "example.com") }+ config.action_mailer.default_options = { from: ENV["SMTP_FROM_ADDRESS"] } if ENV["SMTP_FROM_ADDRESS"].present?# Enable locale fallbacks for I18n (makes lookups for any locale fall back to# the I18n.default_locale when a translation cannot be found).diff --git a/server/config/puma.rb b/server/config/puma.rbindex 38c4b86596..1c317b410d 100644--- a/server/config/puma.rb+++ b/server/config/puma.rb@@ -34,9 +34,6 @@ port ENV.fetch("PORT", 3000)# Allow puma to be restarted by `bin/rails restart` command.plugin :tmp_restart-# Run the Solid Queue supervisor inside of Puma for single-server deployments.-plugin :solid_queue if ENV["SOLID_QUEUE_IN_PUMA"]-# Specify the PID file. Defaults to tmp/pids/server.pid in development.# In other environments, only set the PID file if requested.pidfile ENV["PIDFILE"] if ENV["PIDFILE"]diff --git a/server/config/queue.yml b/server/config/queue.ymldeleted file mode 100644index 9eace59c41..0000000000--- a/server/config/queue.yml+++ /dev/null@@ -1,18 +0,0 @@-default: &default- dispatchers:- - polling_interval: 1- batch_size: 500- workers:- - queues: "*"- threads: 3- processes: <%= ENV.fetch("JOB_CONCURRENCY", 1) %>- polling_interval: 0.1--development:- <<: *default--test:- <<: *default--production:- <<: *defaultdiff --git a/server/config/recurring.yml b/server/config/recurring.ymldeleted file mode 100644index b4207f9b07..0000000000--- a/server/config/recurring.yml+++ /dev/null@@ -1,15 +0,0 @@-# examples:-# periodic_cleanup:-# class: CleanSoftDeletedRecordsJob-# queue: background-# args: [ 1000, { batch_size: 500 } ]-# schedule: every hour-# periodic_cleanup_with_command:-# command: "SoftDeletedRecord.due.delete_all"-# priority: 2-# schedule: at 5am every day--production:- clear_solid_queue_finished_jobs:- command: "SolidQueue::Job.clear_finished_in_batches(sleep_between_batches: 0.3)"- schedule: every hour at minute 12diff --git a/server/db/cable_schema.rb b/server/db/cable_schema.rbdeleted file mode 100644index 23666604a5..0000000000--- a/server/db/cable_schema.rb+++ /dev/null@@ -1,11 +0,0 @@-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: 536870912, 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-enddiff --git a/server/db/cache_schema.rb b/server/db/cache_schema.rbdeleted file mode 100644index 81a410d188..0000000000--- a/server/db/cache_schema.rb+++ /dev/null@@ -1,12 +0,0 @@-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: 536870912, 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 ["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-enddiff --git a/server/db/queue_schema.rb b/server/db/queue_schema.rbdeleted file mode 100644index 85194b6a88..0000000000--- a/server/db/queue_schema.rb+++ /dev/null@@ -1,129 +0,0 @@-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 [ "concurrency_key", "priority", "job_id" ], name: "index_solid_queue_blocked_executions_for_release"- t.index [ "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 [ "process_id", "job_id" ], name: "index_solid_queue_claimed_executions_on_process_id_and_job_id"- 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 [ "queue_name", "finished_at" ], name: "index_solid_queue_jobs_for_filtering"- t.index [ "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 [ "name", "supervisor_id" ], name: "index_solid_queue_processes_on_name_and_supervisor_id", unique: true- 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 [ "priority", "job_id" ], name: "index_solid_queue_poll_all"- t.index [ "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" ], name: "index_solid_queue_recurring_executions_on_job_id", unique: true- t.index [ "task_key", "run_at" ], name: "index_solid_queue_recurring_executions_on_task_key_and_run_at", unique: true- 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" ], name: "index_solid_queue_scheduled_executions_on_job_id", unique: true- t.index [ "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 [ "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