Dropped in 2.19. Replaced by shop_item.
photo_format
CREATE TABLE photo_format ( identifier integer NOT NULL PRIMARY KEY, users integer REFERENCES users(identifier), width varchar(100), height varchar(100), date_of_creation timestamp, date_of_last_edit timestamp );
None.
None.
None.
None.
Version 2.8
Version 2.18
= Version 2.8 =
CREATE TABLE photo_format ( identifier integer NOT NULL PRIMARY KEY, users integer REFERENCES users(identifier), width varchar(100), height varchar(100), date_of_creation timestamp, date_of_last_edit timestamp );
= Version 2.19 =
ALTER TABLE photo_format ADD COLUMN description varchar(200); ALTER TABLE photo_format ADD COLUMN category integer REFERENCES shop_category(identifier); -- and migrate existing photo_formats to this category UPDATE photo_format SET category = shop_category.identifier FROM shop_category WHERE photo_format.users = shop_category.users; -- now that we have the categories updated set them not null ALTER TABLE photo_format ALTER COLUMN category SET NOT NULL; -- update the photo_format so that we have only one description field UPDATE photo_format SET description = width || 'x' || height; -- drop old columns from photo_format ALTER TABLE photo_format DROP COLUMN width; ALTER TABLE photo_format DROP COLUMN height; ALTER TABLE photo_format RENAME TO shop_item;