dohruby 0.1.8 → 0.1.9
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +6 -3
- data/lib/doh/mysql/database_creator.rb +4 -5
- data/lib/doh/mysql/handle.rb +1 -1
- data/lib/doh/mysql.rb +2 -0
- metadata +1 -1
data/CHANGELOG
CHANGED
@@ -20,13 +20,16 @@
|
|
20
20
|
* implement db hash util: insert_hash, update_hash, select_as_hash
|
21
21
|
* add logger util: default_logfile_name
|
22
22
|
* add set_source_ip function, change default source_ip to 'unknown'
|
23
|
-
*0.1.8*
|
23
|
+
*0.1.8* (April 17th, 2008)
|
24
24
|
* display full log output when reporting an unhandled error after unit tests run
|
25
25
|
* renamed BigDecimal.original_to_s to BigDecimal._doh_original_to_s so it doesn't conflict with Rails
|
26
26
|
* changed unit test log file name to always just be "doh_unit_tests.log"
|
27
27
|
* remove need for database being created to already exist (yes it's kind of silly)
|
28
28
|
* add convenience include for mysql library
|
29
|
-
|
30
|
-
|
29
|
+
*0.1.9* (April 17th, 2008)
|
30
|
+
* doh/mysql/database_creator - reset the active database to the destination db after creation is complete
|
31
|
+
* add to_sql, unquoted to mysql convenience include
|
32
|
+
* change Handle::query failure log level from fatal to error
|
33
|
+
* remove useless exception handling in mysql/database_creator
|
31
34
|
|
32
35
|
|
@@ -33,13 +33,12 @@ private
|
|
33
33
|
Doh::log.info("DohDb::DatabaseCreator - creating source database " + source_db + " inside " + dest_db)
|
34
34
|
dbh.query("DROP DATABASE IF EXISTS " + dest_db) if drop_first
|
35
35
|
|
36
|
-
|
37
|
-
dbh.query("CREATE DATABASE " + dest_db)
|
38
|
-
rescue Exception => excpt
|
39
|
-
raise RuntimeError.new("database #{dest_db} already exists")
|
40
|
-
end
|
36
|
+
dbh.query("CREATE DATABASE " + dest_db)
|
41
37
|
load_sql_files('tables', source_db, dest_db)
|
42
38
|
load_sql_files('insert_sql', source_db, dest_db)
|
39
|
+
|
40
|
+
@connector.database = dest_db
|
41
|
+
dbh.query("USE " + dest_db)
|
43
42
|
end
|
44
43
|
|
45
44
|
def load_sql_files(subdir, source_db, dest_db)
|
data/lib/doh/mysql/handle.rb
CHANGED
data/lib/doh/mysql.rb
CHANGED