rating
create table rating ( identifier integer not null primary key, photo integer not null references photo(identifier), users integer not null references users(identifier), date_of_creation timestamp, value integer not null, comment text, version integer not null references photo_version(identifier); );
None.
None.
Version 2.5
Still in use
= Version 2.5 =
CREATE TABLE rating ( identifier integer NOT NULL PRIMARY KEY, photo integer NOT NULL REFERENCES photo(identifier), users integer NOT NULL REFERENCES users(identifier), date_of_creation timestamp, value integer NOT NULL );
= Version 2.6 =
ALTER TABLE rating ADD COLUMN comment text;
= Version 2.34 =
-- Add 'version' to rating to allow individual versions. ALTER TABLE rating ADD version integer REFERENCES photo_version(identifier);
ALTER TABLE rating ALTER version SET NOT NULL;
= Version 2.34 =
-- Add 'version' to rating to allow individual versions. UPDATE rating SET version = (SELECT identifier FROM photo_version v WHERE rating.photo = v.photo AND v.master = 't');