Commit Graph

10 Commits

Author SHA1 Message Date
Carlos García Montoro c703b9ce89 Set autoincrement to False; use sqlite_autoincrement in versioned_history
Ensure that the history table sets autoincrement=False, since these values
are copied in all cases; the flag will emit an error as of 1.1 if the
primary key is composite.   Additionally, use the sqlite_autoincrement flag
so that SQLite uses unique primary key identifiers for new rows even if
some rows have been deleted.

Fixes: #3872
Change-Id: I65912eb394b3b69d7f4e3c098f4f948b0a7a5374
Pull-request: https://bitbucket.org/zzzeek/sqlalchemy/pull-requests/93
2017-01-09 18:00:33 -05:00
Mike Bayer d57e5edbcd - Fixed two issues in the "history_meta" example where history tracking
could encounter empty history, and where a column keyed to an alternate
attribute name would fail to track properly.  Fixes courtesy
Alex Fraser.
2015-08-24 10:54:09 -04:00
Mike Bayer de62497b03 - Updated the :ref:examples_versioned_history example such that
mapped columns are re-mapped to
match column names as well as grouping of columns; in particular,
this allows columns that are explicitly grouped in a same-column-named
joined inheritance scenario to be mapped in the same way in the
history mappings, avoiding warnings added in the 0.9 series
regarding this pattern and allowing the same view of attribute
keys.
2014-11-26 14:58:44 -05:00
Mike Bayer a88be57fb7 - formatting 2014-11-26 14:58:32 -05:00
Mike Bayer ea05a23218 - Support has been added for pytest to run tests. This runner
is currently being supported in addition to nose, and will likely
be preferred to nose going forward.   The nose plugin system used
by SQLAlchemy has been split out so that it works under pytest as
well.  There are no plans to drop support for nose at the moment
and we hope that the test suite itself can continue to remain as
agnostic of testing platform as possible.  See the file
README.unittests.rst for updated information on running tests
with pytest.

The test plugin system has also been enhanced to support running
tests against mutiple database URLs at once, by specifying the ``--db``
and/or ``--dburi`` flags multiple times.  This does not run the entire test
suite for each database, but instead allows test cases that are specific
to certain backends make use of that backend as the test is run.
When using pytest as the test runner, the system will also run
specific test suites multiple times, once for each database, particularly
those tests within the "dialect suite".   The plan is that the enhanced
system will also be used by Alembic, and allow Alembic to run
migration operation tests against multiple backends in one run, including
third-party backends not included within Alembic itself.
Third party dialects and extensions are also encouraged to standardize
on SQLAlchemy's test suite as a basis; see the file README.dialects.rst
for background on building out from SQLAlchemy's test platform.
2014-03-03 15:55:17 -05:00
Mike Bayer 537d921293 - Fixed bug in the versioned_history example where column-level INSERT
defaults would prevent history values of NULL from being written.
2014-02-24 12:34:54 -05:00
Mike Bayer 4588a0e603 - use column.info to detect those cols part of "versioning"
- pep8 cleanup
- fix tests for "changed" column
- document that "changed" is optional
- changelog
2014-02-16 16:38:09 -05:00
Mike Bayer 4dd7bf58c0 Merge branch 'patch-1' of https://github.com/jplaverdure/sqlalchemy into t 2014-02-16 16:23:54 -05:00
Mike Bayer b85f0b5681 - Added a tweak to the "history_meta" example where the check for
"history" on a relationship-bound attribute will now no longer emit
any SQL if the relationship is unloaded.
2014-02-02 19:05:36 -05:00
Mike Bayer 58fab1be98 - start reworking examples to include more code from the wiki.
- add the other versioning examples from the wiki
- modernize the dictlike examples
2013-11-29 18:53:53 -05:00