Fix migrations for scan placeholder

This commit is contained in:
The Magician 2025-01-16 15:16:05 +00:00
parent f0758a2cce
commit 0a52dde4f6
3 changed files with 33 additions and 39 deletions

View File

@ -0,0 +1,33 @@
-- +goose Up
-- +goose StatementBegin
INSERT INTO CardtraderExpansion (
Id,
Code,
Name
) VALUES (
-1,
'None',
'None'
);
INSERT INTO CardtraderBlueprint (
Id,
ScryfallCardId,
CardtraderCategoryId,
CardtraderExpansionId,
Name,
CollectorNumber
) VALUES (
-1,
'00000000-0000-0000-0000-000000000000',
1,
-1,
'Scanned Card Placeholder',
0
);
-- +goose StatementEnd
-- +goose Down
-- +goose StatementBegin
DELETE FROM CardtraderBlueprint WHERE Id = -1;
-- +goose StatementEnd

View File

@ -1,39 +0,0 @@
-- +goose Up
-- +goose StatementBegin
INSERT INTO ScryfallSet (
SetCode,
Name,
CardCount,
IconSvgUri
) VALUES (
'null',
'None',
0,
''
);
INSERT INTO ScryfallCard (
Id,
Name,
ScryfallSetCode,
HasFoilPrinting,
IsPromo,
CollectorNumber,
ImageUrl,
Language
) VALUES (
'00000000-0000-0000-0000-000000000000',
'Scanned Card Placeholder',
'null',
0,
0,
0,
'',
'en'
);
-- +goose StatementEnd
-- +goose Down
-- +goose StatementBegin
DELETE FROM CardPrinting WHERE Id = '00000000-0000-0000-0000-000000000000';
-- +goose StatementEnd