Skip to content

Instantly share code, notes, and snippets.

View yesthesoup's full-sized avatar

Lauren Campbell yesthesoup

  • Wealthsimple
  • Montreal
View GitHub Profile
@yesthesoup
yesthesoup / multi_schema_dumper.rb
Last active April 8, 2024 20:14 — forked from drnic/schema_dumper.rb
Multi-schema Rails support via monkeypatching ActiveRecord's PostgreSQL::SchemaDumper
##
# Originally forked from https://gist.github.com/drnic/9d6e63802f1a7517434c25bb80f2ec09
# Works with Rails 7.0.8 and 7.1.2
# Intended to support a multi-schema, single DB Rails app, with separate files for the public schema (schema.rb)
# and the new schema (second_schema.rb)
# my starting point was an existing database for the Rails app,
# and then adding this new schema, new schema file, and new migrations directory.
# INTEGRATION STEPS: