← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1367757] [NEW] nuage_net_partition_router_mapping model does not match migration

 

Public bug reported:

class NetPartitionRouter(model_base.BASEV2):
    __tablename__ = "nuage_net_partition_router_mapping"
    net_partition_id = sa.Column(sa.String(36),
                                 sa.ForeignKey('nuage_net_partitions.id',
                                 ondelete="CASCADE"),
                                 primary_key=True)
    router_id = sa.Column(sa.String(36),
                          sa.ForeignKey('routers.id', ondelete="CASCADE"),
                          primary_key=True)
    nuage_router_id = sa.Column(sa.String(36))


    op.create_table(
        'net_partition_router_mapping',
        sa.Column('net_partition_id', sa.String(length=36), nullable=False),
        sa.Column('router_id', sa.String(length=36), nullable=False),
        sa.Column('nuage_router_id', sa.String(length=36), nullable=True),
        sa.ForeignKeyConstraint(['net_partition_id'], ['net_partitions.id'],
                                ondelete='CASCADE'),
        sa.ForeignKeyConstraint(['router_id'], ['routers.id'],
                                ondelete='CASCADE'),
        sa.PrimaryKeyConstraint('router_id'),
    )

The migration is missing PK constraint on net_partition_id.

** Affects: neutron
     Importance: Undecided
     Assignee: Ann Kamyshnikova (akamyshnikova)
         Status: New


** Tags: db

** Tags added: db

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

Title:
  nuage_net_partition_router_mapping model does not match migration

Status in OpenStack Neutron (virtual network service):
  New

Bug description:
  class NetPartitionRouter(model_base.BASEV2):
      __tablename__ = "nuage_net_partition_router_mapping"
      net_partition_id = sa.Column(sa.String(36),
                                   sa.ForeignKey('nuage_net_partitions.id',
                                   ondelete="CASCADE"),
                                   primary_key=True)
      router_id = sa.Column(sa.String(36),
                            sa.ForeignKey('routers.id', ondelete="CASCADE"),
                            primary_key=True)
      nuage_router_id = sa.Column(sa.String(36))

  
      op.create_table(
          'net_partition_router_mapping',
          sa.Column('net_partition_id', sa.String(length=36), nullable=False),
          sa.Column('router_id', sa.String(length=36), nullable=False),
          sa.Column('nuage_router_id', sa.String(length=36), nullable=True),
          sa.ForeignKeyConstraint(['net_partition_id'], ['net_partitions.id'],
                                  ondelete='CASCADE'),
          sa.ForeignKeyConstraint(['router_id'], ['routers.id'],
                                  ondelete='CASCADE'),
          sa.PrimaryKeyConstraint('router_id'),
      )

  The migration is missing PK constraint on net_partition_id.

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


Follow ups

References