Permalink
Commits on Nov 25, 2013
  1. Update release files for 0.7.0.

    jmafc committed Nov 25, 2013
Commits on Nov 22, 2013
  1. Merge branch 'r0.7'

    jmafc committed Nov 22, 2013
  2. Increase MAX_IDENT_LEN to 32.

    jmafc committed Nov 22, 2013
Commits on Nov 21, 2013
  1. Merge branch 'r0.7'

    jmafc committed Nov 21, 2013
  2. Correct column-level COLLATE clauses.

      The collation is an identifier and needs double-quotes around it,
      rather than single quotes.
    jmafc committed Nov 21, 2013
  3. Remove need to use "set search_path" in various commands. Fixes #73.

     * docs/dbobject.rst: Remove DbSchemaObject.set_search_path.
     * pyrseas/dbobject/__init__.py (DbSchemaObject.qualname): Add objname
       argument to allow qualification of related objects.
       (DbSchemaObject.set_search_path): Delete.
     * pyrseas/dbobject/column.py (Column.set_sequence_default): Don't set
       search_path but qualify table name instead.
     * pyrseas/dbobject/index.py (Index.create): Don't set search_path but
       qualify table name instead.
     * pyrseas/dbobject/table.py (Sequence.add_owner): Don't set
       search_path but qualify sequence and owner table instead.
     * tests/dbobject/test_column.py: Modify
       test_create_table_with_defaults to use a non-public schema and to
       verify ALTER SEQUENCE OWNED BY.
     * tests/dbobject/test_index.py: Add new test to verify index creation
       in a non-public schema.
    jmafc committed Nov 21, 2013
Commits on Nov 19, 2013
Commits on Nov 18, 2013
  1. Support partial indexes. Fixes #76.

     * pyrseas/dbobject/index.py (Index.create): Process predicate if
       present.  (IndexDict.query): Retrieve indpred.
       (IndexDict._from_catalog): Split WHERE clause before USING.
       (IndexDict.from_map): Add predicate to attribute list.
     * tests/dbobject/test_index.py: Add two tests for new functionality.
    jmafc committed Nov 18, 2013
Commits on Nov 14, 2013
  1. Process command-line config file earlier to obtain repo path. Fixes #74.

     * pyrseas/cmdargs.py (parse_args): Merge command-line config before
       establishing the repository paths, and only override the configured
       repo path if the command-line value is not the default (os.getcwd).
    jmafc committed Nov 14, 2013
Commits on Nov 13, 2013
Commits on Nov 11, 2013
  1. Allow yamltodb -u to process \copy statments.

     * pyrseas/dbobject/table.py (Table.data_import): Return the \copy
       statement as a five-element tuple so that it can be easily used by
       yamltodb.
     * pyrseas/lib/dbconn.py (DbConnection.copy_from): New method to wrap
       psycopg function.
     * pyrseas/testutils.py (DbMigrateTestCase.run_pg_dump): Add incldata
       argument to create a pg_dump with data.
     * pyrseas/yamltodb.py: If -u option, process \copy statements via
       copy_from.
     * tests/dbobject/test_static.py: Adjusts the StaticTableToSqlTestCase
       copy_stmt formats.
     * tests/functional/film-schema-0.3b.sql: Add INSERT to populate the
       genre table.
     * tests/functional/test_filmversions.py
       (FilmTestCase.test_film_version_03): Add a user and repo config
       file to export and then import the genre table.
    jmafc committed Nov 11, 2013
Commits on Nov 5, 2013
Commits on Nov 4, 2013
  1. Drop (and reinstate) FK constraints for tables being truncated for im…

    …port.
    
     * pyrseas/dbobject/table.py (Table.data_import): If table has a
       foreign key reference, drop the constraint before truncating and
       reinstate it afterwards.
     * tests/dbobject/test_static.py: New test to cover change.
    jmafc committed Nov 4, 2013
Commits on Nov 1, 2013
  1. Document limitation raised in issue 72. [ci skip]

      Also, remove adjust_name from cfgobjects.rst.
    jmafc committed Nov 1, 2013
Commits on Oct 31, 2013
Commits on Oct 30, 2013
  1. Quote collation identifiers in columns. Fixes #71.

     * pyrseas/dbobject/column.py (Column.add): Quote the collation
       identifier.
     * tests/dbobject/test_collation.py: Change two tests accordingly.
     * tests/dbobject/test_column.py: Change column defaults test to cover
       this too.
    jmafc committed Oct 30, 2013
  2. Merge pull request #70 from rhunwicks/issues/64

    Check for translation entry before raising KeyError - fixes #64
    jmafc committed Oct 30, 2013
  3. Check for translation entry before raising Function Template not found

    error in CfgFunction.apply() - fixes #64
    rhunwicks committed Oct 30, 2013
Commits on Oct 29, 2013
  1. For yamltodb, create schemas ahead of extensions. Fixes #68.

     * pyrseas/dbobject/database.py (Database.diff_map): Process schemas
       before everything.
     * tests/dbobject/test_extension.py
       (ExtensionToSqlTestCase.test_create_extension_schema): Don't create
       the schema, but expect it first in the to_sql output.
    jmafc committed Oct 29, 2013
Commits on Oct 25, 2013
  1. For multiple files, only truncate filenames of schema objects. Fixes #61

    .
    
     * docs/dbtoyaml.rst: Point out only schema objects will be truncated.
     * pyrseas/dbobject/__init__.py (DbObject.extern_filename): Add
       truncate argument with default False.
       (DbSchemaObject.extern_filename): New method, which invokes super
       method with truncate=True.
     * tests/dbobject/test_extern_file.py: New test to cover change.
    jmafc committed Oct 25, 2013
Commits on Oct 24, 2013
  1. Use SESSION_USER in audit_full and audit_default. Fixes #66.

      Also use pg_catalog.inet_client_addr as default for IP address.
    jmafc committed Oct 24, 2013
  2. Remove unused code for function segments.

     To be re-introduced later, as needed.
    
     * docs/cfgobjects.rst: Remove CfgFunctionSegment.
     * pyrseas/augment/function.py (CfgFunctionSegment): Removed class.
       (CfgFunctionSourceDict.__init__): Remove cfg_segments argument.
       (CfgFunction.adjust_name): Remove as unused.  (CfgFunction.apply):
       Remove processing of segments.
     * pyrseas/augmentdb.py (AugmentDatabase.__init__): Remove segments
       parameter in initialization of CfgFunctionSourceDict.
    jmafc committed Oct 24, 2013
Commits on Oct 21, 2013
  1. Merge pull request #63 from rhunwicks/issues/62

    Consistent naming of Augmenter function templates and segments - fixes #62
    jmafc committed Oct 21, 2013
Commits on Oct 18, 2013
  1. Ensure a schema has tables before attempting to link datacopy items.

      Also, remove unused datacopy argument from ClassDict.link_refs.
    jmafc committed Oct 18, 2013
Commits on Oct 17, 2013