2024-05-06 01:47:02 +00:00
|
|
|
-- Drop the id column from the remote_image table, just use link
|
|
|
|
ALTER TABLE remote_image
|
|
|
|
DROP COLUMN id,
|
|
|
|
ADD PRIMARY KEY (link),
|
|
|
|
DROP CONSTRAINT remote_image_link_key;
|
|
|
|
|
|
|
|
-- No good way to do references here unfortunately, unless we combine the images tables
|
|
|
|
-- The link should be the URL, not the pictrs_alias, to allow joining from post.thumbnail_url
|
|
|
|
CREATE TABLE image_details (
|
|
|
|
link text PRIMARY KEY,
|
|
|
|
width integer NOT NULL,
|
|
|
|
height integer NOT NULL,
|
2024-05-08 20:12:34 +00:00
|
|
|
content_type text NOT NULL
|
2024-05-06 01:47:02 +00:00
|
|
|
);
|
2024-05-06 02:10:32 +00:00
|
|
|
|