api issue
This commit is contained in:
@@ -1 +0,0 @@
|
||||
spring.application.name=bonsai-api
|
||||
@@ -0,0 +1,25 @@
|
||||
server:
|
||||
port: 8080
|
||||
|
||||
spring:
|
||||
datasource:
|
||||
url: ${DATASOURCE_URL:jdbc:postgresql://localhost:5432/bonsai}
|
||||
username: ${DATASOURCE_USERNAME:bonsai}
|
||||
password: ${DATASOURCE_PASSWORD:bonsai}
|
||||
jpa:
|
||||
hibernate:
|
||||
ddl-auto: validate
|
||||
open-in-view: false
|
||||
flyway:
|
||||
enabled: true
|
||||
security:
|
||||
oauth2:
|
||||
resourceserver:
|
||||
jwt:
|
||||
jwk-set-uri: ${KEYCLOAK_JWKS_URI:https://auth.goutailler-olivier.com/realms/bonsai/protocol/openid-connect/certs}
|
||||
|
||||
app:
|
||||
cors:
|
||||
allowed-origins:
|
||||
- http://localhost:4200
|
||||
- ${CORS_ALLOWED_ORIGIN_PROD:https://bonsai.goutailler-olivier.com}
|
||||
@@ -0,0 +1,27 @@
|
||||
CREATE TABLE issues (
|
||||
id BIGSERIAL PRIMARY KEY,
|
||||
type VARCHAR(50) NOT NULL,
|
||||
assignee VARCHAR(255),
|
||||
epic VARCHAR(255),
|
||||
name VARCHAR(255) NOT NULL,
|
||||
due_date DATE,
|
||||
description TEXT,
|
||||
estimated_time DOUBLE PRECISION,
|
||||
priority VARCHAR(50) NOT NULL,
|
||||
status VARCHAR(50) NOT NULL DEFAULT 'draft',
|
||||
progress INTEGER NOT NULL DEFAULT 0
|
||||
);
|
||||
|
||||
-- No FK on depends_on_id: dangling refs allowed (frontend cleans up)
|
||||
CREATE TABLE issue_depends_on (
|
||||
issue_id BIGINT NOT NULL REFERENCES issues (id) ON DELETE CASCADE,
|
||||
depends_on_id BIGINT NOT NULL
|
||||
);
|
||||
|
||||
CREATE TABLE comments (
|
||||
id BIGSERIAL PRIMARY KEY,
|
||||
issue_id BIGINT NOT NULL REFERENCES issues (id) ON DELETE CASCADE,
|
||||
text TEXT NOT NULL,
|
||||
created_at TIMESTAMPTZ NOT NULL,
|
||||
updated_at TIMESTAMPTZ
|
||||
);
|
||||
Reference in New Issue
Block a user