Skip to content
This repository has been archived by the owner on Nov 7, 2024. It is now read-only.

Update gem with remote to support Rails 7 #3

Open
wants to merge 40 commits into
base: master
Choose a base branch
from

Conversation

sandeep-patle1508
Copy link
Collaborator

Update gem with remote to support Rails 7

njakobsen and others added 30 commits September 29, 2021 16:36
There are other gems that handle adding or removing their triggers in the schema dump, so we don't always want to dump every trigger.

Instead, we allow specific triggers and tables to be allowed or ignored by configuration.
Add trigger filtering support to schema dumper
This also allows us to cache bundler between runs.
Update gemfiles to modern versions of rake and rspec

Use YAML safe_load
Update previous_schema regex to account for Rails 7
* Drop ruby <2.5
* Drop rails <6.0
* Fix deprecations on rails 7.0
* Get rails 7.1 passing
* Upgrade rspec
Fix for #93.
Behavior stays the same as it was for Rails 5 and above.
As it's said in the issue, we don't need to generate a `schema.rb` when
we don't have the setting `schema_format = :ruby`.
We stumbled upon a app, that uses another Postgres schema by default. In
that case ``rails db:schema:dump`` will not include the triggers by
HairTrigger.

This PR makes the schema configurable and will keep `public` as default.
Add support for trilogy adapter 

https://github.com/trilogy-libraries/trilogy
https://github.com/trilogy-libraries/activerecord-trilogy-adapter

Trilogy adapter is now supported as a native mysql adapter in Rails 7.1

Co-authored-by: Alexandre Overtus <[email protected]>
)

Fix following issue(#95). This is the rebase from pull request #98.

**Background:**
We are trying to set up multiple databases with our **Rails 7**
application. Due to this gem, we are facing an issue.

When we are running **rails db:migrate**

it is overwriting the primary **db/schema.rb** file with secondary
schema file **db/marketing_sync_board_schema.rb**. After the migration
command run both are the same.

They are not causing any database label changes.

Also if we are using database-specific command it is working fine. 
`rails db:migrate`
`rails db:migrate:marketing_sync_board`

sample database.yml with multi database setup.
<pre>
default: &default
  adapter: postgresql
  encoding: unicode
  host: localhost
  database: multi_db_test_app_development
  username: admin
  password:
  pool: <%= ENV.fetch('RAILS_MAX_THREADS') { 5 } %>

marketing_sync_board_default: &marketing_sync_board_default
  <<: *default
  host: localhost
  username: admin
  password:
  database: marketing_sync_board_development
  migrations_paths: db/marketing_sync_board_migrate

development:
  primary:
    <<: *default
    database: multi_db_test_app_secondary_development
  marketing_sync_board:
    <<: *marketing_sync_board_default
</pre>
Drop support for older versions, and ensure everything passes in the
latest

Note: as of ruby 3.3, racc is no longer a default gem and is instead
bundled, so it needs to be added an explicit dependency. This should
probably be fixed in ruby_parser
This looks like a simple copy/paste issue, with this change the gem
should be tested against the correct `activerecord` version.
leoarnold and others added 10 commits September 4, 2024 08:47
Hi, 
I have been using hair_trigger for some time, and now I need to start
using mysql2rgeo DB adapter to handle some spatial data.
[mysql2rgeo](https://github.com/stadia/activerecord-mysql2rgeo-adapter)
extends basic myslq2 adapter with spatial functionalities.

As I would like to continue using hair_trigger I posted da PR to add
support for mysql2rgeo adapter.
I hope you will consider this addition and let me know if anything needs
to be modified.

All the best
Jan

Co-authored-by: Jon Jensen <[email protected]>
#125)

fix: #123

add ability to access to transition tables. that allow to know which
rows changed, this is especially useful when using statement triggers

Co-authored-by: Jon Jensen <[email protected]>
Litedb is a part of litestack, and provide its own active record adapter
atop sqlite3:
https://github.com/oldmoe/litestack?tab=readme-ov-file#activerecord
Centralize the adapter types so that we don't need to keep tweaking case
statements
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.