mirror of
https://github.com/oonyeje/Pearlception_Website_RoR.git
synced 2025-12-25 11:47:41 +00:00
Finish part 1 of db
This commit is contained in:
parent
c0b2c96d11
commit
da0d2a215d
@ -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".
|
||||||
|
|||||||
9
setup.rb
9
setup.rb
@ -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
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user