Shooter7119 / sequel-pro

Automatically exported from code.google.com/p/sequel-pro
Other
0 stars 0 forks source link

Specify target database on import #1831

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. In shell, create sql file via :  

mysqldump --add-drop-database X_DB > x_db.sql

or better yet, have two out of every three sql dump files sent from a client 
have the:

DROP TABLE IF EXISTS `X_DB`;

2.  Make sure that dump file is large enough so that removal of the DROP TABLE 
queries is not possible by hand.

3. Have 2 databases already exist in target db server, X_DB and Y_DB, Y_DB 
being empty and intended target for dump

4. select empty Y_DB database in Sequel Pro

5. select Import and choose x_db.sql

6. Say goodbye to any data in existing X_DB 

What is the expected output?
The preferred outcome would be for Sequel Pro (if possible) to offer the same 
option  as when importing from shell in command like so:

mysql Y_DB < x_db.sql

where the DROP DATABASE is ignored and the subsequent queries are run against 
the target db

What do you see instead?
without the option, the existing db will be overwritten unless a command line 
tool such as sed is used first to remove any drop queries (as most text editors 
will choke if the dump file is too large)

What version of Sequel Pro are you using?  1.0.2 b 4096

What version of OS X are you using? 10.7.5

What version of MySQL are you connecting to on the server?   5.5.31

Please provide any additional information below.

Just an awesome feature request (the feature is awesome, not the request)

Original issue reported on code.google.com by crazyto...@gmail.com on 18 Oct 2013 at 4:27