Some checks failed
The `000016_task_template_id` and `000017_drop_task_template_regions_join` migrations introduced on gitea collided with the existing unpadded 016/017 migrations (authtoken_created_at, fk_indexes). Renamed them to 021/022 so they extend the shipped sequence instead of replacing real migrations. Also removed the padded 000012-000015 files which were duplicate content of the shipped 012-015 unpadded migrations. Dockerfile builder image bumped from golang:1.24-alpine to 1.25-alpine to match go.mod's `go 1.25` directive. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
13 lines
511 B
SQL
13 lines
511 B
SQL
-- Recreates the legacy task_tasktemplate_regions join table. Data is not
|
|
-- restored — if a rollback needs the prior associations they have to be
|
|
-- reseeded from the task template conditions JSON.
|
|
|
|
CREATE TABLE IF NOT EXISTS task_tasktemplate_regions (
|
|
task_template_id BIGINT NOT NULL,
|
|
climate_region_id BIGINT NOT NULL,
|
|
PRIMARY KEY (task_template_id, climate_region_id)
|
|
);
|
|
|
|
CREATE INDEX IF NOT EXISTS idx_task_tasktemplate_regions_region
|
|
ON task_tasktemplate_regions (climate_region_id);
|