mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-18 15:49:42 +02:00
refactor: rename planta → plants, clean up codebase
- Rename planta module to plants everywhere (routes, modules, API, branding, i18n, docker, docs, shared packages) - Fix package name collisions: @mana/credits-service, @mana/subscriptions-service (unblocks turbo) - Extract layout composables: use-ai-tier-items, use-sync-status-items, RouteTierGate (layout 1345→1015 lines) - Create shared DB pool for apps/api (lib/db.ts), migrate 5 modules - Add automations module queries.ts with useAllAutomations/useEnabledAutomations - Remove debug console.log statements from production code - Rename storage display name: Ablage → Speicher Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
c6c19dbc77
commit
a91a6076cc
110 changed files with 831 additions and 707 deletions
|
|
@ -17,8 +17,8 @@ import { rrulestr } from 'rrule';
|
|||
import { z } from 'zod';
|
||||
import { eq, and, asc, sql } from 'drizzle-orm';
|
||||
import { drizzle } from 'drizzle-orm/postgres-js';
|
||||
import postgres from 'postgres';
|
||||
import { serviceAuthMiddleware, type AuthVariables } from '@mana/shared-hono';
|
||||
import { getConnection } from '../../lib/db';
|
||||
import {
|
||||
pgSchema,
|
||||
uuid,
|
||||
|
|
@ -33,9 +33,6 @@ import {
|
|||
|
||||
// ─── DB Schema (minimal, server-only) ──────────────────────
|
||||
|
||||
const DATABASE_URL =
|
||||
process.env.DATABASE_URL ?? 'postgresql://mana:devpassword@localhost:5432/mana_platform';
|
||||
|
||||
const todoSchema = pgSchema('todo');
|
||||
|
||||
const tasks = todoSchema.table('tasks', {
|
||||
|
|
@ -88,8 +85,7 @@ const reminders = todoSchema.table(
|
|||
})
|
||||
);
|
||||
|
||||
const connection = postgres(DATABASE_URL, { max: 5, idle_timeout: 20 });
|
||||
const db = drizzle(connection, { schema: { tasks, projects, reminders } });
|
||||
const db = drizzle(getConnection(), { schema: { tasks, projects, reminders } });
|
||||
|
||||
// ─── Routes ────────────────────────────────────────────────
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue