Comment 2 for bug 1394319

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to congress (master)

Reviewed: https://review.openstack.org/136206
Committed: https://git.openstack.org/cgit/stackforge/congress/commit/?id=745fca199460d0c5a5a2ef49e08a78dde9367910
Submitter: Jenkins
Branch: master

commit 745fca199460d0c5a5a2ef49e08a78dde9367910
Author: armando-migliaccio <email address hidden>
Date: Thu Nov 20 15:20:55 2014 -0800

    Fix Postgres support for Congress

    This patch fixes the use of the deleted column for the PolicyRule.

    Even though the 'deleted' attribute for the DB model is a literal,
    the flag being passed around is a boolean. This causes a mismatch
    between the conceptual model and the logical schema that may lead
    to errors depending on the actual DB backend. For instance MySql
    is fine, but Postgres is not.

    Furthermore, soft deletes were also not represented correctly during
    the initialization of the policy rule, as when a rule is soft deleted,
    the deleted literal is a representation of the entity's uuid, rather
    than a simple bool.

    This patch also makes sure that from a DB schema migration, the
    right defaults are captured.

    Finally, the db module has been extended to allow the retrieval
    of soft deleted rules, as a future-proofing measure.

    Closes-bug: #1394319

    Change-Id: Ifce2506d95b68ef168d53f7f5977734f378c43df