Commit Graph

183 Commits

Author SHA1 Message Date
kolaente 49a3cde3ac feat: add database migration for project soft-delete
Add deleted_at nullable timestamp column to projects table to support
soft-delete functionality.
2026-03-30 23:21:07 +02:00
kolaente 71282dcffd feat: add OAuth 2.0 authorization code model and migration
Add the OAuthCode model for storing short-lived authorization codes
with PKCE challenges. Codes are hashed (SHA-256) before storage and
are single-use with a 10-minute expiry. Add the database migration
and OAuth-specific error types.
2026-03-27 23:05:04 +00:00
kolaente 867c52745f fix: use MySQL-compatible CREATE INDEX in migration 20260224215050
MySQL does not support CREATE INDEX IF NOT EXISTS syntax. Switch on
database type to use IF NOT EXISTS for Postgres/SQLite and plain
CREATE INDEX with duplicate key error suppression for MySQL.

Fixes #2431
2026-03-23 16:45:50 +00:00
kolaente d4577c660f feat: add user_id to webhooks and user-directed event infrastructure
Add user_id column to webhooks table (nullable, for user-level webhooks
vs project-level). Extend webhook model, permissions, and listener to
support user-level webhooks that fire for user-directed events like
task reminders and overdue task notifications.

Add TasksOverdueEvent for dispatching overdue notifications via webhooks.
Update webhook permissions to handle both user-level and project-level
ownership. Add webhook test fixture and register webhooks table in test
fixture loader.
2026-03-08 19:45:53 +01:00
kolaente a5b1a90c42 refactor: remove typesense support
Typesense was an optional external search backend. This commit fully
removes the integration, leaving the database searcher as the only
search implementation.

Changes:
- Delete pkg/models/typesense.go (core integration)
- Delete pkg/cmd/index.go (CLI command for indexing)
- Simplify task search to always use database searcher
- Remove Typesense event listeners for task sync
- Remove TypesenseSync model registration
- Remove Typesense config keys and defaults
- Remove Typesense doctor health check
- Remove Typesense initialization from startup
- Clean up benchmark test
- Add migration to drop typesense_sync table
- Remove golangci-lint suppression for typesense.go
- Remove typesense-go dependency
2026-02-25 12:15:28 +01:00
kolaente 04e60472b7 feat: add sessions table migration
Adds the `sessions` table for storing server-side session records.
Each row tracks a session ID (UUID), user ID, hashed refresh token,
device info, IP address, and timestamps.
2026-02-25 10:30:25 +01:00
kolaente 0c7c07b3b8 fix: preserve teams external_id type when renaming on mysql
Avoid using the generic renameColumn helper for this migration on MySQL because it renames columns as BIGINT. Handle the teams oidc_id -> external_id rename with a MySQL-specific CHANGE statement that keeps VARCHAR(250) and remains idempotent.
2026-02-24 14:29:49 +01:00
kolaente 3d6c527b64 fix: cast bucket_configuration to text in postgres catchup query
The new catchup migration compared the postgres JSON column with string literals using !=, which fails in migration smoke tests. Use a PostgreSQL-specific WHERE clause with ::text and cover it with unit tests.
2026-02-24 14:29:49 +01:00
kolaente 99ac3e65b8 fix: add comprehensive catchup for bucket and filter format migrations
Convert bucket_configuration filters regardless of bucket_configuration_mode and catch remaining view-level filter values still stored in the legacy string format. Includes focused tests for the bucket conversion helper logic.

Fixes #2172

Fixes #2188

Fixes #2202
2026-02-24 14:29:49 +01:00
kolaente 4acad97688 fix: make teams oidc_id rename migration idempotent
Use the shared renameColumn helper for non-SQLite databases and skip the SQLite table rebuild when oidc_id is already absent. This prevents failures after partial upgrades where the column was already renamed.

Refs #2172

Refs #2285
2026-02-24 14:29:49 +01:00
kolaente b1534f1cc8 fix: replace tx.Sync() with explicit ALTER TABLE in webhooks migration
tx.Sync() fails on PostgreSQL because it tries to reconcile primary key constraints/indexes, causing index-drop errors. Use explicit ALTER TABLE ADD COLUMN with existence checks instead.

Fixes #2215
2026-02-24 14:29:49 +01:00
rhclayto cf029cef0c
feat: add option to send Basic Auth header with webhook requests (#2137)
Resolves https://github.com/go-vikunja/vikunja/issues/2136
Docs PR: https://github.com/go-vikunja/website/pull/284
2026-01-30 15:07:31 +01:00
kolaente 6f0b685e38
fix: handle mixed-format bucket configurations in migration (#2033)
This change modifies the migration `20251001113831` to flexibly parse bucket configuration filters. 

This fixes this migration issue:

```
json: cannot unmarshal object into Go struct field bucketConfigurationCatchup.filter of type string
```

This occurred when a single `bucket_configuration` JSON array contained
mixed formats - some buckets with old string filters and some with
already-converted object filters.
2026-01-05 22:30:10 +01:00
Copilot 166da9763d
fix: handle MySQL 8 CREATE INDEX without IF NOT EXISTS support (#1903) 2025-11-28 15:57:54 +00:00
Mithilesh Gupta 7dddc5dfa2
feat: task unread tracking (#1857)
---------

Co-authored-by: Mithilesh Gupta <guptamithilesh@protonmail.com>
Co-authored-by: kolaente <k@knt.li>
2025-11-27 15:14:42 +01:00
Mithilesh Gupta 01a84dd2d5
feat: add comment count to tasks (#1771) 2025-11-11 23:00:05 +01:00
kolaente 67ebd876d3
fix(views): migrate filter bucket configuration
Resolves https://github.com/go-vikunja/vikunja/issues/1580
2025-10-01 11:54:24 +02:00
kolaente a81a3ee0e5
feat!: rename right to permission (#1277) 2025-08-13 11:05:05 +02:00
kolaente da0f6fb366 feat(auth): allow passing custom settings links to user account via openid claims 2025-08-03 13:25:32 +02:00
kolaente b08b43953b feat(plugins): add rudimentary plugin system 2025-08-01 17:06:02 +02:00
kolaente ca83ad1f98 feat: move to slog for logging 2025-07-21 18:15:39 +02:00
kolaente 159961b5e0
fix: add migration for non-unique task buckets 2025-06-25 11:12:24 +02:00
kolaente 842a71019d
fix(view): add unique index for task buckets (#1005) 2025-06-24 10:45:17 +00:00
Dominik Pschenitschni 296577a875
fix: correct license header references (#882)
See originals:
- https://www.gnu.org/licenses/agpl-3.0.txt
- https://www.gnu.org/licenses/gpl-3.0.txt
2025-06-10 12:18:38 +02:00
renovate[bot] bbf7679dd4
fix(deps): update module github.com/olekukonko/tablewriter to v1 (#750)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: kolaente <k@knt.li>
2025-05-23 10:00:58 +00:00
renovate[bot] 4a75f7d4da
chore(deps): update golangci/golangci-lint-action action to v7 (#462)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: kolaente <k@knt.li>
2025-04-02 09:28:56 +02:00
kolaente 25f3c5d9d7
fix(migration): cast to text 2025-03-25 21:47:52 +01:00
kolaente 13d4e0e00d
chore(utils): remove deprecated MakeRandomString function 2025-03-24 16:52:46 +01:00
kolaente 62b2c6771a
fix(project): correctly migrate old project view filters
This fixes a bug where old filters where not converted to the new json format correctly, leading to issues when trying to decode the raw filter string as json.
It is unclear whether that old migration had a bug or was not executed at all.

This change adds a new migration to fix all filters in views still stuck in the old filter string format.

Resolves https://github.com/go-vikunja/vikunja/issues/420
2025-03-23 21:34:49 +01:00
kolaente 62beb3db2d feat(auth): rename oidc_id to external_id 2025-03-18 16:36:00 +00:00
kolaente 942c2e4af6
fix: specify cols when upgrading
Resolves https://github.com/go-vikunja/vikunja/issues/367
2024-12-09 17:42:31 +01:00
kolaente d616bab76d fix(views): enable search in bucket filters 2024-11-19 16:27:22 +00:00
kolaente 624907ad6a fix: make search in saved filter work 2024-11-19 16:27:22 +00:00
kolaente acdb45a92c
fix: lint 2024-10-28 14:04:54 +01:00
kolaente 29107e9865
fix: error message check on mysql 2024-10-28 13:50:12 +01:00
kolaente a70c472aa3
fix: create missing indexes on postgres 2024-10-28 13:25:38 +01:00
kolaente cd0ab54d57
fix(views): add migration for filtered kanban buckets 2024-09-19 13:23:23 +02:00
kolaente 5e36bf797e
fix: add info log message when starting to run migrations 2024-07-05 10:26:26 +02:00
kolaente a38e768895
fix(db migration): do not try to create a unique index
Related to https://kolaente.dev/vikunja/vikunja/issues/2243
2024-06-04 08:45:39 +02:00
kolaente 5ef140fba2
fix(tasklist): migrate old tasklist format
Resolves https://community.vikunja.io/t/task-list-from-0-21-0-0-23-0/2340
Resolves https://community.vikunja.io/t/general-feedback-after-trying-out-vikunja/1943/6
2024-06-03 17:39:35 +02:00
kolaente e88f95e501
fix(migration): remove buckets table name when dropping index
Related to https://kolaente.dev/vikunja/vikunja/issues/2243
2024-04-21 13:50:03 +02:00
kolaente bf3c8ac9da
fix(views): check if bucket index already exists before creating new index
Resolves https://kolaente.dev/vikunja/vikunja/issues/2243
2024-04-13 14:20:27 +02:00
kolaente ca33c0b2bc
fix: drop bucket index before recreating it
Resolves https://kolaente.dev/vikunja/vikunja/issues/2243
2024-04-07 12:50:42 +02:00
kolaente 037022e857
fix: do not try to fetch nonexistant bucket 2024-04-06 13:55:11 +02:00
kolaente 7b8fab33a5
fix(kanban): Make sure all saved taskBucket positions are saved with their project view id
When the tasks were migrated from belonging directly to a bucket to only belonging to a view, I forgot to add the view in that migration, resulting in task buckets where the view was 0. These entries were not deleted when a task was moved between buckets, but the new task bucket relation nevertheless inserted. This resulted in tasks showing up multiple times on the kanban board.

This change adds a new migration which adds the correct project view id (as derived from the bucket) and fixes the old migration as well.

Resolves https://community.vikunja.io/t/no-longer-able-to-properly-move-tasks-between-kanban-columns/2175
2024-04-06 13:04:36 +02:00
waza-ari f0d695e789 fix(views): remove default filter from frontend, apply by default to new list views instead (#2240)
Fixes #2234

Co-authored-by: Daniel Herrmann <daniel.herrmann1@gmail.com>
Reviewed-on: https://kolaente.dev/vikunja/vikunja/pulls/2240
Reviewed-by: konrad <k@knt.li>
Co-authored-by: waza-ari <daniel.herrmann@makerspace-darmstadt.de>
Co-committed-by: waza-ari <daniel.herrmann@makerspace-darmstadt.de>
2024-04-02 13:49:38 +00:00
kolaente 30b41bd143
fix(views): lint 2024-03-19 00:47:51 +01:00
kolaente f2a0d69670
feat(views)!: make updating a bucket work again 2024-03-19 00:47:47 +01:00
kolaente a13276e28e
feat(views)!: decouple bucket <-> task relationship 2024-03-19 00:47:47 +01:00
kolaente 9cf84646a1
feat(views)!: move done and default bucket setting to view 2024-03-19 00:47:47 +01:00