6ed42c0be7
Store and show which camera each picture was taken with (if present in exif data).
10 lines
267 B
SQL
10 lines
267 B
SQL
CREATE TABLE cameras (
|
|
id SERIAL PRIMARY KEY,
|
|
manufacturer VARCHAR NOT NULL,
|
|
model VARCHAR NOT NULL
|
|
);
|
|
|
|
CREATE UNIQUE INDEX cameras_idx ON cameras (manufacturer, model);
|
|
|
|
ALTER TABLE photos ADD COLUMN camera_id INTEGER REFERENCES cameras (id);
|