excel preview & file handling

This commit is contained in:
richardtekula
2025-11-24 10:18:28 +01:00
parent dfcf8056f3
commit 7fd6b9e742
12 changed files with 1336 additions and 18 deletions

View File

@@ -0,0 +1,3 @@
-- Add flag to mark system-generated timesheets
ALTER TABLE timesheets
ADD COLUMN IF NOT EXISTS is_generated BOOLEAN NOT NULL DEFAULT FALSE;

View File

@@ -89,6 +89,17 @@ BEGIN
END IF;
END $$;
-- Add is_generated flag to timesheets if not exists
DO $$
BEGIN
IF NOT EXISTS (
SELECT 1 FROM information_schema.columns
WHERE table_name='timesheets' AND column_name='is_generated'
) THEN
ALTER TABLE timesheets ADD COLUMN is_generated BOOLEAN NOT NULL DEFAULT FALSE;
END IF;
END $$;
-- Create indexes for better query performance
CREATE INDEX IF NOT EXISTS idx_companies_created_at ON companies(created_at);
CREATE INDEX IF NOT EXISTS idx_projects_company_id ON projects(company_id);