Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

(no bug) bump schema version, move backfill and product_versions sett…

…ing to import.sh
  • Loading branch information...
commit 3df48d0362954d446af634dad6b082a79958a0ef 1 parent bb1386e
@rhelmer rhelmer authored
View
17 docs/populatepostgres.rst
@@ -67,19 +67,12 @@ volume is low enough, you may want to modify this function
Normally this is run for the previous day by cron_daily_matviews.sh
but you can simply run the backfill function to bootstrap the system:
-As the *postgres* user:
-::
- psql -h localhost -U breakpad_rw breakpad
- breakpad=# select backfill_matviews('2012-03-02', '2012-03-03');
-
-Be sure to use to/from dates that match the CSV data you have entered.
-There should be no failures, and the result should be "true".
+This is normally run by the import.sh, so take a look in there if
+you need to make adjustments.
-Enable at least one "featured" product, this command will set all
-current versions to "featured" (this controls which versions appear on the
-front page of the web UI):
-::
- breakpad=# UPDATE product_versions SET featured_version = true;
+There also needs to be at least one featured version, which is
+controlled by setting "featured_version" column to "true" for one
+or more rows in the product_version table.
Restart memcached as the *root* user:
::
View
10 puppet/manifests/classes/socorro-db.pp
@@ -54,7 +54,7 @@
user => 'postgres',
require => Exec['create-breakpad-db'];
- '/usr/bin/psql -f /home/socorro/dev/socorro/sql/schema/3/breakpad_schema.sql breakpad':
+ '/usr/bin/psql -f /home/socorro/dev/socorro/sql/schema/5/breakpad_schema.sql breakpad':
alias => 'setup-schema',
user => 'postgres',
require => Exec['create-breakpad-roles'],
@@ -103,14 +103,6 @@
}
exec {
- '/usr/bin/psql -c "SELECT backfill_matviews(\'2012-04-02\', \'2012-04-03\'); UPDATE product_versions SET featured_version = true" breakpad':
- alias => 'bootstrap-matviews',
- user => 'postgres',
- onlyif => '/usr/bin/psql -xt breakpad -c "SELECT count(*) FROM product_versions" | grep "count | 0"',
- require => Exec['dataload'];
- }
-
- exec {
'/usr/bin/createdb test':
require => Package['postgresql'],
unless => '/usr/bin/psql --list test',
View
3  tools/dataload/import.sh
@@ -12,3 +12,6 @@ do
exit $exit_code
fi
done
+
+psql -c "SELECT backfill_matviews('2012-04-02', '2012-04-03')" breakpad
+psql -c "UPDATE product_versions SET featured_version = true" breakpad
Please sign in to comment.
Something went wrong with that request. Please try again.