mappings/VegCore-VegBIEN.csv: authortaxoncode mappings: Only using authorTaxonCode if there is no plant ID: Added individualID, stemID to the terms that cause authorTaxonCode not to be mapped to VegBIEN authortaxoncode
schemas/vegbien.sql: analytical_*: Renamed individualID to individualObservationID because this actually corresponds to plantobservation.sourceaccessioncode, which is an observation of an individual
mappings/VegCore.csv: Regenerated from wiki
README.TXT: Data import: Recording the import times: Changed <version> back to $version because these commands are actually run on vegbiendev, where $version is set. (Modifications to import.stats.xls would be made on your local machine.)
README.TXT: Data import: Added step to unset $version before starting the import, to avoid importing on top of the last import's data
README.TXT: Data import: Replaced $version with <version> where it needs to be manually filled in
README.TXT: Data import: On nimoy: Added command to set $version
mappings/VegCore-VegBIEN.csv: authortaxoncode mappings: Only use authorTaxonCode if there is no plant ID, because an individual plant gets its own taxonoccurrence and thus needs the taxonoccurrence's IDs to be unique to the plant, regardless of what the author designates as the taxonoccurrence code
Generated inputs/NVS/new_terms.csv
input.Makefile: SVN: $(svnFilesGlob): Also match *terms.csv in top-level dir
mappings/VegCore-VegBIEN.csv: Mapped authorTaxonCode
README.TXT: Maintenance: VegCore data dictionary: Added step to commit updated mappings/VegCore.csv
schemas/Makefile: %/publish: Fixed bug where commands were not being run transactionally, because --single-transaction requires `--file -` to work properly
input.Makefile: Editing import: Removed rotate because appending the current svn revision doesn't make sense, since this is not related to the revision used to import the datasource
input.Makefile: Editing import: Added rename/% and use it in rotate
inputs/import.stats.xls: Updated import times
schemas/Makefile: Use $* instead of $(@D) for clarity. $(@D) is only needed when the dir part of the target includes a prefix in addition to the % stem.
make_analytical_db: Automatically call export_analytical_db when finished
schemas/vegbien.sql: make_family_higher_plant_group(): Added `taxonepithet IS NOT NULL` filter, to allow make_analytical_db to proceed even when the NCBI import fails (leaving some nodes with rank = 'family' but no associated taxonepithet). The most recent NCBI import failed due to the search_path/DuplicateException bug resulting from the import schema and public being in the search_path together.
schemas/Makefile: Fixed bug where need `SHELL := /bin/bash` for \$(confirmRmPublicSchema) to work correctly
lib/common.Makefile: $(confirm): Added comment that this requires `SHELL := /bin/bash` to work correctly
import_all: after_import(): Added `make backups/vegbien.$version.backup/test`
sql.py: DbConn._db(): search_path: Don't append the existing search_path, because it usually includes the public schema, which is now different from the schema being imported into. This fixes a bug where sql.function_exists() would find public-schema functions in both the public schema and the import's schema because both were in the search_path, causing a DuplicateException "more than one function named ...". Note that the elements of the existing search_path are no longer needed now that vegbien_dest's $schemas includes $public. Also note that if an instance of DbConn does not specify the schemas param, the existing search_path will be left as-is rather than overwritten with an empty list.
README.TXT: Data import: recording the import times in inputs/import.stats.xls: Added step to determine the import date using import_date
import_date: Added note that Mac and Linux differ in the order they sort the logs in
README.TXT: Data import: recording the import times in inputs/import.stats.xls: Updated pattern for new log filename format
README.TXT: Data import: recording the import times in inputs/import.stats.xls: Removed extra ./ before bin/import_times
import_date: Added note that the time this outputs is the time the first special input finished importing. The import itself generally starts a few minutes before that, and the exact time is in that import's public schema comment.
import_date: Removed duplicate Usage message at top of file, which is repeated in the Usage message provided when the program is run with no arguments
Added import_date
Added mtime
lib/common.Makefile: System: Added $(mtime)
lib/common.Makefile: $(date): Factored date format out into $(dateFmt)
backups/Makefile: Factored $(isMac) out into lib/common.Makefile
README.TXT: Data import: tailing logs: Updated pattern for new log filename format
schemas/Makefile: Installation: %/publish: Fixed bug where need quotes around source schema name
README.TXT: Data import: Moved deletion previous imports before the import, so that full DB backup can be automated
README.TXT: Data import: `make backups/vegbien.$version.backup/test`: Added --exclude-schema=public to leave out the previous (now published) import so it doesn't bloat the backup. Note that public is included in the vegbien.$version.backup for the previous import, named according to its version.
import_all: after_import(): Added `make backups/TNRS.backup-remake`
README.TXT: Data import: Added step to publish the import to the public schema
import_all: after_import(): Added export_analytical_db
README.TXT: Data import: bin/export_analytical_db: Removed `env public=$version` because export_analytical_db now uses $version as $public when provided
README.TXT: Data import: To remake analytical DB: Removed `env public=...` because $version (which replaces $public) is now set automatically by import_all
schemas/Makefile: Installation: py_functions/install: Removed `env public=`, which is not needed since $(psqlAsAdminVegbien) does not use psql_script_vegbien (which uses $public)
export_analytical_db: Use vegbien_dest to set the default value for $public
README.TXT: Data import: If many inputs have errors: Updated command to `make schemas/$version/uninstall` because the current import's schema is now named $version
schemas/Makefile: Installation: $(schemas), $(schemasReversed) (used e.g. by `make schemas/reinstall`): Removed public so that when `make schemas/reinstall` is run before an import, it will not remove any active (published) import which resides in the public schema
README.TXT: Schema changes: Reinstall public separately from the other schemas so that it will still be reinstalled when schemas/reinstall excludes the public schema to avoid removing any active (published) import
vegbien_dest callers: Removed no longer needed explicit setting $prefix to "", because this is now the default value
vegbien_dest: Changed default $prefix to "", so that the majority of callers don't need to manually set $prefix to "" to avoid it defaulting to out_
README.TXT: Data import: Use env var $version, which is now set by import_all, instead of manually inserting the version for <version>
vegbien_dest: Also export $version
import_all: Run the import directly into a new, already-versioned public schema. This removes the need to manually rename the schema after import, and allows the backup commands to use the stored $version shell variable to refer to the last import.
schemas/Makefile: %/publish: Added instruction to run `unset version` after the command, to clear the $version shell variable which will be set by import_all
README.TXT: Data import: Replaced <import_name> with <version> because the import name is now just the version
README.TXT: Data import: Replaced r<revision> with <version> because the version string is now equal to r<revision>
README.TXT: Backups: Replaced <date> with <version> because the date is no longer included in the version string
README.TXT: Name archived imports without the "public." prefix so that their backups will work with the new `make backups/%.backup/remove` command, which does not add back the prefix
backups/Makefile; $(public*): Don't add a "public." prefix to get the name of the public schema
backups/Makefile: Removed no longer used $(rmSchema)
backups/Makefile: Use \$(rmSchemaCmd) from lib/common.Makefile instead of \$(rmSchema)
vegbien_dest: Use $version as $public when $public not provided. When neither is provided, continue to use "public" and also set $version to that.
schemas/Makefile: Installation: rotate: Use just the version, without the "public." prefix
schemas/Makefile: Installation: `public/install public%/install`: Generalized to /install to allow public schema versions with any name. This requires moving `/install: %.sql` before it to override it.
schemas/Makefile: Installation: Merged public/install and public%/install
schemas/Makefile: Installation: Moved %/uninstall to beginning of section because it applies to all schemas
schemas/Makefile: Installation: public: Generalized public%/publish to %/publish so that public schema versions don't have to start with public_
schemas/Makefile: Installation: %/uninstall: Also display schema delete confirmation for schemas whose name is just the version suffix (r<revision #>)
schemas/Makefile: Merged public%/uninstall and %/uninstall
lib/common.Makefile: Added version target, which prints the current $(version) value
schemas/Makefile: Installation: public: public%/uninstall: Fixed bug where need to remove the specified version of the public schema, not public itself. Generalized $(confirmRmPublicSchema) so it could also be used for named versions of the public schema. Inlined $(rmPublicSchema) since it's now only used in one place.
lib/common.Makefile: Revisions: $(version): Use just the revision # to avoid cluttering the schema and log file names with long datetime strings
schemas/Makefile: public%/install: schema comment: Include current date/time after version
lib/common.Makefile: Replaced no longer used $(date) with function to generate human-readable text date (rather than date to put in filename). Removed leading zeros from date and hour. Added timezone.
backups/Makefile: Removed no longer used $(dateFmt), $(mtime)
backups/Makefile: Removed %.backup/rotate, because this incorrectly causes the current time rather than the version to be used in the backup filename. The version should instead be specified in the backup filename when it's created.
schemas/Makefile: Installation: public: Added public%/publish to replace the current public schema with the given version
schemas/Makefile: Installation: public: public/uninstall: Added public%/uninstall as a target to allow uninstalling versions of the public schema
schemas/Makefile: Installation: public: public%/install: Add a comment on the schema containing the versioned schema name, so that if the schema is later renamed to just public (i.e. "published" as the current version), it will still be possible to tell which version the public schema came from
schemas/Makefile: Installation: public: Added public%/install, to install a version of the public schema
schemas/Makefile: Removed unused $(os)
schemas/Makefile: Removed unused $(SED)
Moved schemas-related commands from root Makefile to schemas/Makefile
Makefiles: Factored out common vars/functions into lib/common.Makefile
root Makefile: $(psqlNoSearchPath): Merged $(psqlAsBien) into it because it's the only place $(psqlAsBien) is used
root Makefile: $(psqlAsBien): Use psql_script_vegbien instead of psql_vegbien, which adds $(psqlOpts) itself
schemas/Makefile: Include lib/common.Makefile
inputs/import.stats.xls: Reformatted so the first by column import and the comparison by row import will fit on the same page when printed on portrait-mode letter paper
inputs/import.stats.xls: Changed import type labels to By row/By column so they would fit into one field, leaving the extra field free to contain the revision #
lib/common.Makefile: Revisions: Allow $(version) to be overridden in the environment, so that the public schema and all log files share the same, pregenerated version
schemas/vegbien.sql: Merged provider_view, provider_count, and owner_count into provider_count, using the combining query for Brad's data providers page at <http://bien.nceas.ucsb.edu/bien/people/data-providers/>
schemas/vegbien.sql: sync_taxon_trait_to_view(): Changed pkey to index because there can be multiple values of the same taxon's trait from different observations
mappings/Makefile: VegCore.csv: Filter out the VegCore tables so they are not matched as terms. This is necessary because some terms have the same name as a table, but the term should be the match rather than the table.
sql.py: DbConn.col_info(): raising sql_gen.NoUnderlyingTableException: Fixed bug where also need to catch DoesNotExistException, which is thrown by ::regclass
sql.py: DbConn.col_info(): Fixed bug where need to run run_query() recoverably, because this query throws an exception if the column's table does not exist (the information_schema query just returned no rows)
sql.py: DbConn.col_info(): Fixed bug where need to use pg_get_expr() on pg_attrdef.adbin instead of shortcut field adsrc, because adsrc does not include schema qualifiers on table names (including strings passed to `nextval('..._seq'::regclass)`)
sql.py: DbConn.col_info(): Fixed bug where need to pass through cacheable param to run_query()
sql.py: DbConn.col_info(): Fixed bug where need to use .to_str(self) instead of self.esc_value() because self.esc_value() expects a value, not a sql_gen.Literal instance
sql.py: DbConn.col_info(): Fixed bug where self needs to be used everywhere that db normally is, because this is a DbConn method rather than a global function