Compare commits
4 Commits
7d552d33cd
...
feature/ge
| Author | SHA1 | Date | |
|---|---|---|---|
| d5c7b77e7e | |||
| bff25b4683 | |||
| aa1d22cec7 | |||
| f7e97ad7a2 |
3
.gitignore
vendored
3
.gitignore
vendored
@@ -137,3 +137,6 @@ GerbilManagerWebAPI/photo-storage/
|
||||
|
||||
# AR-3: Data Protection key ring (dev-only ephemeral keys) — never commit
|
||||
GerbilManagerWebAPI/.data-protection-keys/
|
||||
|
||||
# node_modules — never commit, installed locally per npm install
|
||||
node_modules/
|
||||
|
||||
@@ -21,7 +21,7 @@ namespace GerbilManagerWebAPI.Migrations
|
||||
UPDATE ""Gerbils"" SET ""Status"" = 'GivenAway'
|
||||
WHERE ""Status"" != 'Deceased'
|
||||
AND (""ReceiverContactId"" IS NOT NULL
|
||||
OR EXISTS (SELECT 1 FROM ""SaleContractAnimals"" WHERE ""GerbilId"" = ""Gerbils"".""Id""));");
|
||||
OR EXISTS (SELECT 1 FROM ""SaleContractAnimal"" WHERE ""GerbilId"" = ""Gerbils"".""Id""));");
|
||||
|
||||
// 4) Age > 7 years (presumed dead) → Deceased, but NOT overriding GivenAway.
|
||||
migrationBuilder.Sql(@"
|
||||
|
||||
@@ -21,15 +21,17 @@ export default function GerbilIcon({ size = '1em', style, className }: Props) {
|
||||
aria-label="Rennmaus"
|
||||
>
|
||||
{/* body — sitting upright */}
|
||||
<path d="M40 14c6 0 11 5 11 12 0 4-2 7-2 11 0 10-6 16-15 16-8 0-14-6-14-15 0-13 9-24 20-24z" />
|
||||
{/* ear */}
|
||||
<circle cx="46" cy="15" r="5" />
|
||||
{/* hind paw */}
|
||||
<ellipse cx="24" cy="52" rx="9" ry="3.5" />
|
||||
{/* long curved tail with tuft */}
|
||||
<path d="M16 51c-7 1-13-2-15-9-1-4 0-8 3-10 1 3 1 6 3 8 3 3 7 4 11 4z" />
|
||||
<path d="M 34 23 C 38 20, 44 21, 46 25 C 47 27, 45 30, 41 31 C 38 32, 40 38, 40 42 C 40 48, 36 51, 31 52 C 25 52, 21 47, 21 40 C 21 31, 27 25, 34 23 Z" />
|
||||
{/* ears */}
|
||||
<path d="M 36 22 Q 33 13 39 11 Q 42 13 39 21 Z" />
|
||||
<path d="M 32 23 Q 30 15 35 13 Q 37 15 35 22 Z" opacity="0.6" />
|
||||
{/* front paw */}
|
||||
<path d="M30 45c3 0 5 1 5 4-3 1-6 1-7-2 0-1 1-2 2-2z" />
|
||||
<path d="M 41 33 Q 46 33 46 36 Q 44 38 41 35 Z" />
|
||||
{/* hind paw */}
|
||||
<path d="M 21 49 C 19 53, 23 55, 30 55 C 33 55, 34 52, 30 50 Z" />
|
||||
{/* tail and tuft */}
|
||||
<path d="M 21 47 C 14 51, 9 46, 8 41 C 7 35, 11 27, 16 22 C 17 21, 18 22, 17 23 C 13 28, 10 35, 11 40 C 12 44, 15 47, 21 44 Z" />
|
||||
<path d="M 16 22 C 16 16, 13 11, 16 7 C 20 3, 22 10, 19 16 C 18 19, 17 21, 16 22 Z" />
|
||||
</svg>
|
||||
)
|
||||
}
|
||||
|
||||
32
tools/wipe-import-data.sql
Normal file
32
tools/wipe-import-data.sql
Normal file
@@ -0,0 +1,32 @@
|
||||
-- WIPE-IMPORT-DATA: truncate only import-derived tables, preserve seeded data.
|
||||
--
|
||||
-- Scope (god decision 2026-06-07):
|
||||
-- WIPE: GerbilPhotos, WeightRecords, HealthRecords, Gerbils, Litters
|
||||
-- KEEP: ColorVarieties (migration-seeded, import matches against these)
|
||||
-- BreederSettings, Sites, Pages (CMS), Contacts, Enclosures,
|
||||
-- SaleContracts, Requests, MailSettings
|
||||
--
|
||||
-- Run ONLY after pg_dump backup. FK order: dependents first.
|
||||
-- Usage (with Aspire Postgres running):
|
||||
-- docker exec -i <postgres-container> psql -U postgres gerbilmanager < tools/wipe-import-data.sql
|
||||
-- OR connect via psql and \i this file.
|
||||
|
||||
BEGIN;
|
||||
|
||||
-- 1. leaf dependents
|
||||
TRUNCATE TABLE "GerbilPhotos" CASCADE;
|
||||
TRUNCATE TABLE "WeightRecords" CASCADE;
|
||||
TRUNCATE TABLE "HealthRecords" CASCADE;
|
||||
|
||||
-- 2. main import tables (Gerbils before Litters: Gerbil.LitterId FK)
|
||||
TRUNCATE TABLE "Gerbils" CASCADE;
|
||||
TRUNCATE TABLE "Litters" CASCADE;
|
||||
|
||||
COMMIT;
|
||||
|
||||
-- Verify (expected: 0 rows each)
|
||||
SELECT 'GerbilPhotos' AS tbl, COUNT(*) FROM "GerbilPhotos"
|
||||
UNION ALL SELECT 'WeightRecords', COUNT(*) FROM "WeightRecords"
|
||||
UNION ALL SELECT 'HealthRecords', COUNT(*) FROM "HealthRecords"
|
||||
UNION ALL SELECT 'Gerbils', COUNT(*) FROM "Gerbils"
|
||||
UNION ALL SELECT 'Litters', COUNT(*) FROM "Litters";
|
||||
Reference in New Issue
Block a user