Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Add ChronoModel to the DbConsole adapters list #14218

Closed
wants to merge 1 commit into from

3 participants

@vjt

ChronoModel http://github.com/ifad/chronomodel implements temporal extensions for ActiveRecord. As it decorates many migration methods, it defines a new adapter inheriting from the PostgreSQLAdapter.

However, as the Rails console command does not need to load any gem, there is no way for CM to hook into the dbconsole config, and adding it to the hardcoded list is necessary.

@vjt vjt Add ChronoModel to the DbConsole adapters list
ChronoModel http://github.com/ifad/chronomodel implements temporal extensions for ActiveRecord. As it decorates many migration methods, it defines a new adapter inheriting from the PostgreSQLAdapter.

However, as the Rails console command does not need to load any gem, there is no way for CM to hook into the dbconsole config, and adding it to the hardcoded list is necessary.
6819ab3
@vjt vjt referenced this pull request in ifad/chronomodel
Open

The `rails db` command is broken #15

@senny
Owner

@vjt thanks for your work. Third party stuff does not belong into the Rails code. However I see your need for external control. We should look for a solution to make this behavior available through the adapter. This will allow third party adapters to provide their own implementation.

@vjt

@senny your reply makes total sense. I think these commands should lie within the adapter themselves, and DbConsole should then leverage this new API they provide.

Do you want me to try cooking a patch for the adapters provided with AR?

@senny
Owner

@vjt sure, please go ahead and update this PR when you are ready. :yellow_heart:

@arthurnn
Collaborator

@vjt Should we close this PR, and when you ready you send a new one with a reference to this?

@vjt
@senny
Owner

I'm closing this out of inactivity. Would be great if you find the time to submit a new PR with the discussed changes. Thank you for your time :yellow_heart:

@senny senny closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Feb 27, 2014
  1. @vjt

    Add ChronoModel to the DbConsole adapters list

    vjt authored
    ChronoModel http://github.com/ifad/chronomodel implements temporal extensions for ActiveRecord. As it decorates many migration methods, it defines a new adapter inheriting from the PostgreSQLAdapter.
    
    However, as the Rails console command does not need to load any gem, there is no way for CM to hook into the dbconsole config, and adding it to the hardcoded list is necessary.
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  railties/lib/rails/commands/dbconsole.rb
View
2  railties/lib/rails/commands/dbconsole.rb
@@ -44,7 +44,7 @@ def start
find_cmd_and_exec(['mysql', 'mysql5'], *args)
- when "postgresql", "postgres", "postgis"
+ when "postgresql", "postgres", "postgis", "chronomodel"
ENV['PGUSER'] = config["username"] if config["username"]
ENV['PGHOST'] = config["host"] if config["host"]
ENV['PGPORT'] = config["port"].to_s if config["port"]
Something went wrong with that request. Please try again.