Skip to content

Commit

Permalink
Update dgidb:load_local method (#463)
Browse files Browse the repository at this point in the history
* update file download location for dgidb_v5_latest in load_local methods

* update download instructions with rake dgidb:load_local method

* removed psql command in favor of just dgidb:load_local

* fix spacing issue

* prettier
  • Loading branch information
mcannon068nw authored Dec 12, 2023
1 parent 8dd7961 commit d24f99c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 13 deletions.
15 changes: 4 additions & 11 deletions client/src/pages/Downloads/Info/Info.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,12 @@ export const Info = () => {
information for each source.
</p>
<p>
You may load the{' '}
<Link
href="https://nch-igm-wagner-lab-public.s3.us-east-2.amazonaws.com/dgidb_v5_latest.sql"
target="_blank"
rel="noopener"
>
latest data dump
</Link>{' '}
into your local database instance by running the following command while
in your local checkout of the DGIdb repository:
You may instantiate your local database instance by running the
following command while in the 'server' directory of your local checkout
of the DGIdb repository:
</p>
<Box sx={{ ml: 2 }} className="code-text-container">
<code className="code-text">psql -d dgidb -f dgidb_v5_latest.sql</code>
<code className="code-text">rake dgidb:load_local</code>
</Box>
<p>
This will recreate the local database and import the latest data dump
Expand Down
2 changes: 1 addition & 1 deletion server/lib/tasks/db_bootstrapping.rake
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace :dgidb do
else
data_submodule_path = File.join(Rails.root, 'data')
end
data_file = File.join(data_submodule_path, 'data.sql')
data_file = File.join(data_submodule_path, 'dgidb_v5_latest.sql')
version_file = File.join(Rails.root, 'VERSION')
database_name = Rails.configuration.database_configuration[Rails.env]['database']
host = Rails.configuration.database_configuration[Rails.env]['host']
Expand Down
2 changes: 1 addition & 1 deletion server/lib/utils/snapshot_helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def download_data_dump(destination)
unless Dir.exist? 'data'
Dir.mkdir('data')
end
system_or_die("wget -O #{destination} http://dgidb.org/data/data.sql")
system_or_die("wget -O #{destination} https://nch-igm-wagner-lab-public.s3.us-east-2.amazonaws.com/dgidb_v5_latest.sql")
end

private
Expand Down

0 comments on commit d24f99c

Please sign in to comment.