-- +goose Up
-- +goose StatementBegin
CREATE TABLE IF NOT EXISTS CardtraderExpansion (
	Id INT PRIMARY KEY,
	Code VARCHAR(20) NOT NULL,
	Name VARCHAR(255) NOT NULL
);

CREATE TABLE IF NOT EXISTS CardtraderBlueprint (
	Id INT PRIMARY KEY,
	ScryfallCardId VARCHAR(100) NULL,
	CardtraderCategoryId INT NOT NULL,
	CardtraderExpansionId INT NOT NULL,
	FOREIGN KEY (CardtraderExpansionId) REFERENCES CardtraderExpansion(Id),
	Name VARCHAR(255) NOT NULL,
	CollectorNumber VARCHAR(50) NOT NULL
);
-- +goose StatementEnd

-- +goose Down
-- +goose StatementBegin
DROP TABLE IF EXISTS CardtraderBlueprint;

DROP TABLE IF EXISTS CardtraderExpansion;
-- +goose StatementEnd
