Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

Rake db:create and db:drop do not work with jdbcmysql or jdbcpostgresql adapters

#2894

As the title states, having jdbcmysql or jdbcpostgresql as your database adapter will cause rails to not create your database and not display an error message.

The attached patch makes db:create work with jdbcmysql and jdbcpostgresql and outputs an error for unsupported adapters.

Reported by Trotter Cashion · July 9th, 2009 @ 05:57 PM

State: stale
Milestone: 3.x
Assigned to: nobody
Importance: none

Activity

  1. Trotter Cashion
    Trotter Cashion

    Oops, the old diff was made improperly. Here's a properly created patch.

    July 9th, 2009 @ 10:37 PM

  2. Trotter Cashion
    Trotter Cashion
    • Title changed from Rake db:create does not work with jdbcmysql or jdbcpostgresql adapters to Rake db:create and db:drop do not work with jdbcmysql or jdbcpostgresql adapters

    I've added support for db:drop as well.

    July 15th, 2009 @ 01:42 PM

  3. Brian Lopez
    Brian Lopez

    So this problem is actually regarding any db driver that isn't named exactly 'mysql', 'postgres' or like 'sqlite'.
    Even with the patch attached to this ticket, drivers that don't have 'mysql', 'postgres' or 'sqlite' in the name are out of luck (think Oracle, Firebird, CouchDB or even something custom...).

    I found this because I'm using the mysqlplus gem, and Lourens' mysqlplus_adapter. Although the proposed patch in this ticket will fix my problem, it doesn't solve it for everyone.

    After talking to Lourens a little about it, seems like this should be the responsibility of the Adapter itself. Whatever the mechanism is, it should be implemented by the AbstractAdapter interface, and overridden by the actual Adapter if it needs to do something special.

    I'll play around with some ideas and see if I can get something together that might work and attach it to this ticket.

    July 22nd, 2009 @ 06:59 PM

  4. Jeremy Kemper
    Jeremy Kemper
    • Milestone changed from 2.x to 3.x

    May 4th, 2010 @ 06:48 PM

  5. Rohit Arondekar
    Rohit Arondekar
    • State changed from new to stale
    • Importance changed from to

    Marking ticket as stale. If this is still an issue please leave a comment with suggested changes, creating a patch with tests, rebasing an existing patch or just confirming the issue on a latest release or master/branches.

    October 9th, 2010 @ 03:30 AM