← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1152386] Re: Migration 12 drops the indices for table image_properties with sqlite

 

** Changed in: glance/grizzly
       Status: New => Fix Released

** Changed in: glance/grizzly
    Milestone: None => 2013.1

** Changed in: glance/grizzly
     Assignee: (unassigned) => John Bresnahan (jbresnah)

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

Title:
  Migration 12 drops the indices for table image_properties with sqlite

Status in OpenStack Image Registry and Delivery Service (Glance):
  Fix Released
Status in Glance grizzly series:
  Fix Released

Bug description:
  When using sqlite:

  at migration point 11 the schema for the image_properties table is:

  sqlite> .schema image_properties
  CREATE TABLE image_properties (
  	id INTEGER NOT NULL,
  	image_id INTEGER NOT NULL,
  	name VARCHAR(255) NOT NULL,
  	value TEXT,
  	created_at DATETIME NOT NULL,
  	updated_at DATETIME,
  	deleted_at DATETIME,
  	deleted BOOLEAN NOT NULL,
  	PRIMARY KEY (id),
  	CHECK (deleted IN (0, 1)),
  	UNIQUE (image_id, name),
  	FOREIGN KEY(image_id) REFERENCES images (id)
  );
  CREATE INDEX ix_image_properties_deleted ON image_properties (deleted);
  CREATE INDEX ix_image_properties_name ON image_properties (name);

  At migration point 12 it looks like:

  sqlite> .schema image_properties
  CREATE TABLE "image_properties" (
              id INTEGER NOT NULL,
              image_id VARCHAR(36) NOT NULL,
              name VARCHAR(255) NOT NULL,
              value TEXT,
              created_at DATETIME NOT NULL,
              updated_at DATETIME,
              deleted_at DATETIME,
              deleted BOOLEAN NOT NULL,
              PRIMARY KEY (id),
              CHECK (deleted IN (0, 1)),
              UNIQUE (image_id, name),
              FOREIGN KEY(image_id) REFERENCES images (id)
          );

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