Finish part 1 of db

This commit is contained in:
cole alban 2017-02-24 15:14:15 -05:00
parent c0b2c96d11
commit da0d2a215d
2 changed files with 9 additions and 4 deletions

View File

@ -31,8 +31,8 @@ stats_test:
development: development:
<<: *default <<: *default
database: Pearlception_development database: Pearlception_development
username: bmv username: colealban
password: 1156244terps! password: 1156244Terps!
# Warning: The database defined as "test" will be erased and # Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake". # re-generated from your development database when you run "rake".

View File

@ -32,7 +32,12 @@ end
def migrate_oysters def migrate_oysters
client = establish_db_connection client = establish_db_connection
client.query("SELECT * FROM oysters").each do |res| puts "Connection established"
client.query("SHOW TABLES").each do |tab|
puts tab
end
client.query("SELECT * FROM runs").each do |res|
puts "got result"
puts res puts res
end end
end end
@ -40,6 +45,6 @@ end
########## MAIN METHOD ##################### ########## MAIN METHOD #####################
bundle #bundle install bundle #bundle install
initial_migration #Setup db initial_migration #Setup db
migrate_oysters #migrate_oysters
#add in og admin #add in og admin
#Migrate all the oysters,runs,results from the AWS DB #Migrate all the oysters,runs,results from the AWS DB