mtgcoll/resources/migrations/00005_card_images_table.up.sql
Gered aca45d9631 major reworking of various data and image importing/scraping operations
can now run the application from the command line to invoke the various
data import/update or image scraping operations.

removed all copies of scraped set/symbol/mana images
2016-06-28 19:16:04 -04:00

11 lines
353 B
SQL

CREATE TABLE card_images (
id SERIAL PRIMARY KEY,
card_id TEXT NOT NULL,
image_name TEXT NOT NULL,
image_bytes BYTEA,
mimetype TEXT
);
ALTER TABLE ONLY card_images ADD CONSTRAINT card_images_card_id_fkey FOREIGN KEY (card_id) REFERENCES cards (id) ON DELETE CASCADE;
CREATE INDEX card_images_card_id_idx ON card_images (card_id);