Some checks failed
Deploy Development / deploy (push) Failing after 4s
Docker & Deployment: - docker-compose.yml (Prod: Port 3003/8003) - docker-compose.dev-env.yml (Dev: Port 3098/8098) - Backend Dockerfile (Python 3.12-slim) - Frontend Dockerfile (Node 20 + Nginx) - Gitea Actions (deploy-dev.yml, deploy-prod.yml) Frontend: - React 18 + Vite setup - package.json, vite.config.js, index.html - App.jsx (minimal with version display) - api.js (complete API client) - app.css + AuthContext from Mitai - main.jsx entry point Backend Migrations: - 001_auth_membership.sql (Auth + Features + Tier Limits) - 002_organization.sql (Clubs, Divisions, Training Groups) - 003_catalogs.sql (Skills + Methods with sample data) Documentation: - .claude/rules/ (ARCHITECTURE, CODING_RULES, etc.) - SHINKAN_PROJECT_SETUP.md (technical setup guide) Server: - Directories created on Pi: /home/lars/docker/shinkan[-dev] - Gitea Runner configured and running Ready for first deployment to dev.shinkan.jinkendo.de version: 0.1.0 date: 2026-04-21
53 lines
1.6 KiB
SQL
53 lines
1.6 KiB
SQL
-- Migration 002: Organization (Clubs, Divisions, Training Groups)
|
|
-- Erstellt: 2026-04-21
|
|
-- Beschreibung: Organisationsstruktur für Vereine und Trainingsgruppen
|
|
|
|
-- Clubs (Vereine)
|
|
CREATE TABLE clubs (
|
|
id SERIAL PRIMARY KEY,
|
|
name VARCHAR(200) NOT NULL,
|
|
abbreviation VARCHAR(50),
|
|
description TEXT,
|
|
status VARCHAR(50) DEFAULT 'active',
|
|
created_at TIMESTAMP DEFAULT NOW(),
|
|
updated_at TIMESTAMP DEFAULT NOW()
|
|
);
|
|
|
|
CREATE INDEX idx_clubs_status ON clubs(status);
|
|
|
|
-- Divisions (Sparten) - optional
|
|
CREATE TABLE divisions (
|
|
id SERIAL PRIMARY KEY,
|
|
club_id INT REFERENCES clubs(id) ON DELETE CASCADE,
|
|
name VARCHAR(200) NOT NULL,
|
|
focus_area VARCHAR(100), -- karate, selbstverteidigung, gewaltschutz
|
|
created_at TIMESTAMP DEFAULT NOW(),
|
|
updated_at TIMESTAMP DEFAULT NOW()
|
|
);
|
|
|
|
CREATE INDEX idx_divisions_club ON divisions(club_id);
|
|
|
|
-- Training Groups (Trainingsgruppen)
|
|
CREATE TABLE training_groups (
|
|
id SERIAL PRIMARY KEY,
|
|
club_id INT REFERENCES clubs(id) ON DELETE CASCADE,
|
|
division_id INT REFERENCES divisions(id),
|
|
name VARCHAR(200) NOT NULL,
|
|
focus VARCHAR(100),
|
|
level VARCHAR(50),
|
|
age_group VARCHAR(50),
|
|
weekday VARCHAR(20),
|
|
time_start TIME,
|
|
time_end TIME,
|
|
location VARCHAR(200),
|
|
trainer_id INT REFERENCES profiles(id),
|
|
co_trainer_ids JSONB, -- [1, 2, 3]
|
|
status VARCHAR(50) DEFAULT 'active',
|
|
created_at TIMESTAMP DEFAULT NOW(),
|
|
updated_at TIMESTAMP DEFAULT NOW()
|
|
);
|
|
|
|
CREATE INDEX idx_groups_club ON training_groups(club_id);
|
|
CREATE INDEX idx_groups_trainer ON training_groups(trainer_id);
|
|
CREATE INDEX idx_groups_status ON training_groups(status);
|