schemas/Makefile: added back rename/%, which is used by `inputs/.TNRS/data.sql.run refresh`. updated it to use schema bundles.
schemas/Makefile: added vegbien/install, vegbien/uninstall which also handle TNRS
fix: schemas/Makefile: vegbien.sql: also remake inputs/.TNRS/schema.sql since its contents change along with vegbien.sql
schemas/Makefile: vegbien.sql: exclude the same set of Source tables excluded by inputs/.TNRS/schema.sql, so that reinstalling TNRS doesn't change the contents of this file
bugfix: schemas/Makefile: `%/install: public_.sql`: also need to replace `public` when preceded by ( , as it is in the validations queries
schemas/Makefile: vegbien.sql: also include geoscrub, TNRS schemas, as requested in the 2014-04-10 conference call (wiki.vegpath.org/2014-04-10_conference_call#VegBIEN-schema). this involves having a separate public_.sql file for restoring the public schema.
bugfix: schemas/Makefile: `%/install: vegbien.sql`: also need to match `public_validations` when used as a schema-qualifier (public_validations._), and after a cast (::) to a schema-qualified type. these occur in schema-qualified casts to the custom return type in the keys() functions.
bugfix: schemas/Makefile: `%/install: vegbien.sql`: sed expr: need to use '' instead of "" because $(*q) may contain "
bugfix: schemas/Makefile: `%/install: vegbien.sql`: don't enclose public_validations in "" because this causes a comment that says to search for `SET search_path = public_validations, pg_catalog;` to become mangled
fix: schemas/Makefile: moved comment about publishing a schema to %/publish
schemas/Makefile: vegbien.sql: support auxiliary schemas besides *_validation
fix: schemas/Makefile: %/publish: removed no longer applicable instructions about running `make schemas/rotate`. you should not publish a schema until you are satisfied that it can replace the previous public schema, so that the previous public schema doesn't need to be saved.
bugfix: schemas/Makefile: "public": dont
schemas/Makefile: %/publish: don't ignore errors if schema doesn't exist, because it should always exist if you are publishing it
schemas/Makefile: `%/uninstall: vegbien.sql`: use util.schema_bundle_rm() instead of public.rm(), because when the public schema is incompletely imported, public.rm() will not yet exist
schemas/Makefile: `%/install: vegbien.sql`: support auxiliary schemas besides *_validation
schemas/Makefile: %/uninstall, %/publish: use new public.rm(), publish(), which encapsulate the process of renaming multiple related schemas and also allow additional auxiliary schemas beyond just *_validation
bugfix: schemas/Makefile,vegbien.sql: renamed validation to public_validation to match the suffixed name applied by `make schemas/public/install`
schemas/Makefile: %/install, %/publish for public schema: added usage
schemas/Makefile: removed no longer used rename/%, rotate. use %/install, %/publish instead to manage public schema versions.
schemas/Makefile: removed no longer needed public/uninstall, which is handled more generally by `%/uninstall: vegbien.sql` instead
schemas/Makefile: `%/uninstall: vegbien.sql`: added support for *_validation schema
schemas/Makefile: %/uninstall: split into 2 rules like for %/install, so that different actions can easily be added for the public schema
schemas/Makefile: %/publish: support auxiliary *_validation schemas
bugfix: schemas/Makefile: `%/install: vegbien.sql`: need -e before each s/// expression
schemas/Makefile: `%/install: vegbien.sql`: create a custom _validation schema for *each public schema, rather than one for the most recently-created public schema. this allows validations to continue to be run against a previous version of the DB while a new version is being imported.
bugfix: schemas/Makefile: public/uninstall: need to uninstall the validation schema in addition to the public schema (deleting the public schema would only cascade to the contents of the validation schema)
schemas/vegbien.sql: added validation schema, which contains queries used in the aggregating validations. schemas/Makefile: include schemas that depend on `public` (eg. `validation`) so they are restored along with it.
fix: schemas/Makefile: %/uninstall: don't prompt to delete auxiliary schemas, as these do not contain data
moved everything into /trunk/ to create the standard svn layout, for use with tools that require this (eg. git-svn). IMPORTANT: do NOT do an `svn up`. instead, re-use your working copy's existing files with `svn switch` (http://svnbook.red-bean.com/en/1.6/svn.ref.svn.c.switch.html).
bugfix: schemas/Makefile: %/uninstall: always confirm before removing an existing schema, not just for public and r*, because an auxiliary schema might also be used as $version and reinstalled by bin/import_all
bugfix: schemas/Makefile: $(confirmRmPublicSchema): only prompt to delete the schema if it actually exists. this avoids prompting to remove a non-existent schema at the beginning of bin/import_all, which requires user attention. since bin/import_all is often run with a delayed start (e.g. to wait for a staging table reinstall to complete), the user may not be at the terminal when this message is displayed, and without this fix, the import would be prevented from running until they return.
schemas/Makefile: $(confirmRmPublicSchema0): use "any ... schema" instead of "the ... schema" because the schema in question may not exist
bugfix: schemas/Makefile: `%/install: vegbien.sql`: when replacing public with the specified schema name, only perform the replacement if the schema is named something other than public. this prevents text like "public schema" inside comments from being "-escaped.
bugfix: schemas/Makefile: enclose schema names in "" so that they won't be lowercased
bugfix: schemas/Makefile, lib/common.Makefile: enclose schema names in "" so that they won't be lowercased
*Makefile: removed $(psqlOpts), $(psqlAsAdmin), which are now set by lib/common.Makefile
*Makefile: removed $(asAdmin), which is now set by lib/common.Makefile
schemas/*functions.sql: Renamed to *util.sql because now that these schemas are used by the new-style import scripts, there can be more than just functions in them
schemas/Makefile: DDL generation: vegbien.sql: Unset $dump_opts so that pg_dump does not use env vars left after running import_all
schemas/Makefile: DDL generation: vegbien.sql: Unset $version so that pg_dump always uses the public schema, even after running import_all
schemas/Makefile: %/publish: Fixed bug where commands were not being run transactionally, because --single-transaction requires `--file -` to work properly
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.
schemas/Makefile: Fixed bug where need `SHELL := /bin/bash` for \$(confirmRmPublicSchema) to work correctly
schemas/Makefile: Installation: %/publish: Fixed bug where need quotes around source schema name
schemas/Makefile: Installation: py_functions/install: Removed `env public=`, which is not needed since $(psqlAsAdminVegbien) does not use psql_script_vegbien (which uses $public)
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
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
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
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.
schemas/Makefile: public%/install: schema comment: Include current date/time after version
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
schemas/Makefile: Include lib/common.Makefile
schemas/Makefile: DDLs: $(pg_dump): Turn off schema-only mode so that lookup table contents are included as well
schemas/Makefile: Removed no longer needed analytical_db, which has been replaced by bin/make_analytical_db
schemas/Makefile: Analytical DB: analytical_db: Time the creation of the analytical DB
schemas/Makefile: Added analytical_db target
schemas: Moved *.sql.make into Makefile to take advantage of % pattern matching
Removed no longer used schemas/vegbien_empty.sql
schemas/Makefile, py_functions.sql.make: Generate py_functions.sql from vegbien's py_functions schema
Added autogen schemas/functions.sql
Makefiles: Added .DELETE_ON_ERROR to delete target if recipe fails
Makefiles: Moved remake into main Makefile. Fixed remake to run `make all` in a new make so that cache of existing files is reset. Have main remake run clean and then all instead of forwarding remake to subdirs, so that everything is cleaned before everything is remade.
Makefiles: Use .SECONDARY with no prerequisites instead of setting a .PRECIOUS for each intermediate, to simplify turning off automatic deletion of intermediate files
Added schemas/filter_ERD.csv and use it when generating vegbien.my.sql
Makefiles: Added documentation labels to each section
schemas/Makefile: Don't generate for_ERD DDLs because the ERD is now synced with the full schema
schemas/Makefile: Generate MySQL version of vegbien.sql as well as vegbien.for_ERD.sql for eventual use in syncing the ERD with the whole schema
Create schemas/vegbien.for_wiki.sql from schemas/vegbien.for_ERD.sql
Removed no longer needed schemas/vegbien.my.sql
Added schemas/vegbien.for_ERD.sql and generated MySQL
Generate MySQL DDL schemas/vegbien.my.sql from vegbien.sql
Makefiles: Added remake target to run clean and all
Makefiles: Added empty rules for targets without a rule so that these rules wouldn't trigger the recursive subdir invocation for the default target
Moved mappings/schemas to schemas