album/migrations/2018-03-03-142213_photo_size/up.sql
Rasmus Kaj fc1ed81561 Store width and height of images.
Use it to calculate width and height of small images in lists.

Since the old database should be migratable to the new, the width and
height fields are nullable.  I aim to make them not nullable later,
after all images in the database has got width and height.
2018-03-05 00:29:39 +01:00

7 lines
304 B
SQL

-- Add width and height to photos
-- Intially make them nullable, to make it possible to apply the
-- migration to an existing database. A NOT NULL constraint should
-- be added later, when all photos has sizes.
ALTER TABLE photos ADD COLUMN width INTEGER;
ALTER TABLE photos ADD COLUMN height INTEGER;