← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1292591] [NEW] Database models differs from migrations.

 

Public bug reported:

As models and migrations don't have any logical relation in code, so
differences are possible. Furthermore in most of cases differences
exists. The only way to solve this problem is using of specific test
such as this https://review.openstack.org/#/c/74081/  .

This is a diff example form Keystone:

AssertionError: Models and migration scripts aren't in sync:
[ [ ( 'modify_nullable',
      None,
      'federation_protocol',
      'mapping_id',
      { 'existing_server_default': None,
        'existing_type': VARCHAR(length=64)},
      True,
      False)],
  [ ( 'modify_nullable',
      None,
      'region',
      'description',
      { 'existing_server_default': None,
        'existing_type': VARCHAR(length=255)},
      False,
      True)],
  ( 'remove_index',
    Index(u'ix_revocation_event_revoked_at', Column(u'revoked_at', DATETIME(), table=<revocation_event>, nullable=False))),
  [ ( 'modify_nullable',
      None,
      'token',
      'valid',
      { 'existing_server_default': None,
        'existing_type': INTEGER()},
      True,
      False)]]

** Affects: keystone
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to Keystone.
https://bugs.launchpad.net/bugs/1292591

Title:
  Database models differs from migrations.

Status in OpenStack Identity (Keystone):
  New

Bug description:
  As models and migrations don't have any logical relation in code, so
  differences are possible. Furthermore in most of cases differences
  exists. The only way to solve this problem is using of specific test
  such as this https://review.openstack.org/#/c/74081/  .

  This is a diff example form Keystone:

  AssertionError: Models and migration scripts aren't in sync:
  [ [ ( 'modify_nullable',
        None,
        'federation_protocol',
        'mapping_id',
        { 'existing_server_default': None,
          'existing_type': VARCHAR(length=64)},
        True,
        False)],
    [ ( 'modify_nullable',
        None,
        'region',
        'description',
        { 'existing_server_default': None,
          'existing_type': VARCHAR(length=255)},
        False,
        True)],
    ( 'remove_index',
      Index(u'ix_revocation_event_revoked_at', Column(u'revoked_at', DATETIME(), table=<revocation_event>, nullable=False))),
    [ ( 'modify_nullable',
        None,
        'token',
        'valid',
        { 'existing_server_default': None,
          'existing_type': INTEGER()},
        True,
        False)]]

To manage notifications about this bug go to:
https://bugs.launchpad.net/keystone/+bug/1292591/+subscriptions


Follow ups

References