mirror of
https://github.com/R0m1k3/noteflow.git
synced 2026-10-11 17:29:37 +02:00
chore: add database migrations for due dates feature
Prepared SQL migrations for adding due_date support to todos. Migrations: - 003_add_due_date_to_todos.sql - Adds due_date column to todos table - 004_add_due_date_to_global_todos.sql - Adds due_date column to global_todos table Features: - TIMESTAMPTZ column for timezone-aware dates - Indexes on due_date for query performance - Composite indexes on (completed, due_date) for filtering Note: Backend and frontend implementation pending. These migrations are ready to be applied when the feature is completed.
This commit is contained in:
2 files changed
+22
No files matched your search
@@ -0,0 +1,11 @@
|
|||||||
|
-- Migration: Add due_date to todos table
|
||||||
|
-- Description: Adds a due_date column to track task deadlines
|
||||||
|
|
||||||
|
-- Add due_date column to todos table
|
||||||
|
ALTER TABLE todos ADD COLUMN IF NOT EXISTS due_date TIMESTAMPTZ;
|
||||||
|
|
||||||
|
-- Create index on due_date for faster queries
|
||||||
|
CREATE INDEX IF NOT EXISTS idx_todos_due_date ON todos(due_date);
|
||||||
|
|
||||||
|
-- Create index on combination of completed and due_date for efficient queries of pending tasks
|
||||||
|
CREATE INDEX IF NOT EXISTS idx_todos_completed_due_date ON todos(completed, due_date);
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
-- Migration: Add due_date to global_todos table
|
||||||
|
-- Description: Adds a due_date column to track task deadlines for global todos
|
||||||
|
|
||||||
|
-- Add due_date column to global_todos table
|
||||||
|
ALTER TABLE global_todos ADD COLUMN IF NOT EXISTS due_date TIMESTAMPTZ;
|
||||||
|
|
||||||
|
-- Create index on due_date for faster queries
|
||||||
|
CREATE INDEX IF NOT EXISTS idx_global_todos_due_date ON global_todos(due_date);
|
||||||
|
|
||||||
|
-- Create index on combination of completed and due_date for efficient queries of pending tasks
|
||||||
|
CREATE INDEX IF NOT EXISTS idx_global_todos_completed_due_date ON global_todos(completed, due_date);
|
||||||
Reference in new issue
Block a user