mirror of
https://github.com/johannesjo/super-productivity.git
synced 2026-07-25 17:03:52 +00:00
prisma migrate deploy wraps each migration in a transaction; CONCURRENTLY index migrations fail it (P3018/25001) and later deploys then stick (P3009). Recovery was duplicated and migration-name-hardcoded in the host deploy.sh and the in-image migrate-deploy.sh. The host script self-updates only via a best-effort git pull, so a stale host deploy.sh had no recovery branch for a new CONCURRENTLY migration and failed the deploy (the reported incident). - migrate-deploy.sh: single, name-agnostic recovery. Parses the failing migration from Prisma's own output, gates on the txn-block/P3009 signature AND the migration's own SQL containing INDEX CONCURRENTLY, runs that SQL out-of-band statement-by-statement, and only marks it applied if every statement succeeded; otherwise fails loudly with manual steps. Bounded retry loop; aborts instead of looping on re-failure. - deploy.sh: ~290 lines of hardcoded host-side recovery removed; now invokes the in-image scripts/migrate-deploy.sh (always version-locked to prisma/migrations in the pulled image) and keeps only timeout/exit policy. - tests: drive the script end-to-end via a fake npx (P3018, stuck P3009, non-CONCURRENTLY refusal, statement-failure, re-failure abort, genuine error passthrough, multi-migration chain); migration-sql.spec.ts updated to the new contract. - prisma/migrations/README.md: authoring rules the recovery relies on. Design: docs/plans/2026-05-15-generic-concurrently-migration-recovery-design.md |
||
|---|---|---|
| .. | ||
| plugin-api | ||
| plugin-dev | ||
| shared-schema | ||
| super-sync-server | ||
| sync-core | ||
| sync-providers | ||
| vite-plugin | ||
| build-packages.js | ||
| README.md | ||
Super Productivity Packages
This directory contains plugin packages and the plugin API for Super Productivity.
Structure
plugin-api/- TypeScript definitions for the plugin APIplugin-dev/- Plugin development examples and toolsapi-test-plugin/- Basic API test pluginprocrastination-buster/- Example SolidJS-based pluginyesterday-tasks-plugin/- Simple plugin showing yesterday's tasksboilerplate-solid-js/- Template for creating new SolidJS plugins (not built)sync-md/- Markdown sync plugin (not built)
Building Packages
All packages are built automatically when running the main build process:
npm run build:packages
This command:
- Builds the plugin-api TypeScript definitions
- Builds plugins that require compilation (e.g., procrastination-buster)
- Copies plugin files to
src/assets/for inclusion in the app
Development
To work on a specific plugin:
cd plugin-dev/[plugin-name]
npm install
npm run dev
Adding a New Plugin
- Create a new directory in
plugin-dev/ - Add the plugin configuration to
/packages/build-packages.js - Run
npm run build:packagesto test the build
Notes
- The
boilerplate-solid-jsandsync-mdplugins are development templates and are not included in production builds - Plugin files are automatically copied to
src/assets/during the build process - The build script handles dependency installation automatically