This project is archived and is in readonly mode.

#2894 ✓stale
Trotter Cashion

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

Reported by Trotter Cashion | July 9th, 2009 @ 05:57 PM | in 3.x

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.

Comments and changes to this ticket

  • Trotter Cashion

    Trotter Cashion July 9th, 2009 @ 10:37 PM

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

  • Trotter Cashion

    Trotter Cashion July 15th, 2009 @ 01:42 PM

    • 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.

  • Brian Lopez

    Brian Lopez July 22nd, 2009 @ 06:59 PM

    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.

  • Jeremy Kemper

    Jeremy Kemper May 4th, 2010 @ 06:48 PM

    • Milestone changed from 2.x to 3.x
  • Rohit Arondekar

    Rohit Arondekar October 9th, 2010 @ 03:30 AM

    • 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.

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href=""></a>